From 355fbe5ec1cc79918fbd945a78ef0dd45f7e205f Mon Sep 17 00:00:00 2001 From: Matthew Christopher Date: Tue, 28 Nov 2023 11:59:12 -0800 Subject: [PATCH] Add Storage version 2023-01-01 * Also fix bug where validations were not being stripped for the AzureName property on storage versions. --- docs/hugo/content/reference/_index.md | 17 + docs/hugo/content/reference/storage/_index.md | 17 + .../v1api20220801/storage/api_types_gen.go | 3 - .../storage/api_version_set_types_gen.go | 3 - .../storage/backend_types_gen.go | 2 - .../storage/named_value_types_gen.go | 2 - .../storage/policy_fragment_types_gen.go | 3 - .../storage/product_types_gen.go | 2 - .../storage/service_types_gen.go | 3 - .../v1api20220801/storage/structure.txt | 36 +- .../storage/subscription_types_gen.go | 2 - .../storage/configuration_store_types_gen.go | 3 - .../v1api20220501/storage/structure.txt | 5 +- .../storage/batch_account_types_gen.go | 3 - .../batch/v1api20210101/storage/structure.txt | 5 +- .../storage/registry_types_gen.go | 3 - .../v1api20210901/storage/structure.txt | 5 +- .../storage/managed_cluster_types_gen.go | 3 - .../v1api20210501/storage/structure.txt | 5 +- .../storage/managed_cluster_types_gen.go | 3 - .../v1api20230201/storage/structure.txt | 5 +- .../storage/managed_cluster_types_gen.go | 3 - .../storage/structure.txt | 10 +- .../trusted_access_role_binding_types_gen.go | 3 - .../storage/fleet_types_gen.go | 3 - .../storage/fleets_member_types_gen.go | 3 - .../storage/fleets_update_run_types_gen.go | 3 - .../storage/structure.txt | 15 +- .../storage/factory_types_gen.go | 3 - .../v1api20180601/storage/structure.txt | 5 +- ...lexible_servers_configuration_types_gen.go | 1 - .../v1api20220101/storage/structure.txt | 3 +- .../storage/database_account_types_gen.go | 3 - .../v1api20210515/storage/structure.txt | 5 +- .../storage/namespace_types_gen.go | 3 - ...namespaces_authorization_rule_types_gen.go | 1 - .../storage/namespaces_eventhub_types_gen.go | 2 - ..._eventhubs_authorization_rule_types_gen.go | 1 - ...aces_eventhubs_consumer_group_types_gen.go | 2 - .../v1api20211101/storage/structure.txt | 19 +- .../storage/structure.txt | 3 +- .../storage/vault_types_gen.go | 1 - .../v1api20230701/storage/structure.txt | 3 +- .../v1api20230701/storage/vault_types_gen.go | 1 - ...federated_identity_credential_types_gen.go | 1 - .../v1api20230131/storage/structure.txt | 3 +- .../v1api20210601/storage/structure.txt | 5 +- .../storage/workspace_types_gen.go | 3 - .../storage/resource_group_types_gen.go | 2 - .../v1api20200601/storage/structure.txt | 4 +- ...namespaces_authorization_rule_types_gen.go | 2 - .../storage/namespaces_queue_types_gen.go | 1 - .../storage/namespaces_topic_types_gen.go | 1 - ...amespaces_topics_subscription_types_gen.go | 2 - ...ces_topics_subscriptions_rule_types_gen.go | 2 - .../storage/structure.txt | 18 +- ...namespaces_authorization_rule_types_gen.go | 2 - .../storage/namespaces_queue_types_gen.go | 1 - .../storage/namespaces_topic_types_gen.go | 1 - ...amespaces_topics_subscription_types_gen.go | 2 - ...ces_topics_subscriptions_rule_types_gen.go | 2 - .../v1api20211101/storage/structure.txt | 18 +- ...namespaces_authorization_rule_types_gen.go | 2 - .../storage/namespaces_queue_types_gen.go | 1 - .../storage/namespaces_topic_types_gen.go | 1 - ...amespaces_topics_subscription_types_gen.go | 2 - ...ces_topics_subscriptions_rule_types_gen.go | 2 - .../storage/structure.txt | 18 +- .../storage_account_extension_types_gen.go | 6 +- .../storage_account_extensions.go | 2 +- ...counts_blob_service_extension_types_gen.go | 6 +- ..._services_container_extension_types_gen.go | 6 +- ...counts_file_service_extension_types_gen.go | 6 +- ...file_services_share_extension_types_gen.go | 6 +- ...s_management_policy_extension_types_gen.go | 6 +- ...ounts_queue_service_extension_types_gen.go | 6 +- ...ueue_services_queue_extension_types_gen.go | 6 +- ...ounts_table_service_extension_types_gen.go | 6 +- ...able_services_table_extension_types_gen.go | 6 +- .../storage/storage_account_types_gen.go | 33 +- .../storage/storage_account_types_gen_test.go | 3 +- ...storage_accounts_blob_service_types_gen.go | 31 +- ...ge_accounts_blob_service_types_gen_test.go | 3 +- ...ounts_blob_services_container_types_gen.go | 33 +- ..._blob_services_container_types_gen_test.go | 3 +- ...ge_accounts_management_policy_types_gen.go | 31 +- ...counts_management_policy_types_gen_test.go | 3 +- ...torage_accounts_queue_service_types_gen.go | 31 +- ...e_accounts_queue_service_types_gen_test.go | 3 +- ...accounts_queue_services_queue_types_gen.go | 33 +- ...nts_queue_services_queue_types_gen_test.go | 3 +- .../v1api20210401/storage/structure.txt | 12 +- .../storage_account_types_gen_test.go | 4 +- ...ge_accounts_blob_service_types_gen_test.go | 4 +- ..._blob_services_container_types_gen_test.go | 4 +- ...counts_management_policy_types_gen_test.go | 4 +- ...e_accounts_queue_service_types_gen_test.go | 4 +- ...nts_queue_services_queue_types_gen_test.go | 4 +- .../storage/storage_account_types_gen.go | 7526 +++++++++- .../storage/storage_account_types_gen_test.go | 2554 +++- ...storage_accounts_blob_service_types_gen.go | 1769 ++- ...ge_accounts_blob_service_types_gen_test.go | 674 + ...ounts_blob_services_container_types_gen.go | 1388 +- ..._blob_services_container_types_gen_test.go | 464 + ...storage_accounts_file_service_types_gen.go | 1019 +- ...ge_accounts_file_service_types_gen_test.go | 422 + ..._accounts_file_services_share_types_gen.go | 899 +- ...unts_file_services_share_types_gen_test.go | 338 + ...ge_accounts_management_policy_types_gen.go | 3065 +++- ...counts_management_policy_types_gen_test.go | 1108 +- ...torage_accounts_queue_service_types_gen.go | 393 +- ...e_accounts_queue_service_types_gen_test.go | 170 + ...accounts_queue_services_queue_types_gen.go | 371 +- ...nts_queue_services_queue_types_gen_test.go | 170 + ...torage_accounts_table_service_types_gen.go | 393 +- ...e_accounts_table_service_types_gen_test.go | 170 + ...accounts_table_services_table_types_gen.go | 758 +- ...nts_table_services_table_types_gen_test.go | 338 + .../v1api20220901/storage/structure.txt | 219 +- .../storage_account_types_gen.go | 937 +- .../storage_account_types_gen_test.go | 3 +- ...storage_accounts_blob_service_types_gen.go | 303 +- ...ge_accounts_blob_service_types_gen_test.go | 3 +- ...ounts_blob_services_container_types_gen.go | 113 +- ..._blob_services_container_types_gen_test.go | 3 +- ...storage_accounts_file_service_types_gen.go | 149 +- ...ge_accounts_file_service_types_gen_test.go | 3 +- ..._accounts_file_services_share_types_gen.go | 144 +- ...unts_file_services_share_types_gen_test.go | 3 +- ...ge_accounts_management_policy_types_gen.go | 525 +- ...counts_management_policy_types_gen_test.go | 3 +- ...torage_accounts_queue_service_types_gen.go | 60 +- ...e_accounts_queue_service_types_gen_test.go | 3 +- ...accounts_queue_services_queue_types_gen.go | 51 +- ...nts_queue_services_queue_types_gen_test.go | 3 +- ...torage_accounts_table_service_types_gen.go | 60 +- ...e_accounts_table_service_types_gen_test.go | 3 +- ...accounts_table_services_table_types_gen.go | 109 +- ...nts_table_services_table_types_gen_test.go | 3 +- v2/api/storage/v1api20230101/doc.go | 10 + .../v1api20230101/groupversion_info_gen.go | 32 + .../storage/groupversion_info_gen.go | 32 + .../storage/storage_account_types_gen.go | 871 ++ .../storage/storage_account_types_gen_test.go | 3855 +++++ ...storage_accounts_blob_service_types_gen.go | 330 + ...ge_accounts_blob_service_types_gen_test.go | 999 ++ ...ounts_blob_services_container_types_gen.go | 304 + ..._blob_services_container_types_gen_test.go | 731 + ...storage_accounts_file_service_types_gen.go | 260 + ...ge_accounts_file_service_types_gen_test.go | 633 + ..._accounts_file_services_share_types_gen.go | 265 + ...unts_file_services_share_types_gen_test.go | 516 + ...ge_accounts_management_policy_types_gen.go | 427 + ...counts_management_policy_types_gen_test.go | 1704 +++ ...torage_accounts_queue_service_types_gen.go | 205 + ...e_accounts_queue_service_types_gen_test.go | 232 + ...accounts_queue_services_queue_types_gen.go | 210 + ...nts_queue_services_queue_types_gen_test.go | 208 + ...torage_accounts_table_service_types_gen.go | 205 + ...e_accounts_table_service_types_gen_test.go | 232 + ...accounts_table_services_table_types_gen.go | 247 + ...nts_table_services_table_types_gen_test.go | 495 + .../v1api20230101/storage/structure.txt | 966 ++ .../storage/zz_generated.deepcopy.go | 6397 +++++++++ .../storage_account_spec_arm_types_gen.go | 443 + ...storage_account_spec_arm_types_gen_test.go | 1599 +++ .../storage_account_status_arm_types_gen.go | 671 + ...orage_account_status_arm_types_gen_test.go | 2327 +++ .../storage_account_types_gen.go | 11768 ++++++++++++++++ .../storage_account_types_gen_test.go | 6458 +++++++++ ...ccounts_blob_service_spec_arm_types_gen.go | 141 + ...ts_blob_service_spec_arm_types_gen_test.go | 559 + ...ounts_blob_service_status_arm_types_gen.go | 139 + ..._blob_service_status_arm_types_gen_test.go | 567 + ...storage_accounts_blob_service_types_gen.go | 3174 +++++ ...ge_accounts_blob_service_types_gen_test.go | 1692 +++ ...b_services_container_spec_arm_types_gen.go | 61 + ...vices_container_spec_arm_types_gen_test.go | 234 + ...services_container_status_arm_types_gen.go | 212 + ...ces_container_status_arm_types_gen_test.go | 667 + ...ounts_blob_services_container_types_gen.go | 2521 ++++ ..._blob_services_container_types_gen_test.go | 1199 ++ ...ccounts_file_service_spec_arm_types_gen.go | 77 + ...ts_file_service_spec_arm_types_gen_test.go | 354 + ...ounts_file_service_status_arm_types_gen.go | 69 + ..._file_service_status_arm_types_gen_test.go | 359 + ...storage_accounts_file_service_types_gen.go | 1710 +++ ...ge_accounts_file_service_types_gen_test.go | 1041 ++ ..._file_services_share_spec_arm_types_gen.go | 71 + ..._services_share_spec_arm_types_gen_test.go | 313 + ...ile_services_share_status_arm_types_gen.go | 102 + ...ervices_share_status_arm_types_gen_test.go | 334 + ..._accounts_file_services_share_types_gen.go | 1925 +++ ...unts_file_services_share_types_gen_test.go | 866 ++ ...ts_management_policy_spec_arm_types_gen.go | 203 + ...nagement_policy_spec_arm_types_gen_test.go | 890 ++ ..._management_policy_status_arm_types_gen.go | 195 + ...gement_policy_status_arm_types_gen_test.go | 907 ++ ...ge_accounts_management_policy_types_gen.go | 5107 +++++++ ...counts_management_policy_types_gen_test.go | 2784 ++++ ...counts_queue_service_spec_arm_types_gen.go | 37 + ...s_queue_service_spec_arm_types_gen_test.go | 154 + ...unts_queue_service_status_arm_types_gen.go | 26 + ...queue_service_status_arm_types_gen_test.go | 156 + ...torage_accounts_queue_service_types_gen.go | 730 + ...e_accounts_queue_service_types_gen_test.go | 388 + ...queue_services_queue_spec_arm_types_gen.go | 35 + ..._services_queue_spec_arm_types_gen_test.go | 154 + ...eue_services_queue_status_arm_types_gen.go | 28 + ...ervices_queue_status_arm_types_gen_test.go | 157 + ...accounts_queue_services_queue_types_gen.go | 720 + ...nts_queue_services_queue_types_gen_test.go | 377 + ...counts_table_service_spec_arm_types_gen.go | 37 + ...s_table_service_spec_arm_types_gen_test.go | 154 + ...unts_table_service_status_arm_types_gen.go | 26 + ...table_service_status_arm_types_gen_test.go | 156 + ...torage_accounts_table_service_types_gen.go | 730 + ...e_accounts_table_service_types_gen_test.go | 388 + ...table_services_table_spec_arm_types_gen.go | 54 + ..._services_table_spec_arm_types_gen_test.go | 292 + ...ble_services_table_status_arm_types_gen.go | 48 + ...ervices_table_status_arm_types_gen_test.go | 308 + ...accounts_table_services_table_types_gen.go | 1279 ++ ...nts_table_services_table_types_gen_test.go | 832 ++ v2/api/storage/v1api20230101/structure.txt | 2278 +++ .../v1api20230101/zz_generated.deepcopy.go | 10535 ++++++++++++++ v2/api/storage/versions_matrix.md | 488 +- v2/azure-arm.yaml | 62 + .../importing/importable_arm_resource_test.go | 2 +- .../controllers/controller_resources_gen.go | 48 +- ...d_storage_storageaccount_20230101_test.go} | 12 +- .../controllers/owner_arm_id_negative_test.go | 6 +- v2/internal/controllers/owner_arm_id_test.go | 4 +- ...omDifferentSubscription_ResourceFails.yaml | 16 +- ...t_ChildResourceSuccessfullyReconciled.yaml | 106 +- ...eGroup_ResourceSuccessfullyReconciled.yaml | 64 +- ...Test_OwnerIsARMIDOfWrongType_Rejected.yaml | 12 +- ...Test_OwnerIsARMIDSetWithName_Rejected.yaml | 12 +- ...age_v1api20230101_CreationAndDeletion.yaml | 1498 ++ ..._Storage_StorageAccount_20220901_CRUD.yaml | 1299 -- ..._Storage_StorageAccount_20230101_CRUD.yaml | 1403 ++ ...ageAccount_20230101_SecretsFromAzure.yaml} | 242 +- .../v1api20230101_storageaccount.yaml | 14 + ...pi20230101_storageaccountsblobservice.yaml | 8 + ..._storageaccountsblobservicescontainer.yaml | 8 + ...pi20230101_storageaccountsfileservice.yaml | 8 + ...0101_storageaccountsfileservicesshare.yaml | 8 + ...30101_storageaccountsmanagementpolicy.yaml | 23 + ...i20230101_storageaccountsqueueservice.yaml | 8 + ...101_storageaccountsqueueservicesqueue.yaml | 8 + ...i20230101_storageaccountstableservice.yaml | 8 + ...101_storageaccountstableservicestable.yaml | 8 + .../codegen/storage/property_converter.go | 9 +- .../codegen/storage/type_converter.go | 11 +- 254 files changed, 119877 insertions(+), 5021 deletions(-) create mode 100644 v2/api/storage/v1api20230101/doc.go create mode 100644 v2/api/storage/v1api20230101/groupversion_info_gen.go create mode 100644 v2/api/storage/v1api20230101/storage/groupversion_info_gen.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_account_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_account_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_blob_service_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_blob_service_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_blob_services_container_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_blob_services_container_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_file_service_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_file_service_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_file_services_share_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_file_services_share_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_management_policy_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_management_policy_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_queue_service_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_queue_service_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_queue_services_queue_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_queue_services_queue_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_table_service_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_table_service_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_table_services_table_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage/storage_accounts_table_services_table_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage/structure.txt create mode 100644 v2/api/storage/v1api20230101/storage/zz_generated.deepcopy.go create mode 100644 v2/api/storage/v1api20230101/storage_account_spec_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_account_spec_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_account_status_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_account_status_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_account_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_account_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_blob_service_spec_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_blob_service_spec_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_blob_service_status_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_blob_service_status_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_blob_service_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_blob_service_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_blob_services_container_spec_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_blob_services_container_spec_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_blob_services_container_status_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_blob_services_container_status_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_blob_services_container_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_blob_services_container_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_file_service_spec_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_file_service_spec_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_file_service_status_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_file_service_status_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_file_service_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_file_service_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_file_services_share_spec_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_file_services_share_spec_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_file_services_share_status_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_file_services_share_status_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_file_services_share_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_file_services_share_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_management_policy_spec_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_management_policy_spec_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_management_policy_status_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_management_policy_status_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_management_policy_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_management_policy_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_queue_service_spec_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_queue_service_spec_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_queue_service_status_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_queue_service_status_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_queue_service_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_queue_service_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_spec_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_spec_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_status_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_status_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_table_service_spec_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_table_service_spec_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_table_service_status_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_table_service_status_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_table_service_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_table_service_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_table_services_table_spec_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_table_services_table_spec_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_table_services_table_status_arm_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_table_services_table_status_arm_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_table_services_table_types_gen.go create mode 100644 v2/api/storage/v1api20230101/storage_accounts_table_services_table_types_gen_test.go create mode 100644 v2/api/storage/v1api20230101/structure.txt create mode 100644 v2/api/storage/v1api20230101/zz_generated.deepcopy.go rename v2/internal/controllers/{crd_storage_storageaccount_20220901_test.go => crd_storage_storageaccount_20230101_test.go} (97%) create mode 100644 v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Storage_v1api20230101_CreationAndDeletion.yaml delete mode 100644 v2/internal/controllers/recordings/Test_Storage_StorageAccount_20220901_CRUD.yaml create mode 100644 v2/internal/controllers/recordings/Test_Storage_StorageAccount_20230101_CRUD.yaml rename v2/internal/controllers/recordings/{Test_Storage_StorageAccount_SecretsFromAzure.yaml => Test_Storage_StorageAccount_20230101_SecretsFromAzure.yaml} (51%) create mode 100644 v2/samples/storage/v1api20230101/v1api20230101_storageaccount.yaml create mode 100644 v2/samples/storage/v1api20230101/v1api20230101_storageaccountsblobservice.yaml create mode 100644 v2/samples/storage/v1api20230101/v1api20230101_storageaccountsblobservicescontainer.yaml create mode 100644 v2/samples/storage/v1api20230101/v1api20230101_storageaccountsfileservice.yaml create mode 100644 v2/samples/storage/v1api20230101/v1api20230101_storageaccountsfileservicesshare.yaml create mode 100644 v2/samples/storage/v1api20230101/v1api20230101_storageaccountsmanagementpolicy.yaml create mode 100644 v2/samples/storage/v1api20230101/v1api20230101_storageaccountsqueueservice.yaml create mode 100644 v2/samples/storage/v1api20230101/v1api20230101_storageaccountsqueueservicesqueue.yaml create mode 100644 v2/samples/storage/v1api20230101/v1api20230101_storageaccountstableservice.yaml create mode 100644 v2/samples/storage/v1api20230101/v1api20230101_storageaccountstableservicestable.yaml diff --git a/docs/hugo/content/reference/_index.md b/docs/hugo/content/reference/_index.md index c688b8fc1fa..2f20cb90c62 100644 --- a/docs/hugo/content/reference/_index.md +++ b/docs/hugo/content/reference/_index.md @@ -578,6 +578,23 @@ These resource(s) are available for use in the current release of ASO. Different To install the CRDs for these resources, your ASO configuration must include `storage.azure.com/*` as a one of the configured CRD patterns. See [CRD Management in ASO](https://azure.github.io/azure-service-operator/guide/crd-management/) for details on doing this for both [Helm](https://azure.github.io/azure-service-operator/guide/crd-management/#helm) and [YAML](https://azure.github.io/azure-service-operator/guide/crd-management/#yaml) based installations. +### Next Release + +Development of these new resources is complete and they will be available in the next release of ASO. + +| Resource | ARM Version | CRD Version | Supported From | Sample | +|--------------------------------------|-------------|---------------|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------| +| StorageAccount | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccount.yaml) | +| StorageAccountsBlobService | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsblobservice.yaml) | +| StorageAccountsBlobServicesContainer | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsblobservicescontainer.yaml) | +| StorageAccountsFileService | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsfileservice.yaml) | +| StorageAccountsFileServicesShare | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsfileservicesshare.yaml) | +| StorageAccountsManagementPolicy | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsmanagementpolicy.yaml) | +| StorageAccountsQueueService | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsqueueservice.yaml) | +| StorageAccountsQueueServicesQueue | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsqueueservicesqueue.yaml) | +| StorageAccountsTableService | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountstableservice.yaml) | +| StorageAccountsTableServicesTable | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountstableservicestable.yaml) | + ### Released These resource(s) are available for use in the current release of ASO. Different versions of a given resource reflect different versions of the Azure ARM API. diff --git a/docs/hugo/content/reference/storage/_index.md b/docs/hugo/content/reference/storage/_index.md index 514c8cf8b09..484712db62d 100644 --- a/docs/hugo/content/reference/storage/_index.md +++ b/docs/hugo/content/reference/storage/_index.md @@ -5,6 +5,23 @@ no_list: true --- To install the CRDs for these resources, your ASO configuration must include `storage.azure.com/*` as a one of the configured CRD patterns. See [CRD Management in ASO](https://azure.github.io/azure-service-operator/guide/crd-management/) for details on doing this for both [Helm](https://azure.github.io/azure-service-operator/guide/crd-management/#helm) and [YAML](https://azure.github.io/azure-service-operator/guide/crd-management/#yaml) based installations. +### Next Release + +Development of these new resources is complete and they will be available in the next release of ASO. + +| Resource | ARM Version | CRD Version | Supported From | Sample | +|--------------------------------------|-------------|---------------|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------| +| StorageAccount | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccount.yaml) | +| StorageAccountsBlobService | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsblobservice.yaml) | +| StorageAccountsBlobServicesContainer | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsblobservicescontainer.yaml) | +| StorageAccountsFileService | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsfileservice.yaml) | +| StorageAccountsFileServicesShare | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsfileservicesshare.yaml) | +| StorageAccountsManagementPolicy | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsmanagementpolicy.yaml) | +| StorageAccountsQueueService | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsqueueservice.yaml) | +| StorageAccountsQueueServicesQueue | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsqueueservicesqueue.yaml) | +| StorageAccountsTableService | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountstableservice.yaml) | +| StorageAccountsTableServicesTable | 2023-01-01 | v1api20230101 | v2.5.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/storage/v1api20230101/v1api20230101_storageaccountstableservicestable.yaml) | + ### Released These resource(s) are available for use in the current release of ASO. Different versions of a given resource reflect different versions of the Azure ARM API. diff --git a/v2/api/apimanagement/v1api20220801/storage/api_types_gen.go b/v2/api/apimanagement/v1api20220801/storage/api_types_gen.go index 16098ea7864..f14476ecc04 100644 --- a/v2/api/apimanagement/v1api20220801/storage/api_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/storage/api_types_gen.go @@ -156,9 +156,6 @@ type Service_Api_Spec struct { ApiVersionSetReference *genruntime.ResourceReference `armReference:"ApiVersionSetId" json:"apiVersionSetReference,omitempty"` AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"` - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern="^[^*#&+:<>?]+$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/apimanagement/v1api20220801/storage/api_version_set_types_gen.go b/v2/api/apimanagement/v1api20220801/storage/api_version_set_types_gen.go index 0695e56c4e8..578640cdf67 100644 --- a/v2/api/apimanagement/v1api20220801/storage/api_version_set_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/storage/api_version_set_types_gen.go @@ -141,9 +141,6 @@ type ApiVersionSetList struct { // Storage version of v1api20220801.Service_ApiVersionSet_Spec type Service_ApiVersionSet_Spec struct { - // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern="^[^*#&+:<>?]+$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/apimanagement/v1api20220801/storage/backend_types_gen.go b/v2/api/apimanagement/v1api20220801/storage/backend_types_gen.go index d0c26f4a8ca..8caca33ec08 100644 --- a/v2/api/apimanagement/v1api20220801/storage/backend_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/storage/backend_types_gen.go @@ -141,8 +141,6 @@ type BackendList struct { // Storage version of v1api20220801.Service_Backend_Spec type Service_Backend_Spec struct { - // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/apimanagement/v1api20220801/storage/named_value_types_gen.go b/v2/api/apimanagement/v1api20220801/storage/named_value_types_gen.go index efbe9f33feb..12e80b6490a 100644 --- a/v2/api/apimanagement/v1api20220801/storage/named_value_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/storage/named_value_types_gen.go @@ -141,8 +141,6 @@ type NamedValueList struct { // Storage version of v1api20220801.Service_NamedValue_Spec type Service_NamedValue_Spec struct { - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Pattern="^[^*#&+:<>?]+$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/apimanagement/v1api20220801/storage/policy_fragment_types_gen.go b/v2/api/apimanagement/v1api20220801/storage/policy_fragment_types_gen.go index c59377c6cf2..3d9da49bc1f 100644 --- a/v2/api/apimanagement/v1api20220801/storage/policy_fragment_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/storage/policy_fragment_types_gen.go @@ -141,9 +141,6 @@ type PolicyFragmentList struct { // Storage version of v1api20220801.Service_PolicyFragment_Spec type Service_PolicyFragment_Spec struct { - // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern="(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/apimanagement/v1api20220801/storage/product_types_gen.go b/v2/api/apimanagement/v1api20220801/storage/product_types_gen.go index 68f8583077b..7d08dca10ea 100644 --- a/v2/api/apimanagement/v1api20220801/storage/product_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/storage/product_types_gen.go @@ -143,8 +143,6 @@ type ProductList struct { type Service_Product_Spec struct { ApprovalRequired *bool `json:"approvalRequired,omitempty"` - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/apimanagement/v1api20220801/storage/service_types_gen.go b/v2/api/apimanagement/v1api20220801/storage/service_types_gen.go index 9d66295c849..afc04395645 100644 --- a/v2/api/apimanagement/v1api20220801/storage/service_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/storage/service_types_gen.go @@ -143,9 +143,6 @@ type Service_Spec struct { AdditionalLocations []AdditionalLocation `json:"additionalLocations,omitempty"` ApiVersionConstraint *ApiVersionConstraint `json:"apiVersionConstraint,omitempty"` - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern="^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/apimanagement/v1api20220801/storage/structure.txt b/v2/api/apimanagement/v1api20220801/storage/structure.txt index 899c29ad13f..b83f7c69006 100644 --- a/v2/api/apimanagement/v1api20220801/storage/structure.txt +++ b/v2/api/apimanagement/v1api20220801/storage/structure.txt @@ -37,10 +37,7 @@ github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801/stora │ │ │ │ ├── OpenidProviderId: *string │ │ │ │ └── PropertyBag: genruntime.PropertyBag │ │ │ └── PropertyBag: genruntime.PropertyBag -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 256 -│ │ │ ├── Rule 1: MinLength: 1 -│ │ │ └── Rule 2: Pattern: "^[^*#&+:<>?]+$" +│ │ ├── AzureName: string │ │ ├── Contact: *Object (4 properties) │ │ │ ├── Email: *string │ │ │ ├── Name: *string @@ -138,10 +135,7 @@ github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801/stora ├── ApiVersionSet: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801.Service │ ├── Spec: Object (9 properties) -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 80 -│ │ │ ├── Rule 1: MinLength: 1 -│ │ │ └── Rule 2: Pattern: "^[^*#&+:<>?]+$" +│ │ ├── AzureName: string │ │ ├── Description: *string │ │ ├── DisplayName: *string │ │ ├── OriginalVersion: string @@ -164,9 +158,7 @@ github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801/stora ├── Backend: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801.Service │ ├── Spec: Object (13 properties) -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 80 -│ │ │ └── Rule 1: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── Credentials: *Object (6 properties) │ │ │ ├── Authorization: *Object (3 properties) │ │ │ │ ├── Parameter: *string @@ -252,9 +244,7 @@ github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801/stora ├── NamedValue: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801.Service │ ├── Spec: Object (9 properties) -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 256 -│ │ │ └── Rule 1: Pattern: "^[^*#&+:<>?]+$" +│ │ ├── AzureName: string │ │ ├── DisplayName: *string │ │ ├── KeyVault: *Object (4 properties) │ │ │ ├── IdentityClientId: *string @@ -305,10 +295,7 @@ github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801/stora ├── PolicyFragment: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801.Service │ ├── Spec: Object (7 properties) -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 80 -│ │ │ ├── Rule 1: MinLength: 1 -│ │ │ └── Rule 2: Pattern: "(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)" +│ │ ├── AzureName: string │ │ ├── Description: *string │ │ ├── Format: *string │ │ ├── OriginalVersion: string @@ -328,9 +315,7 @@ github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801/stora │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801.Service │ ├── Spec: Object (11 properties) │ │ ├── ApprovalRequired: *bool -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 256 -│ │ │ └── Rule 1: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── Description: *string │ │ ├── DisplayName: *string │ │ ├── OriginalVersion: string @@ -373,10 +358,7 @@ github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801/stora │ │ ├── ApiVersionConstraint: *Object (2 properties) │ │ │ ├── MinApiVersion: *string │ │ │ └── PropertyBag: genruntime.PropertyBag -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ ├── Rule 1: MinLength: 1 -│ │ │ └── Rule 2: Pattern: "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$" +│ │ ├── AzureName: string │ │ ├── Certificates: Object (5 properties)[] │ │ │ ├── Certificate: *Object (7 properties) │ │ │ │ ├── Expiry: *string @@ -569,9 +551,7 @@ github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801/stora ├── Owner: github.com/Azure/azure-service-operator/v2/api/apimanagement/v1api20220801.Service ├── Spec: Object (12 properties) │ ├── AllowTracing: *bool - │ ├── AzureName: Validated (2 rules) - │ │ ├── Rule 0: MaxLength: 256 - │ │ └── Rule 1: Pattern: "^[^*#&+:<>?]+$" + │ ├── AzureName: string │ ├── DisplayName: *string │ ├── OperatorSpec: *Object (2 properties) │ │ ├── PropertyBag: genruntime.PropertyBag diff --git a/v2/api/apimanagement/v1api20220801/storage/subscription_types_gen.go b/v2/api/apimanagement/v1api20220801/storage/subscription_types_gen.go index e20c6da8651..b6a84a867be 100644 --- a/v2/api/apimanagement/v1api20220801/storage/subscription_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/storage/subscription_types_gen.go @@ -143,8 +143,6 @@ type SubscriptionList struct { type Service_Subscription_Spec struct { AllowTracing *bool `json:"allowTracing,omitempty"` - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Pattern="^[^*#&+:<>?]+$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/appconfiguration/v1api20220501/storage/configuration_store_types_gen.go b/v2/api/appconfiguration/v1api20220501/storage/configuration_store_types_gen.go index b48a568806e..190176bbc75 100644 --- a/v2/api/appconfiguration/v1api20220501/storage/configuration_store_types_gen.go +++ b/v2/api/appconfiguration/v1api20220501/storage/configuration_store_types_gen.go @@ -146,9 +146,6 @@ const APIVersion_Value = APIVersion("2022-05-01") // Storage version of v1api20220501.ConfigurationStore_Spec type ConfigurationStore_Spec struct { - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=5 - // +kubebuilder:validation:Pattern="^[a-zA-Z0-9_-]*$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/appconfiguration/v1api20220501/storage/structure.txt b/v2/api/appconfiguration/v1api20220501/storage/structure.txt index 0c83d5a3588..aa61b2a8ccf 100644 --- a/v2/api/appconfiguration/v1api20220501/storage/structure.txt +++ b/v2/api/appconfiguration/v1api20220501/storage/structure.txt @@ -5,10 +5,7 @@ github.com/Azure/azure-service-operator/v2/api/appconfiguration/v1api20220501/st └── ConfigurationStore: Resource ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup ├── Spec: Object (16 properties) - │ ├── AzureName: Validated (3 rules) - │ │ ├── Rule 0: MaxLength: 50 - │ │ ├── Rule 1: MinLength: 5 - │ │ └── Rule 2: Pattern: "^[a-zA-Z0-9_-]*$" + │ ├── AzureName: string │ ├── CreateMode: *string │ ├── DisableLocalAuth: *bool │ ├── EnablePurgeProtection: *bool diff --git a/v2/api/batch/v1api20210101/storage/batch_account_types_gen.go b/v2/api/batch/v1api20210101/storage/batch_account_types_gen.go index 08bbcbe3812..032d1a1d8fe 100644 --- a/v2/api/batch/v1api20210101/storage/batch_account_types_gen.go +++ b/v2/api/batch/v1api20210101/storage/batch_account_types_gen.go @@ -148,9 +148,6 @@ const APIVersion_Value = APIVersion("2021-01-01") type BatchAccount_Spec struct { AutoStorage *AutoStorageBaseProperties `json:"autoStorage,omitempty"` - // +kubebuilder:validation:MaxLength=24 - // +kubebuilder:validation:MinLength=3 - // +kubebuilder:validation:Pattern="^[a-z0-9]+$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/batch/v1api20210101/storage/structure.txt b/v2/api/batch/v1api20210101/storage/structure.txt index b4e8c359cd7..071c3d45c4f 100644 --- a/v2/api/batch/v1api20210101/storage/structure.txt +++ b/v2/api/batch/v1api20210101/storage/structure.txt @@ -8,10 +8,7 @@ github.com/Azure/azure-service-operator/v2/api/batch/v1api20210101/storage │ ├── AutoStorage: *Object (2 properties) │ │ ├── PropertyBag: genruntime.PropertyBag │ │ └── StorageAccountReference: *genruntime.ResourceReference - │ ├── AzureName: Validated (3 rules) - │ │ ├── Rule 0: MaxLength: 24 - │ │ ├── Rule 1: MinLength: 3 - │ │ └── Rule 2: Pattern: "^[a-z0-9]+$" + │ ├── AzureName: string │ ├── Encryption: *Object (3 properties) │ │ ├── KeySource: *string │ │ ├── KeyVaultProperties: *Object (2 properties) diff --git a/v2/api/containerregistry/v1api20210901/storage/registry_types_gen.go b/v2/api/containerregistry/v1api20210901/storage/registry_types_gen.go index fc3e754ff1b..5c1586d692c 100644 --- a/v2/api/containerregistry/v1api20210901/storage/registry_types_gen.go +++ b/v2/api/containerregistry/v1api20210901/storage/registry_types_gen.go @@ -148,9 +148,6 @@ const APIVersion_Value = APIVersion("2021-09-01") type Registry_Spec struct { AdminUserEnabled *bool `json:"adminUserEnabled,omitempty"` - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=5 - // +kubebuilder:validation:Pattern="^[a-zA-Z0-9]*$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/containerregistry/v1api20210901/storage/structure.txt b/v2/api/containerregistry/v1api20210901/storage/structure.txt index 223ce6ade0c..fd37e1fd30c 100644 --- a/v2/api/containerregistry/v1api20210901/storage/structure.txt +++ b/v2/api/containerregistry/v1api20210901/storage/structure.txt @@ -6,10 +6,7 @@ github.com/Azure/azure-service-operator/v2/api/containerregistry/v1api20210901/s ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup ├── Spec: Object (16 properties) │ ├── AdminUserEnabled: *bool - │ ├── AzureName: Validated (3 rules) - │ │ ├── Rule 0: MaxLength: 50 - │ │ ├── Rule 1: MinLength: 5 - │ │ └── Rule 2: Pattern: "^[a-zA-Z0-9]*$" + │ ├── AzureName: string │ ├── DataEndpointEnabled: *bool │ ├── Encryption: *Object (3 properties) │ │ ├── KeyVaultProperties: *Object (3 properties) diff --git a/v2/api/containerservice/v1api20210501/storage/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20210501/storage/managed_cluster_types_gen.go index 8eccdca37f9..75188244ead 100644 --- a/v2/api/containerservice/v1api20210501/storage/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20210501/storage/managed_cluster_types_gen.go @@ -246,9 +246,6 @@ type ManagedCluster_Spec struct { AutoScalerProfile *ManagedClusterProperties_AutoScalerProfile `json:"autoScalerProfile,omitempty"` AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"` - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern="^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/containerservice/v1api20210501/storage/structure.txt b/v2/api/containerservice/v1api20210501/storage/structure.txt index 604579bbb8c..5b7d7bd876e 100644 --- a/v2/api/containerservice/v1api20210501/storage/structure.txt +++ b/v2/api/containerservice/v1api20210501/storage/structure.txt @@ -130,10 +130,7 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20210501/st │ │ ├── AutoUpgradeProfile: *Object (2 properties) │ │ │ ├── PropertyBag: genruntime.PropertyBag │ │ │ └── UpgradeChannel: *string -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 63 -│ │ │ ├── Rule 1: MinLength: 1 -│ │ │ └── Rule 2: Pattern: "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" +│ │ ├── AzureName: string │ │ ├── DisableLocalAccounts: *bool │ │ ├── DiskEncryptionSetIDReference: *genruntime.ResourceReference │ │ ├── DnsPrefix: *string diff --git a/v2/api/containerservice/v1api20230201/storage/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20230201/storage/managed_cluster_types_gen.go index 8bd28ac0a96..f83d6555a74 100644 --- a/v2/api/containerservice/v1api20230201/storage/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20230201/storage/managed_cluster_types_gen.go @@ -178,9 +178,6 @@ type ManagedCluster_Spec struct { AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"` AzureMonitorProfile *ManagedClusterAzureMonitorProfile `json:"azureMonitorProfile,omitempty"` - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern="^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/containerservice/v1api20230201/storage/structure.txt b/v2/api/containerservice/v1api20230201/storage/structure.txt index db693572341..2717c9efb91 100644 --- a/v2/api/containerservice/v1api20230201/storage/structure.txt +++ b/v2/api/containerservice/v1api20230201/storage/structure.txt @@ -149,10 +149,7 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230201/st │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag │ │ │ │ └── PropertyBag: genruntime.PropertyBag │ │ │ └── PropertyBag: genruntime.PropertyBag -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 63 -│ │ │ ├── Rule 1: MinLength: 1 -│ │ │ └── Rule 2: Pattern: "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" +│ │ ├── AzureName: string │ │ ├── DisableLocalAccounts: *bool │ │ ├── DiskEncryptionSetReference: *genruntime.ResourceReference │ │ ├── DnsPrefix: *string diff --git a/v2/api/containerservice/v1api20230202preview/storage/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20230202preview/storage/managed_cluster_types_gen.go index 12da246f65c..c10b184ad7b 100644 --- a/v2/api/containerservice/v1api20230202preview/storage/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20230202preview/storage/managed_cluster_types_gen.go @@ -271,9 +271,6 @@ type ManagedCluster_Spec struct { AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"` AzureMonitorProfile *ManagedClusterAzureMonitorProfile `json:"azureMonitorProfile,omitempty"` - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern="^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/containerservice/v1api20230202preview/storage/structure.txt b/v2/api/containerservice/v1api20230202preview/storage/structure.txt index cde066dedad..ac95abc0fa1 100644 --- a/v2/api/containerservice/v1api20230202preview/storage/structure.txt +++ b/v2/api/containerservice/v1api20230202preview/storage/structure.txt @@ -170,10 +170,7 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202pre │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag │ │ │ │ └── PropertyBag: genruntime.PropertyBag │ │ │ └── PropertyBag: genruntime.PropertyBag -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 63 -│ │ │ ├── Rule 1: MinLength: 1 -│ │ │ └── Rule 2: Pattern: "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" +│ │ ├── AzureName: string │ │ ├── CreationData: *Object (2 properties) │ │ │ ├── PropertyBag: genruntime.PropertyBag │ │ │ └── SourceResourceReference: *genruntime.ResourceReference @@ -1105,10 +1102,7 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202pre ├── TrustedAccessRoleBinding: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202preview.ManagedCluster │ ├── Spec: Object (6 properties) -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 24 -│ │ │ ├── Rule 1: MinLength: 1 -│ │ │ └── Rule 2: Pattern: "^([A-Za-z0-9-])+$" +│ │ ├── AzureName: string │ │ ├── OriginalVersion: string │ │ ├── Owner: *genruntime.KnownResourceReference │ │ ├── PropertyBag: genruntime.PropertyBag diff --git a/v2/api/containerservice/v1api20230202preview/storage/trusted_access_role_binding_types_gen.go b/v2/api/containerservice/v1api20230202preview/storage/trusted_access_role_binding_types_gen.go index 44dc9c502e5..a218fec677a 100644 --- a/v2/api/containerservice/v1api20230202preview/storage/trusted_access_role_binding_types_gen.go +++ b/v2/api/containerservice/v1api20230202preview/storage/trusted_access_role_binding_types_gen.go @@ -140,9 +140,6 @@ type TrustedAccessRoleBindingList struct { // Storage version of v1api20230202preview.ManagedClusters_TrustedAccessRoleBinding_Spec type ManagedClusters_TrustedAccessRoleBinding_Spec struct { - // +kubebuilder:validation:MaxLength=24 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern="^([A-Za-z0-9-])+$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/containerservice/v1api20230315preview/storage/fleet_types_gen.go b/v2/api/containerservice/v1api20230315preview/storage/fleet_types_gen.go index 6293ea39733..57adc2f0a2c 100644 --- a/v2/api/containerservice/v1api20230315preview/storage/fleet_types_gen.go +++ b/v2/api/containerservice/v1api20230315preview/storage/fleet_types_gen.go @@ -147,9 +147,6 @@ const APIVersion_Value = APIVersion("2023-03-15-preview") // Storage version of v1api20230315preview.Fleet_Spec type Fleet_Spec struct { - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/containerservice/v1api20230315preview/storage/fleets_member_types_gen.go b/v2/api/containerservice/v1api20230315preview/storage/fleets_member_types_gen.go index a366318e6a0..a77343d6582 100644 --- a/v2/api/containerservice/v1api20230315preview/storage/fleets_member_types_gen.go +++ b/v2/api/containerservice/v1api20230315preview/storage/fleets_member_types_gen.go @@ -140,9 +140,6 @@ type FleetsMemberList struct { // Storage version of v1api20230315preview.Fleets_Member_Spec type Fleets_Member_Spec struct { - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/containerservice/v1api20230315preview/storage/fleets_update_run_types_gen.go b/v2/api/containerservice/v1api20230315preview/storage/fleets_update_run_types_gen.go index 775c0634578..976a5dd2efe 100644 --- a/v2/api/containerservice/v1api20230315preview/storage/fleets_update_run_types_gen.go +++ b/v2/api/containerservice/v1api20230315preview/storage/fleets_update_run_types_gen.go @@ -141,9 +141,6 @@ type FleetsUpdateRunList struct { // Storage version of v1api20230315preview.Fleets_UpdateRun_Spec type Fleets_UpdateRun_Spec struct { - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/containerservice/v1api20230315preview/storage/structure.txt b/v2/api/containerservice/v1api20230315preview/storage/structure.txt index bc39362e8e1..93e1dd78122 100644 --- a/v2/api/containerservice/v1api20230315preview/storage/structure.txt +++ b/v2/api/containerservice/v1api20230315preview/storage/structure.txt @@ -5,10 +5,7 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230315pre ├── Fleet: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup │ ├── Spec: Object (8 properties) -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 63 -│ │ │ ├── Rule 1: MinLength: 1 -│ │ │ └── Rule 2: Pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" +│ │ ├── AzureName: string │ │ ├── HubProfile: *Object (2 properties) │ │ │ ├── DnsPrefix: *string │ │ │ └── PropertyBag: genruntime.PropertyBag @@ -48,10 +45,7 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230315pre ├── FleetsMember: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230315preview.Fleet │ ├── Spec: Object (6 properties) -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ ├── Rule 1: MinLength: 1 -│ │ │ └── Rule 2: Pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" +│ │ ├── AzureName: string │ │ ├── ClusterResourceReference: *genruntime.ResourceReference │ │ ├── Group: *string │ │ ├── OriginalVersion: string @@ -78,10 +72,7 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230315pre ├── FleetsUpdateRun: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230315preview.Fleet │ ├── Spec: Object (6 properties) -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ ├── Rule 1: MinLength: 1 -│ │ │ └── Rule 2: Pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" +│ │ ├── AzureName: string │ │ ├── ManagedClusterUpdate: *Object (2 properties) │ │ │ ├── PropertyBag: genruntime.PropertyBag │ │ │ └── Upgrade: *Object (3 properties) diff --git a/v2/api/datafactory/v1api20180601/storage/factory_types_gen.go b/v2/api/datafactory/v1api20180601/storage/factory_types_gen.go index f46f2f7bf27..f814062cd7b 100644 --- a/v2/api/datafactory/v1api20180601/storage/factory_types_gen.go +++ b/v2/api/datafactory/v1api20180601/storage/factory_types_gen.go @@ -149,9 +149,6 @@ const APIVersion_Value = APIVersion("2018-06-01") type Factory_Spec struct { AdditionalProperties map[string]v1.JSON `json:"additionalProperties,omitempty"` - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=3 - // +kubebuilder:validation:Pattern="^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/datafactory/v1api20180601/storage/structure.txt b/v2/api/datafactory/v1api20180601/storage/structure.txt index b81191b08ea..40ab9da8f66 100644 --- a/v2/api/datafactory/v1api20180601/storage/structure.txt +++ b/v2/api/datafactory/v1api20180601/storage/structure.txt @@ -6,10 +6,7 @@ github.com/Azure/azure-service-operator/v2/api/datafactory/v1api20180601/storage ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup ├── Spec: Object (13 properties) │ ├── AdditionalProperties: map[string]v1.JSON - │ ├── AzureName: Validated (3 rules) - │ │ ├── Rule 0: MaxLength: 63 - │ │ ├── Rule 1: MinLength: 3 - │ │ └── Rule 2: Pattern: "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$" + │ ├── AzureName: string │ ├── Encryption: *Object (5 properties) │ │ ├── Identity: *Object (2 properties) │ │ │ ├── PropertyBag: genruntime.PropertyBag diff --git a/v2/api/dbformysql/v1api20220101/storage/flexible_servers_configuration_types_gen.go b/v2/api/dbformysql/v1api20220101/storage/flexible_servers_configuration_types_gen.go index 9106581d793..d4afb3bb2ec 100644 --- a/v2/api/dbformysql/v1api20220101/storage/flexible_servers_configuration_types_gen.go +++ b/v2/api/dbformysql/v1api20220101/storage/flexible_servers_configuration_types_gen.go @@ -139,7 +139,6 @@ type FlexibleServersConfigurationList struct { // Storage version of v1api20220101.FlexibleServers_Configuration_Spec type FlexibleServers_Configuration_Spec struct { - // +kubebuilder:validation:Pattern="^[a-zA-Z0-9_.-]+$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/dbformysql/v1api20220101/storage/structure.txt b/v2/api/dbformysql/v1api20220101/storage/structure.txt index 372a49ada5c..53f697bd3a6 100644 --- a/v2/api/dbformysql/v1api20220101/storage/structure.txt +++ b/v2/api/dbformysql/v1api20220101/storage/structure.txt @@ -37,8 +37,7 @@ github.com/Azure/azure-service-operator/v2/api/dbformysql/v1api20220101/storage └── FlexibleServersConfiguration: Resource ├── Owner: github.com/Azure/azure-service-operator/v2/api/dbformysql/v1api20220101.FlexibleServer ├── Spec: Object (7 properties) - │ ├── AzureName: Validated (1 rule) - │ │ └── Rule 0: Pattern: "^[a-zA-Z0-9_.-]+$" + │ ├── AzureName: string │ ├── CurrentValue: *string │ ├── OriginalVersion: string │ ├── Owner: *genruntime.KnownResourceReference diff --git a/v2/api/documentdb/v1api20210515/storage/database_account_types_gen.go b/v2/api/documentdb/v1api20210515/storage/database_account_types_gen.go index 3f6b66e58f1..6e2e9eca7d2 100644 --- a/v2/api/documentdb/v1api20210515/storage/database_account_types_gen.go +++ b/v2/api/documentdb/v1api20210515/storage/database_account_types_gen.go @@ -149,9 +149,6 @@ type DatabaseAccount_Spec struct { AnalyticalStorageConfiguration *AnalyticalStorageConfiguration `json:"analyticalStorageConfiguration,omitempty"` ApiProperties *ApiProperties `json:"apiProperties,omitempty"` - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=3 - // +kubebuilder:validation:Pattern="^[a-z0-9]+(-[a-z0-9]+)*" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/documentdb/v1api20210515/storage/structure.txt b/v2/api/documentdb/v1api20210515/storage/structure.txt index 9aab8528249..da4b2c31a20 100644 --- a/v2/api/documentdb/v1api20210515/storage/structure.txt +++ b/v2/api/documentdb/v1api20210515/storage/structure.txt @@ -11,10 +11,7 @@ github.com/Azure/azure-service-operator/v2/api/documentdb/v1api20210515/storage │ │ ├── ApiProperties: *Object (2 properties) │ │ │ ├── PropertyBag: genruntime.PropertyBag │ │ │ └── ServerVersion: *string -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ ├── Rule 1: MinLength: 3 -│ │ │ └── Rule 2: Pattern: "^[a-z0-9]+(-[a-z0-9]+)*" +│ │ ├── AzureName: string │ │ ├── BackupPolicy: *Object (3 properties) │ │ │ ├── Continuous: *Object (2 properties) │ │ │ │ ├── PropertyBag: genruntime.PropertyBag diff --git a/v2/api/eventhub/v1api20211101/storage/namespace_types_gen.go b/v2/api/eventhub/v1api20211101/storage/namespace_types_gen.go index 6abcabd1e72..f7d0fb4d1fd 100644 --- a/v2/api/eventhub/v1api20211101/storage/namespace_types_gen.go +++ b/v2/api/eventhub/v1api20211101/storage/namespace_types_gen.go @@ -148,9 +148,6 @@ const APIVersion_Value = APIVersion("2021-11-01") type Namespace_Spec struct { AlternateName *string `json:"alternateName,omitempty"` - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=6 - // +kubebuilder:validation:Pattern="^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/eventhub/v1api20211101/storage/namespaces_authorization_rule_types_gen.go b/v2/api/eventhub/v1api20211101/storage/namespaces_authorization_rule_types_gen.go index b827797c652..94a156cded6 100644 --- a/v2/api/eventhub/v1api20211101/storage/namespaces_authorization_rule_types_gen.go +++ b/v2/api/eventhub/v1api20211101/storage/namespaces_authorization_rule_types_gen.go @@ -140,7 +140,6 @@ type NamespacesAuthorizationRuleList struct { // Storage version of v1api20211101.Namespaces_AuthorizationRule_Spec type Namespaces_AuthorizationRule_Spec struct { - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/eventhub/v1api20211101/storage/namespaces_eventhub_types_gen.go b/v2/api/eventhub/v1api20211101/storage/namespaces_eventhub_types_gen.go index 7ad9d3cb7c4..97bec1cec9e 100644 --- a/v2/api/eventhub/v1api20211101/storage/namespaces_eventhub_types_gen.go +++ b/v2/api/eventhub/v1api20211101/storage/namespaces_eventhub_types_gen.go @@ -140,8 +140,6 @@ type NamespacesEventhubList struct { // Storage version of v1api20211101.Namespaces_Eventhub_Spec type Namespaces_Eventhub_Spec struct { - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/eventhub/v1api20211101/storage/namespaces_eventhubs_authorization_rule_types_gen.go b/v2/api/eventhub/v1api20211101/storage/namespaces_eventhubs_authorization_rule_types_gen.go index 4d02251f752..94f3104308f 100644 --- a/v2/api/eventhub/v1api20211101/storage/namespaces_eventhubs_authorization_rule_types_gen.go +++ b/v2/api/eventhub/v1api20211101/storage/namespaces_eventhubs_authorization_rule_types_gen.go @@ -140,7 +140,6 @@ type NamespacesEventhubsAuthorizationRuleList struct { // Storage version of v1api20211101.Namespaces_Eventhubs_AuthorizationRule_Spec type Namespaces_Eventhubs_AuthorizationRule_Spec struct { - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/eventhub/v1api20211101/storage/namespaces_eventhubs_consumer_group_types_gen.go b/v2/api/eventhub/v1api20211101/storage/namespaces_eventhubs_consumer_group_types_gen.go index 80fab37a82b..edc32df3c0f 100644 --- a/v2/api/eventhub/v1api20211101/storage/namespaces_eventhubs_consumer_group_types_gen.go +++ b/v2/api/eventhub/v1api20211101/storage/namespaces_eventhubs_consumer_group_types_gen.go @@ -140,8 +140,6 @@ type NamespacesEventhubsConsumerGroupList struct { // Storage version of v1api20211101.Namespaces_Eventhubs_Consumergroup_Spec type Namespaces_Eventhubs_Consumergroup_Spec struct { - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/eventhub/v1api20211101/storage/structure.txt b/v2/api/eventhub/v1api20211101/storage/structure.txt index 05db7765bfd..e182c7723a1 100644 --- a/v2/api/eventhub/v1api20211101/storage/structure.txt +++ b/v2/api/eventhub/v1api20211101/storage/structure.txt @@ -6,10 +6,7 @@ github.com/Azure/azure-service-operator/v2/api/eventhub/v1api20211101/storage │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup │ ├── Spec: Object (16 properties) │ │ ├── AlternateName: *string -│ │ ├── AzureName: Validated (3 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ ├── Rule 1: MinLength: 6 -│ │ │ └── Rule 2: Pattern: "^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$" +│ │ ├── AzureName: string │ │ ├── ClusterArmReference: *genruntime.ResourceReference │ │ ├── DisableLocalAuth: *bool │ │ ├── Encryption: *Object (4 properties) @@ -105,8 +102,7 @@ github.com/Azure/azure-service-operator/v2/api/eventhub/v1api20211101/storage ├── NamespacesAuthorizationRule: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/eventhub/v1api20211101.Namespace │ ├── Spec: Object (5 properties) -│ │ ├── AzureName: Validated (1 rule) -│ │ │ └── Rule 0: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── OriginalVersion: string │ │ ├── Owner: *genruntime.KnownResourceReference │ │ ├── PropertyBag: genruntime.PropertyBag @@ -130,9 +126,7 @@ github.com/Azure/azure-service-operator/v2/api/eventhub/v1api20211101/storage ├── NamespacesEventhub: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/eventhub/v1api20211101.Namespace │ ├── Spec: Object (7 properties) -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 256 -│ │ │ └── Rule 1: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── CaptureDescription: *Object (7 properties) │ │ │ ├── Destination: *Object (8 properties) │ │ │ │ ├── ArchiveNameFormat: *string @@ -194,8 +188,7 @@ github.com/Azure/azure-service-operator/v2/api/eventhub/v1api20211101/storage ├── NamespacesEventhubsAuthorizationRule: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/eventhub/v1api20211101.NamespacesEventhub │ ├── Spec: Object (5 properties) -│ │ ├── AzureName: Validated (1 rule) -│ │ │ └── Rule 0: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── OriginalVersion: string │ │ ├── Owner: *genruntime.KnownResourceReference │ │ ├── PropertyBag: genruntime.PropertyBag @@ -219,9 +212,7 @@ github.com/Azure/azure-service-operator/v2/api/eventhub/v1api20211101/storage └── NamespacesEventhubsConsumerGroup: Resource ├── Owner: github.com/Azure/azure-service-operator/v2/api/eventhub/v1api20211101.NamespacesEventhub ├── Spec: Object (5 properties) - │ ├── AzureName: Validated (2 rules) - │ │ ├── Rule 0: MaxLength: 50 - │ │ └── Rule 1: MinLength: 1 + │ ├── AzureName: string │ ├── OriginalVersion: string │ ├── Owner: *genruntime.KnownResourceReference │ ├── PropertyBag: genruntime.PropertyBag diff --git a/v2/api/keyvault/v1api20210401preview/storage/structure.txt b/v2/api/keyvault/v1api20210401preview/storage/structure.txt index 5011aa42877..cd67ed95ed7 100644 --- a/v2/api/keyvault/v1api20210401preview/storage/structure.txt +++ b/v2/api/keyvault/v1api20210401preview/storage/structure.txt @@ -5,8 +5,7 @@ github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20210401preview/sto ├── Vault: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup │ ├── Spec: Object (7 properties) -│ │ ├── AzureName: Validated (1 rule) -│ │ │ └── Rule 0: Pattern: "^[a-zA-Z0-9-]{3,24}$" +│ │ ├── AzureName: string │ │ ├── Location: *string │ │ ├── OriginalVersion: string │ │ ├── Owner: *genruntime.KnownResourceReference diff --git a/v2/api/keyvault/v1api20210401preview/storage/vault_types_gen.go b/v2/api/keyvault/v1api20210401preview/storage/vault_types_gen.go index 3429b8561fd..d5402fe2daa 100644 --- a/v2/api/keyvault/v1api20210401preview/storage/vault_types_gen.go +++ b/v2/api/keyvault/v1api20210401preview/storage/vault_types_gen.go @@ -239,7 +239,6 @@ type augmentConversionForVault interface { // Storage version of v1api20210401preview.Vault_Spec type Vault_Spec struct { - // +kubebuilder:validation:Pattern="^[a-zA-Z0-9-]{3,24}$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/keyvault/v1api20230701/storage/structure.txt b/v2/api/keyvault/v1api20230701/storage/structure.txt index 3d9db9d131c..b6a0a8d54a6 100644 --- a/v2/api/keyvault/v1api20230701/storage/structure.txt +++ b/v2/api/keyvault/v1api20230701/storage/structure.txt @@ -5,8 +5,7 @@ github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20230701/storage └── Vault: Resource ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup ├── Spec: Object (7 properties) - │ ├── AzureName: Validated (1 rule) - │ │ └── Rule 0: Pattern: "^[a-zA-Z0-9-]{3,24}$" + │ ├── AzureName: string │ ├── Location: *string │ ├── OriginalVersion: string │ ├── Owner: *genruntime.KnownResourceReference diff --git a/v2/api/keyvault/v1api20230701/storage/vault_types_gen.go b/v2/api/keyvault/v1api20230701/storage/vault_types_gen.go index 0314039a383..20c8857f738 100644 --- a/v2/api/keyvault/v1api20230701/storage/vault_types_gen.go +++ b/v2/api/keyvault/v1api20230701/storage/vault_types_gen.go @@ -146,7 +146,6 @@ const APIVersion_Value = APIVersion("2023-07-01") // Storage version of v1api20230701.Vault_Spec type Vault_Spec struct { - // +kubebuilder:validation:Pattern="^[a-zA-Z0-9-]{3,24}$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/managedidentity/v1api20230131/storage/federated_identity_credential_types_gen.go b/v2/api/managedidentity/v1api20230131/storage/federated_identity_credential_types_gen.go index 49dde775ec1..f0f29b63f4d 100644 --- a/v2/api/managedidentity/v1api20230131/storage/federated_identity_credential_types_gen.go +++ b/v2/api/managedidentity/v1api20230131/storage/federated_identity_credential_types_gen.go @@ -148,7 +148,6 @@ const APIVersion_Value = APIVersion("2023-01-31") type UserAssignedIdentities_FederatedIdentityCredential_Spec struct { Audiences []string `json:"audiences,omitempty"` - // +kubebuilder:validation:Pattern="^[a-zA-Z0-9]{1}[a-zA-Z0-9-_]{2,119}$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/managedidentity/v1api20230131/storage/structure.txt b/v2/api/managedidentity/v1api20230131/storage/structure.txt index 4b15be60939..e9585dc1800 100644 --- a/v2/api/managedidentity/v1api20230131/storage/structure.txt +++ b/v2/api/managedidentity/v1api20230131/storage/structure.txt @@ -6,8 +6,7 @@ github.com/Azure/azure-service-operator/v2/api/managedidentity/v1api20230131/sto │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/managedidentity/v1api20230131.UserAssignedIdentity │ ├── Spec: Object (9 properties) │ │ ├── Audiences: string[] -│ │ ├── AzureName: Validated (1 rule) -│ │ │ └── Rule 0: Pattern: "^[a-zA-Z0-9]{1}[a-zA-Z0-9-_]{2,119}$" +│ │ ├── AzureName: string │ │ ├── Issuer: *string │ │ ├── IssuerFromConfig: *genruntime.ConfigMapReference │ │ ├── OriginalVersion: string diff --git a/v2/api/operationalinsights/v1api20210601/storage/structure.txt b/v2/api/operationalinsights/v1api20210601/storage/structure.txt index f4487505e0b..5bb11f6deee 100644 --- a/v2/api/operationalinsights/v1api20210601/storage/structure.txt +++ b/v2/api/operationalinsights/v1api20210601/storage/structure.txt @@ -5,10 +5,7 @@ github.com/Azure/azure-service-operator/v2/api/operationalinsights/v1api20210601 └── Workspace: Resource ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup ├── Spec: Object (15 properties) - │ ├── AzureName: Validated (3 rules) - │ │ ├── Rule 0: MaxLength: 63 - │ │ ├── Rule 1: MinLength: 4 - │ │ └── Rule 2: Pattern: "^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$" + │ ├── AzureName: string │ ├── Etag: *string │ ├── Features: *Object (6 properties) │ │ ├── ClusterResourceReference: *genruntime.ResourceReference diff --git a/v2/api/operationalinsights/v1api20210601/storage/workspace_types_gen.go b/v2/api/operationalinsights/v1api20210601/storage/workspace_types_gen.go index 92c1d891a40..391b70f7bce 100644 --- a/v2/api/operationalinsights/v1api20210601/storage/workspace_types_gen.go +++ b/v2/api/operationalinsights/v1api20210601/storage/workspace_types_gen.go @@ -146,9 +146,6 @@ const APIVersion_Value = APIVersion("2021-06-01") // Storage version of v1api20210601.Workspace_Spec type Workspace_Spec struct { - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=4 - // +kubebuilder:validation:Pattern="^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/resources/v1api20200601/storage/resource_group_types_gen.go b/v2/api/resources/v1api20200601/storage/resource_group_types_gen.go index baeb8297dc8..5d5f11ea168 100644 --- a/v2/api/resources/v1api20200601/storage/resource_group_types_gen.go +++ b/v2/api/resources/v1api20200601/storage/resource_group_types_gen.go @@ -156,8 +156,6 @@ const APIVersion_Value = APIVersion("2020-06-01") // Storage version of v1api20200601.ResourceGroup_Spec type ResourceGroup_Spec struct { - // +kubebuilder:validation:MaxLength=90 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/resources/v1api20200601/storage/structure.txt b/v2/api/resources/v1api20200601/storage/structure.txt index ea1f316514e..194f64bea9a 100644 --- a/v2/api/resources/v1api20200601/storage/structure.txt +++ b/v2/api/resources/v1api20200601/storage/structure.txt @@ -4,9 +4,7 @@ github.com/Azure/azure-service-operator/v2/api/resources/v1api20200601/storage │ └── "2020-06-01" └── ResourceGroup: Resource ├── Spec: Object (6 properties) - │ ├── AzureName: Validated (2 rules) - │ │ ├── Rule 0: MaxLength: 90 - │ │ └── Rule 1: MinLength: 1 + │ ├── AzureName: string │ ├── Location: *string │ ├── ManagedBy: *string │ ├── OriginalVersion: string diff --git a/v2/api/servicebus/v1api20210101preview/storage/namespaces_authorization_rule_types_gen.go b/v2/api/servicebus/v1api20210101preview/storage/namespaces_authorization_rule_types_gen.go index 072dff095f1..1c993b0adda 100644 --- a/v2/api/servicebus/v1api20210101preview/storage/namespaces_authorization_rule_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/storage/namespaces_authorization_rule_types_gen.go @@ -233,8 +233,6 @@ type augmentConversionForNamespacesAuthorizationRule interface { // Storage version of v1api20210101preview.Namespaces_AuthorizationRule_Spec type Namespaces_AuthorizationRule_Spec struct { - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20210101preview/storage/namespaces_queue_types_gen.go b/v2/api/servicebus/v1api20210101preview/storage/namespaces_queue_types_gen.go index 94d872a9d1e..a8b0740e890 100644 --- a/v2/api/servicebus/v1api20210101preview/storage/namespaces_queue_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/storage/namespaces_queue_types_gen.go @@ -235,7 +235,6 @@ type augmentConversionForNamespacesQueue interface { type Namespaces_Queue_Spec struct { AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20210101preview/storage/namespaces_topic_types_gen.go b/v2/api/servicebus/v1api20210101preview/storage/namespaces_topic_types_gen.go index a9fad5c6001..ebf66f34892 100644 --- a/v2/api/servicebus/v1api20210101preview/storage/namespaces_topic_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/storage/namespaces_topic_types_gen.go @@ -235,7 +235,6 @@ type augmentConversionForNamespacesTopic interface { type Namespaces_Topic_Spec struct { AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20210101preview/storage/namespaces_topics_subscription_types_gen.go b/v2/api/servicebus/v1api20210101preview/storage/namespaces_topics_subscription_types_gen.go index 187cc1f5e99..71767c01f61 100644 --- a/v2/api/servicebus/v1api20210101preview/storage/namespaces_topics_subscription_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/storage/namespaces_topics_subscription_types_gen.go @@ -235,8 +235,6 @@ type augmentConversionForNamespacesTopicsSubscription interface { type Namespaces_Topics_Subscription_Spec struct { AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20210101preview/storage/namespaces_topics_subscriptions_rule_types_gen.go b/v2/api/servicebus/v1api20210101preview/storage/namespaces_topics_subscriptions_rule_types_gen.go index da2bbe1faf8..16820c0cf63 100644 --- a/v2/api/servicebus/v1api20210101preview/storage/namespaces_topics_subscriptions_rule_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/storage/namespaces_topics_subscriptions_rule_types_gen.go @@ -235,8 +235,6 @@ type augmentConversionForNamespacesTopicsSubscriptionsRule interface { type Namespaces_Topics_Subscriptions_Rule_Spec struct { Action *Action `json:"action,omitempty"` - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20210101preview/storage/structure.txt b/v2/api/servicebus/v1api20210101preview/storage/structure.txt index 9b30544dafa..5bc2922855c 100644 --- a/v2/api/servicebus/v1api20210101preview/storage/structure.txt +++ b/v2/api/servicebus/v1api20210101preview/storage/structure.txt @@ -99,9 +99,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20210101preview/s ├── NamespacesAuthorizationRule: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20210101preview.Namespace │ ├── Spec: Object (6 properties) -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ └── Rule 1: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── OperatorSpec: *Object (2 properties) │ │ │ ├── PropertyBag: genruntime.PropertyBag │ │ │ └── Secrets: *Object (5 properties) @@ -133,8 +131,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20210101preview/s │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20210101preview.Namespace │ ├── Spec: Object (18 properties) │ │ ├── AutoDeleteOnIdle: *string -│ │ ├── AzureName: Validated (1 rule) -│ │ │ └── Rule 0: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── DeadLetteringOnMessageExpiration: *bool │ │ ├── DefaultMessageTimeToLive: *string │ │ ├── DuplicateDetectionHistoryTimeWindow: *string @@ -196,8 +193,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20210101preview/s │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20210101preview.Namespace │ ├── Spec: Object (13 properties) │ │ ├── AutoDeleteOnIdle: *string -│ │ ├── AzureName: Validated (1 rule) -│ │ │ └── Rule 0: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── DefaultMessageTimeToLive: *string │ │ ├── DuplicateDetectionHistoryTimeWindow: *string │ │ ├── EnableBatchedOperations: *bool @@ -249,9 +245,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20210101preview/s │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20210101preview.NamespacesTopic │ ├── Spec: Object (15 properties) │ │ ├── AutoDeleteOnIdle: *string -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ └── Rule 1: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── DeadLetteringOnFilterEvaluationExceptions: *bool │ │ ├── DeadLetteringOnMessageExpiration: *bool │ │ ├── DefaultMessageTimeToLive: *string @@ -310,9 +304,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20210101preview/s │ │ │ ├── PropertyBag: genruntime.PropertyBag │ │ │ ├── RequiresPreprocessing: *bool │ │ │ └── SqlExpression: *string -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ └── Rule 1: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── CorrelationFilter: *Object (11 properties) │ │ │ ├── ContentType: *string │ │ │ ├── CorrelationId: *string diff --git a/v2/api/servicebus/v1api20211101/storage/namespaces_authorization_rule_types_gen.go b/v2/api/servicebus/v1api20211101/storage/namespaces_authorization_rule_types_gen.go index b58c654b09a..a87741d8393 100644 --- a/v2/api/servicebus/v1api20211101/storage/namespaces_authorization_rule_types_gen.go +++ b/v2/api/servicebus/v1api20211101/storage/namespaces_authorization_rule_types_gen.go @@ -140,8 +140,6 @@ type NamespacesAuthorizationRuleList struct { // Storage version of v1api20211101.Namespaces_AuthorizationRule_Spec type Namespaces_AuthorizationRule_Spec struct { - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20211101/storage/namespaces_queue_types_gen.go b/v2/api/servicebus/v1api20211101/storage/namespaces_queue_types_gen.go index c296a7d333d..928bb5f4d1d 100644 --- a/v2/api/servicebus/v1api20211101/storage/namespaces_queue_types_gen.go +++ b/v2/api/servicebus/v1api20211101/storage/namespaces_queue_types_gen.go @@ -142,7 +142,6 @@ type NamespacesQueueList struct { type Namespaces_Queue_Spec struct { AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20211101/storage/namespaces_topic_types_gen.go b/v2/api/servicebus/v1api20211101/storage/namespaces_topic_types_gen.go index 7cd667867dc..09e8b67c580 100644 --- a/v2/api/servicebus/v1api20211101/storage/namespaces_topic_types_gen.go +++ b/v2/api/servicebus/v1api20211101/storage/namespaces_topic_types_gen.go @@ -142,7 +142,6 @@ type NamespacesTopicList struct { type Namespaces_Topic_Spec struct { AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20211101/storage/namespaces_topics_subscription_types_gen.go b/v2/api/servicebus/v1api20211101/storage/namespaces_topics_subscription_types_gen.go index ed10fc761a3..6ccc0486947 100644 --- a/v2/api/servicebus/v1api20211101/storage/namespaces_topics_subscription_types_gen.go +++ b/v2/api/servicebus/v1api20211101/storage/namespaces_topics_subscription_types_gen.go @@ -142,8 +142,6 @@ type NamespacesTopicsSubscriptionList struct { type Namespaces_Topics_Subscription_Spec struct { AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20211101/storage/namespaces_topics_subscriptions_rule_types_gen.go b/v2/api/servicebus/v1api20211101/storage/namespaces_topics_subscriptions_rule_types_gen.go index 3d29675393f..9c13c5b7844 100644 --- a/v2/api/servicebus/v1api20211101/storage/namespaces_topics_subscriptions_rule_types_gen.go +++ b/v2/api/servicebus/v1api20211101/storage/namespaces_topics_subscriptions_rule_types_gen.go @@ -142,8 +142,6 @@ type NamespacesTopicsSubscriptionsRuleList struct { type Namespaces_Topics_Subscriptions_Rule_Spec struct { Action *Action `json:"action,omitempty"` - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20211101/storage/structure.txt b/v2/api/servicebus/v1api20211101/storage/structure.txt index fb2183103a2..0bf7e0621c2 100644 --- a/v2/api/servicebus/v1api20211101/storage/structure.txt +++ b/v2/api/servicebus/v1api20211101/storage/structure.txt @@ -103,9 +103,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20211101/storage ├── NamespacesAuthorizationRule: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20211101.Namespace │ ├── Spec: Object (6 properties) -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ └── Rule 1: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── OperatorSpec: *Object (2 properties) │ │ │ ├── PropertyBag: genruntime.PropertyBag │ │ │ └── Secrets: *Object (5 properties) @@ -138,8 +136,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20211101/storage │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20211101.Namespace │ ├── Spec: Object (19 properties) │ │ ├── AutoDeleteOnIdle: *string -│ │ ├── AzureName: Validated (1 rule) -│ │ │ └── Rule 0: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── DeadLetteringOnMessageExpiration: *bool │ │ ├── DefaultMessageTimeToLive: *string │ │ ├── DuplicateDetectionHistoryTimeWindow: *string @@ -204,8 +201,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20211101/storage │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20211101.Namespace │ ├── Spec: Object (14 properties) │ │ ├── AutoDeleteOnIdle: *string -│ │ ├── AzureName: Validated (1 rule) -│ │ │ └── Rule 0: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── DefaultMessageTimeToLive: *string │ │ ├── DuplicateDetectionHistoryTimeWindow: *string │ │ ├── EnableBatchedOperations: *bool @@ -260,9 +256,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20211101/storage │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20211101.NamespacesTopic │ ├── Spec: Object (17 properties) │ │ ├── AutoDeleteOnIdle: *string -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ └── Rule 1: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── ClientAffineProperties: *Object (4 properties) │ │ │ ├── ClientId: *string │ │ │ ├── IsDurable: *bool @@ -334,9 +328,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20211101/storage │ │ ├── PropertyBag: genruntime.PropertyBag │ │ ├── RequiresPreprocessing: *bool │ │ └── SqlExpression: *string - │ ├── AzureName: Validated (2 rules) - │ │ ├── Rule 0: MaxLength: 50 - │ │ └── Rule 1: MinLength: 1 + │ ├── AzureName: string │ ├── CorrelationFilter: *Object (11 properties) │ │ ├── ContentType: *string │ │ ├── CorrelationId: *string diff --git a/v2/api/servicebus/v1api20221001preview/storage/namespaces_authorization_rule_types_gen.go b/v2/api/servicebus/v1api20221001preview/storage/namespaces_authorization_rule_types_gen.go index 3630de47fd9..0ffe74addbe 100644 --- a/v2/api/servicebus/v1api20221001preview/storage/namespaces_authorization_rule_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/storage/namespaces_authorization_rule_types_gen.go @@ -233,8 +233,6 @@ type augmentConversionForNamespacesAuthorizationRule interface { // Storage version of v1api20221001preview.Namespaces_AuthorizationRule_Spec type Namespaces_AuthorizationRule_Spec struct { - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20221001preview/storage/namespaces_queue_types_gen.go b/v2/api/servicebus/v1api20221001preview/storage/namespaces_queue_types_gen.go index f2fe06b4488..e4afe8fe0d7 100644 --- a/v2/api/servicebus/v1api20221001preview/storage/namespaces_queue_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/storage/namespaces_queue_types_gen.go @@ -235,7 +235,6 @@ type augmentConversionForNamespacesQueue interface { type Namespaces_Queue_Spec struct { AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20221001preview/storage/namespaces_topic_types_gen.go b/v2/api/servicebus/v1api20221001preview/storage/namespaces_topic_types_gen.go index 5cd581a83b4..c32ff8116b2 100644 --- a/v2/api/servicebus/v1api20221001preview/storage/namespaces_topic_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/storage/namespaces_topic_types_gen.go @@ -235,7 +235,6 @@ type augmentConversionForNamespacesTopic interface { type Namespaces_Topic_Spec struct { AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20221001preview/storage/namespaces_topics_subscription_types_gen.go b/v2/api/servicebus/v1api20221001preview/storage/namespaces_topics_subscription_types_gen.go index 01b90945097..6bb0009f7d8 100644 --- a/v2/api/servicebus/v1api20221001preview/storage/namespaces_topics_subscription_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/storage/namespaces_topics_subscription_types_gen.go @@ -235,8 +235,6 @@ type augmentConversionForNamespacesTopicsSubscription interface { type Namespaces_Topics_Subscription_Spec struct { AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20221001preview/storage/namespaces_topics_subscriptions_rule_types_gen.go b/v2/api/servicebus/v1api20221001preview/storage/namespaces_topics_subscriptions_rule_types_gen.go index 333ca0954f1..4f0154aded7 100644 --- a/v2/api/servicebus/v1api20221001preview/storage/namespaces_topics_subscriptions_rule_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/storage/namespaces_topics_subscriptions_rule_types_gen.go @@ -235,8 +235,6 @@ type augmentConversionForNamespacesTopicsSubscriptionsRule interface { type Namespaces_Topics_Subscriptions_Rule_Spec struct { Action *Action `json:"action,omitempty"` - // +kubebuilder:validation:MaxLength=50 - // +kubebuilder:validation:MinLength=1 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/servicebus/v1api20221001preview/storage/structure.txt b/v2/api/servicebus/v1api20221001preview/storage/structure.txt index 7d3e3d522cb..c6d10e5fc78 100644 --- a/v2/api/servicebus/v1api20221001preview/storage/structure.txt +++ b/v2/api/servicebus/v1api20221001preview/storage/structure.txt @@ -109,9 +109,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20221001preview/s ├── NamespacesAuthorizationRule: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20221001preview.Namespace │ ├── Spec: Object (6 properties) -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ └── Rule 1: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── OperatorSpec: *Object (2 properties) │ │ │ ├── PropertyBag: genruntime.PropertyBag │ │ │ └── Secrets: *Object (5 properties) @@ -144,8 +142,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20221001preview/s │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20221001preview.Namespace │ ├── Spec: Object (19 properties) │ │ ├── AutoDeleteOnIdle: *string -│ │ ├── AzureName: Validated (1 rule) -│ │ │ └── Rule 0: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── DeadLetteringOnMessageExpiration: *bool │ │ ├── DefaultMessageTimeToLive: *string │ │ ├── DuplicateDetectionHistoryTimeWindow: *string @@ -210,8 +207,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20221001preview/s │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20221001preview.Namespace │ ├── Spec: Object (14 properties) │ │ ├── AutoDeleteOnIdle: *string -│ │ ├── AzureName: Validated (1 rule) -│ │ │ └── Rule 0: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── DefaultMessageTimeToLive: *string │ │ ├── DuplicateDetectionHistoryTimeWindow: *string │ │ ├── EnableBatchedOperations: *bool @@ -266,9 +262,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20221001preview/s │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20221001preview.NamespacesTopic │ ├── Spec: Object (17 properties) │ │ ├── AutoDeleteOnIdle: *string -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ └── Rule 1: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── ClientAffineProperties: *Object (4 properties) │ │ │ ├── ClientId: *string │ │ │ ├── IsDurable: *bool @@ -340,9 +334,7 @@ github.com/Azure/azure-service-operator/v2/api/servicebus/v1api20221001preview/s │ │ │ ├── PropertyBag: genruntime.PropertyBag │ │ │ ├── RequiresPreprocessing: *bool │ │ │ └── SqlExpression: *string -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 50 -│ │ │ └── Rule 1: MinLength: 1 +│ │ ├── AzureName: string │ │ ├── CorrelationFilter: *Object (11 properties) │ │ │ ├── ContentType: *string │ │ │ ├── CorrelationId: *string diff --git a/v2/api/storage/customizations/storage_account_extension_types_gen.go b/v2/api/storage/customizations/storage_account_extension_types_gen.go index a4163b7ccc9..71f83cf2be7 100644 --- a/v2/api/storage/customizations/storage_account_extension_types_gen.go +++ b/v2/api/storage/customizations/storage_account_extension_types_gen.go @@ -8,6 +8,8 @@ import ( v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" v20220901 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -20,5 +22,7 @@ func (extension *StorageAccountExtension) GetExtendedResources() []genruntime.Ku &v20210401.StorageAccount{}, &v20210401s.StorageAccount{}, &v20220901.StorageAccount{}, - &v20220901s.StorageAccount{}} + &v20220901s.StorageAccount{}, + &v20230101.StorageAccount{}, + &v20230101s.StorageAccount{}} } diff --git a/v2/api/storage/customizations/storage_account_extensions.go b/v2/api/storage/customizations/storage_account_extensions.go index 1e164fc8638..86265438ec4 100644 --- a/v2/api/storage/customizations/storage_account_extensions.go +++ b/v2/api/storage/customizations/storage_account_extensions.go @@ -15,7 +15,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/conversion" - storage "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" . "github.com/Azure/azure-service-operator/v2/internal/logging" "github.com/Azure/azure-service-operator/v2/internal/util/to" diff --git a/v2/api/storage/customizations/storage_accounts_blob_service_extension_types_gen.go b/v2/api/storage/customizations/storage_accounts_blob_service_extension_types_gen.go index dd4d020fdc2..117021f751a 100644 --- a/v2/api/storage/customizations/storage_accounts_blob_service_extension_types_gen.go +++ b/v2/api/storage/customizations/storage_accounts_blob_service_extension_types_gen.go @@ -8,6 +8,8 @@ import ( v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" v20220901 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -20,5 +22,7 @@ func (extension *StorageAccountsBlobServiceExtension) GetExtendedResources() []g &v20210401.StorageAccountsBlobService{}, &v20210401s.StorageAccountsBlobService{}, &v20220901.StorageAccountsBlobService{}, - &v20220901s.StorageAccountsBlobService{}} + &v20220901s.StorageAccountsBlobService{}, + &v20230101.StorageAccountsBlobService{}, + &v20230101s.StorageAccountsBlobService{}} } diff --git a/v2/api/storage/customizations/storage_accounts_blob_services_container_extension_types_gen.go b/v2/api/storage/customizations/storage_accounts_blob_services_container_extension_types_gen.go index cb1f23ea1c3..6c7e22512a5 100644 --- a/v2/api/storage/customizations/storage_accounts_blob_services_container_extension_types_gen.go +++ b/v2/api/storage/customizations/storage_accounts_blob_services_container_extension_types_gen.go @@ -8,6 +8,8 @@ import ( v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" v20220901 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -20,5 +22,7 @@ func (extension *StorageAccountsBlobServicesContainerExtension) GetExtendedResou &v20210401.StorageAccountsBlobServicesContainer{}, &v20210401s.StorageAccountsBlobServicesContainer{}, &v20220901.StorageAccountsBlobServicesContainer{}, - &v20220901s.StorageAccountsBlobServicesContainer{}} + &v20220901s.StorageAccountsBlobServicesContainer{}, + &v20230101.StorageAccountsBlobServicesContainer{}, + &v20230101s.StorageAccountsBlobServicesContainer{}} } diff --git a/v2/api/storage/customizations/storage_accounts_file_service_extension_types_gen.go b/v2/api/storage/customizations/storage_accounts_file_service_extension_types_gen.go index d420aa52961..62c3743161e 100644 --- a/v2/api/storage/customizations/storage_accounts_file_service_extension_types_gen.go +++ b/v2/api/storage/customizations/storage_accounts_file_service_extension_types_gen.go @@ -6,6 +6,8 @@ package customizations import ( v20220901 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -16,5 +18,7 @@ type StorageAccountsFileServiceExtension struct { func (extension *StorageAccountsFileServiceExtension) GetExtendedResources() []genruntime.KubernetesResource { return []genruntime.KubernetesResource{ &v20220901.StorageAccountsFileService{}, - &v20220901s.StorageAccountsFileService{}} + &v20220901s.StorageAccountsFileService{}, + &v20230101.StorageAccountsFileService{}, + &v20230101s.StorageAccountsFileService{}} } diff --git a/v2/api/storage/customizations/storage_accounts_file_services_share_extension_types_gen.go b/v2/api/storage/customizations/storage_accounts_file_services_share_extension_types_gen.go index a493ae8d0f0..202b12dfaff 100644 --- a/v2/api/storage/customizations/storage_accounts_file_services_share_extension_types_gen.go +++ b/v2/api/storage/customizations/storage_accounts_file_services_share_extension_types_gen.go @@ -6,6 +6,8 @@ package customizations import ( v20220901 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -16,5 +18,7 @@ type StorageAccountsFileServicesShareExtension struct { func (extension *StorageAccountsFileServicesShareExtension) GetExtendedResources() []genruntime.KubernetesResource { return []genruntime.KubernetesResource{ &v20220901.StorageAccountsFileServicesShare{}, - &v20220901s.StorageAccountsFileServicesShare{}} + &v20220901s.StorageAccountsFileServicesShare{}, + &v20230101.StorageAccountsFileServicesShare{}, + &v20230101s.StorageAccountsFileServicesShare{}} } diff --git a/v2/api/storage/customizations/storage_accounts_management_policy_extension_types_gen.go b/v2/api/storage/customizations/storage_accounts_management_policy_extension_types_gen.go index 37ffceb31b6..112129de306 100644 --- a/v2/api/storage/customizations/storage_accounts_management_policy_extension_types_gen.go +++ b/v2/api/storage/customizations/storage_accounts_management_policy_extension_types_gen.go @@ -8,6 +8,8 @@ import ( v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" v20220901 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -20,5 +22,7 @@ func (extension *StorageAccountsManagementPolicyExtension) GetExtendedResources( &v20210401.StorageAccountsManagementPolicy{}, &v20210401s.StorageAccountsManagementPolicy{}, &v20220901.StorageAccountsManagementPolicy{}, - &v20220901s.StorageAccountsManagementPolicy{}} + &v20220901s.StorageAccountsManagementPolicy{}, + &v20230101.StorageAccountsManagementPolicy{}, + &v20230101s.StorageAccountsManagementPolicy{}} } diff --git a/v2/api/storage/customizations/storage_accounts_queue_service_extension_types_gen.go b/v2/api/storage/customizations/storage_accounts_queue_service_extension_types_gen.go index ac5ba196954..80c6c4ca54d 100644 --- a/v2/api/storage/customizations/storage_accounts_queue_service_extension_types_gen.go +++ b/v2/api/storage/customizations/storage_accounts_queue_service_extension_types_gen.go @@ -8,6 +8,8 @@ import ( v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" v20220901 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -20,5 +22,7 @@ func (extension *StorageAccountsQueueServiceExtension) GetExtendedResources() [] &v20210401.StorageAccountsQueueService{}, &v20210401s.StorageAccountsQueueService{}, &v20220901.StorageAccountsQueueService{}, - &v20220901s.StorageAccountsQueueService{}} + &v20220901s.StorageAccountsQueueService{}, + &v20230101.StorageAccountsQueueService{}, + &v20230101s.StorageAccountsQueueService{}} } diff --git a/v2/api/storage/customizations/storage_accounts_queue_services_queue_extension_types_gen.go b/v2/api/storage/customizations/storage_accounts_queue_services_queue_extension_types_gen.go index 229970cc69f..a236556cc52 100644 --- a/v2/api/storage/customizations/storage_accounts_queue_services_queue_extension_types_gen.go +++ b/v2/api/storage/customizations/storage_accounts_queue_services_queue_extension_types_gen.go @@ -8,6 +8,8 @@ import ( v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" v20220901 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -20,5 +22,7 @@ func (extension *StorageAccountsQueueServicesQueueExtension) GetExtendedResource &v20210401.StorageAccountsQueueServicesQueue{}, &v20210401s.StorageAccountsQueueServicesQueue{}, &v20220901.StorageAccountsQueueServicesQueue{}, - &v20220901s.StorageAccountsQueueServicesQueue{}} + &v20220901s.StorageAccountsQueueServicesQueue{}, + &v20230101.StorageAccountsQueueServicesQueue{}, + &v20230101s.StorageAccountsQueueServicesQueue{}} } diff --git a/v2/api/storage/customizations/storage_accounts_table_service_extension_types_gen.go b/v2/api/storage/customizations/storage_accounts_table_service_extension_types_gen.go index a229c0b43e1..3bdd6e6870f 100644 --- a/v2/api/storage/customizations/storage_accounts_table_service_extension_types_gen.go +++ b/v2/api/storage/customizations/storage_accounts_table_service_extension_types_gen.go @@ -6,6 +6,8 @@ package customizations import ( v20220901 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -16,5 +18,7 @@ type StorageAccountsTableServiceExtension struct { func (extension *StorageAccountsTableServiceExtension) GetExtendedResources() []genruntime.KubernetesResource { return []genruntime.KubernetesResource{ &v20220901.StorageAccountsTableService{}, - &v20220901s.StorageAccountsTableService{}} + &v20220901s.StorageAccountsTableService{}, + &v20230101.StorageAccountsTableService{}, + &v20230101s.StorageAccountsTableService{}} } diff --git a/v2/api/storage/customizations/storage_accounts_table_services_table_extension_types_gen.go b/v2/api/storage/customizations/storage_accounts_table_services_table_extension_types_gen.go index d4ac93470b5..edf2bb25e30 100644 --- a/v2/api/storage/customizations/storage_accounts_table_services_table_extension_types_gen.go +++ b/v2/api/storage/customizations/storage_accounts_table_services_table_extension_types_gen.go @@ -6,6 +6,8 @@ package customizations import ( v20220901 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -16,5 +18,7 @@ type StorageAccountsTableServicesTableExtension struct { func (extension *StorageAccountsTableServicesTableExtension) GetExtendedResources() []genruntime.KubernetesResource { return []genruntime.KubernetesResource{ &v20220901.StorageAccountsTableServicesTable{}, - &v20220901s.StorageAccountsTableServicesTable{}} + &v20220901s.StorageAccountsTableServicesTable{}, + &v20230101.StorageAccountsTableServicesTable{}, + &v20230101s.StorageAccountsTableServicesTable{}} } diff --git a/v2/api/storage/v1api20210401/storage/storage_account_types_gen.go b/v2/api/storage/v1api20210401/storage/storage_account_types_gen.go index 00b763eee99..c69c6133d06 100644 --- a/v2/api/storage/v1api20210401/storage/storage_account_types_gen.go +++ b/v2/api/storage/v1api20210401/storage/storage_account_types_gen.go @@ -5,7 +5,6 @@ package storage import ( "context" - "fmt" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" @@ -52,22 +51,36 @@ var _ conversion.Convertible = &StorageAccount{} // ConvertFrom populates our StorageAccount from the provided hub StorageAccount func (account *StorageAccount) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccount) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccount but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccount + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = account.AssignProperties_From_StorageAccount(&source) + if err != nil { + return errors.Wrap(err, "converting from source to account") } - return account.AssignProperties_From_StorageAccount(source) + return nil } // ConvertTo populates the provided hub StorageAccount from our StorageAccount func (account *StorageAccount) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccount) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccount but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccount + err := account.AssignProperties_To_StorageAccount(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from account") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return account.AssignProperties_To_StorageAccount(destination) + return nil } var _ genruntime.KubernetesExporter = &StorageAccount{} @@ -304,8 +317,6 @@ type StorageAccount_Spec struct { AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` - // +kubebuilder:validation:MaxLength=24 - // +kubebuilder:validation:MinLength=3 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/storage/v1api20210401/storage/storage_account_types_gen_test.go b/v2/api/storage/v1api20210401/storage/storage_account_types_gen_test.go index 8012a2defc0..c42f040e49d 100644 --- a/v2/api/storage/v1api20210401/storage/storage_account_types_gen_test.go +++ b/v2/api/storage/v1api20210401/storage/storage_account_types_gen_test.go @@ -6,6 +6,7 @@ package storage import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccount(subject StorageAccount) string { copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccount + var hub v20230101s.StorageAccount err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20210401/storage/storage_accounts_blob_service_types_gen.go b/v2/api/storage/v1api20210401/storage/storage_accounts_blob_service_types_gen.go index 08e394d50e6..b230c5da19c 100644 --- a/v2/api/storage/v1api20210401/storage/storage_accounts_blob_service_types_gen.go +++ b/v2/api/storage/v1api20210401/storage/storage_accounts_blob_service_types_gen.go @@ -4,7 +4,6 @@ package storage import ( - "fmt" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" @@ -47,22 +46,36 @@ var _ conversion.Convertible = &StorageAccountsBlobService{} // ConvertFrom populates our StorageAccountsBlobService from the provided hub StorageAccountsBlobService func (service *StorageAccountsBlobService) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsBlobService) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsBlobService but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsBlobService + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = service.AssignProperties_From_StorageAccountsBlobService(&source) + if err != nil { + return errors.Wrap(err, "converting from source to service") } - return service.AssignProperties_From_StorageAccountsBlobService(source) + return nil } // ConvertTo populates the provided hub StorageAccountsBlobService from our StorageAccountsBlobService func (service *StorageAccountsBlobService) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsBlobService) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsBlobService but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsBlobService + err := service.AssignProperties_To_StorageAccountsBlobService(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from service") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return service.AssignProperties_To_StorageAccountsBlobService(destination) + return nil } var _ genruntime.KubernetesResource = &StorageAccountsBlobService{} diff --git a/v2/api/storage/v1api20210401/storage/storage_accounts_blob_service_types_gen_test.go b/v2/api/storage/v1api20210401/storage/storage_accounts_blob_service_types_gen_test.go index ed5ea32dee6..08a4b3f4a3b 100644 --- a/v2/api/storage/v1api20210401/storage/storage_accounts_blob_service_types_gen_test.go +++ b/v2/api/storage/v1api20210401/storage/storage_accounts_blob_service_types_gen_test.go @@ -6,6 +6,7 @@ package storage import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsBlobService(subject StorageAccou copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsBlobService + var hub v20230101s.StorageAccountsBlobService err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20210401/storage/storage_accounts_blob_services_container_types_gen.go b/v2/api/storage/v1api20210401/storage/storage_accounts_blob_services_container_types_gen.go index b1196ff8040..d7836a680f3 100644 --- a/v2/api/storage/v1api20210401/storage/storage_accounts_blob_services_container_types_gen.go +++ b/v2/api/storage/v1api20210401/storage/storage_accounts_blob_services_container_types_gen.go @@ -4,7 +4,6 @@ package storage import ( - "fmt" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" @@ -47,22 +46,36 @@ var _ conversion.Convertible = &StorageAccountsBlobServicesContainer{} // ConvertFrom populates our StorageAccountsBlobServicesContainer from the provided hub StorageAccountsBlobServicesContainer func (container *StorageAccountsBlobServicesContainer) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsBlobServicesContainer) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsBlobServicesContainer but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsBlobServicesContainer + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = container.AssignProperties_From_StorageAccountsBlobServicesContainer(&source) + if err != nil { + return errors.Wrap(err, "converting from source to container") } - return container.AssignProperties_From_StorageAccountsBlobServicesContainer(source) + return nil } // ConvertTo populates the provided hub StorageAccountsBlobServicesContainer from our StorageAccountsBlobServicesContainer func (container *StorageAccountsBlobServicesContainer) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsBlobServicesContainer) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsBlobServicesContainer but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsBlobServicesContainer + err := container.AssignProperties_To_StorageAccountsBlobServicesContainer(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from container") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return container.AssignProperties_To_StorageAccountsBlobServicesContainer(destination) + return nil } var _ genruntime.KubernetesResource = &StorageAccountsBlobServicesContainer{} @@ -233,8 +246,6 @@ type augmentConversionForStorageAccountsBlobServicesContainer interface { // Storage version of v1api20210401.StorageAccounts_BlobServices_Container_Spec type StorageAccounts_BlobServices_Container_Spec struct { - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=3 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/storage/v1api20210401/storage/storage_accounts_blob_services_container_types_gen_test.go b/v2/api/storage/v1api20210401/storage/storage_accounts_blob_services_container_types_gen_test.go index a1f9256d665..4020ad4fd0d 100644 --- a/v2/api/storage/v1api20210401/storage/storage_accounts_blob_services_container_types_gen_test.go +++ b/v2/api/storage/v1api20210401/storage/storage_accounts_blob_services_container_types_gen_test.go @@ -6,6 +6,7 @@ package storage import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsBlobServicesContainer(subject St copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsBlobServicesContainer + var hub v20230101s.StorageAccountsBlobServicesContainer err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20210401/storage/storage_accounts_management_policy_types_gen.go b/v2/api/storage/v1api20210401/storage/storage_accounts_management_policy_types_gen.go index 709502379be..56d4a3e1eda 100644 --- a/v2/api/storage/v1api20210401/storage/storage_accounts_management_policy_types_gen.go +++ b/v2/api/storage/v1api20210401/storage/storage_accounts_management_policy_types_gen.go @@ -4,7 +4,6 @@ package storage import ( - "fmt" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" @@ -47,22 +46,36 @@ var _ conversion.Convertible = &StorageAccountsManagementPolicy{} // ConvertFrom populates our StorageAccountsManagementPolicy from the provided hub StorageAccountsManagementPolicy func (policy *StorageAccountsManagementPolicy) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsManagementPolicy) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsManagementPolicy but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsManagementPolicy + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = policy.AssignProperties_From_StorageAccountsManagementPolicy(&source) + if err != nil { + return errors.Wrap(err, "converting from source to policy") } - return policy.AssignProperties_From_StorageAccountsManagementPolicy(source) + return nil } // ConvertTo populates the provided hub StorageAccountsManagementPolicy from our StorageAccountsManagementPolicy func (policy *StorageAccountsManagementPolicy) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsManagementPolicy) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsManagementPolicy but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsManagementPolicy + err := policy.AssignProperties_To_StorageAccountsManagementPolicy(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from policy") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return policy.AssignProperties_To_StorageAccountsManagementPolicy(destination) + return nil } var _ genruntime.KubernetesResource = &StorageAccountsManagementPolicy{} diff --git a/v2/api/storage/v1api20210401/storage/storage_accounts_management_policy_types_gen_test.go b/v2/api/storage/v1api20210401/storage/storage_accounts_management_policy_types_gen_test.go index becddd4b56b..5c84cffe4a3 100644 --- a/v2/api/storage/v1api20210401/storage/storage_accounts_management_policy_types_gen_test.go +++ b/v2/api/storage/v1api20210401/storage/storage_accounts_management_policy_types_gen_test.go @@ -6,6 +6,7 @@ package storage import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsManagementPolicy(subject Storage copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsManagementPolicy + var hub v20230101s.StorageAccountsManagementPolicy err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20210401/storage/storage_accounts_queue_service_types_gen.go b/v2/api/storage/v1api20210401/storage/storage_accounts_queue_service_types_gen.go index b40c14ed787..65140cc9253 100644 --- a/v2/api/storage/v1api20210401/storage/storage_accounts_queue_service_types_gen.go +++ b/v2/api/storage/v1api20210401/storage/storage_accounts_queue_service_types_gen.go @@ -4,7 +4,6 @@ package storage import ( - "fmt" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" @@ -47,22 +46,36 @@ var _ conversion.Convertible = &StorageAccountsQueueService{} // ConvertFrom populates our StorageAccountsQueueService from the provided hub StorageAccountsQueueService func (service *StorageAccountsQueueService) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsQueueService) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsQueueService but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsQueueService + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = service.AssignProperties_From_StorageAccountsQueueService(&source) + if err != nil { + return errors.Wrap(err, "converting from source to service") } - return service.AssignProperties_From_StorageAccountsQueueService(source) + return nil } // ConvertTo populates the provided hub StorageAccountsQueueService from our StorageAccountsQueueService func (service *StorageAccountsQueueService) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsQueueService) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsQueueService but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsQueueService + err := service.AssignProperties_To_StorageAccountsQueueService(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from service") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return service.AssignProperties_To_StorageAccountsQueueService(destination) + return nil } var _ genruntime.KubernetesResource = &StorageAccountsQueueService{} diff --git a/v2/api/storage/v1api20210401/storage/storage_accounts_queue_service_types_gen_test.go b/v2/api/storage/v1api20210401/storage/storage_accounts_queue_service_types_gen_test.go index 7a1b63196e7..0a59b805c0c 100644 --- a/v2/api/storage/v1api20210401/storage/storage_accounts_queue_service_types_gen_test.go +++ b/v2/api/storage/v1api20210401/storage/storage_accounts_queue_service_types_gen_test.go @@ -6,6 +6,7 @@ package storage import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsQueueService(subject StorageAcco copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsQueueService + var hub v20230101s.StorageAccountsQueueService err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20210401/storage/storage_accounts_queue_services_queue_types_gen.go b/v2/api/storage/v1api20210401/storage/storage_accounts_queue_services_queue_types_gen.go index 839b884c9cf..c1a1dd46794 100644 --- a/v2/api/storage/v1api20210401/storage/storage_accounts_queue_services_queue_types_gen.go +++ b/v2/api/storage/v1api20210401/storage/storage_accounts_queue_services_queue_types_gen.go @@ -4,7 +4,6 @@ package storage import ( - "fmt" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" @@ -47,22 +46,36 @@ var _ conversion.Convertible = &StorageAccountsQueueServicesQueue{} // ConvertFrom populates our StorageAccountsQueueServicesQueue from the provided hub StorageAccountsQueueServicesQueue func (queue *StorageAccountsQueueServicesQueue) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsQueueServicesQueue) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsQueueServicesQueue but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsQueueServicesQueue + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = queue.AssignProperties_From_StorageAccountsQueueServicesQueue(&source) + if err != nil { + return errors.Wrap(err, "converting from source to queue") } - return queue.AssignProperties_From_StorageAccountsQueueServicesQueue(source) + return nil } // ConvertTo populates the provided hub StorageAccountsQueueServicesQueue from our StorageAccountsQueueServicesQueue func (queue *StorageAccountsQueueServicesQueue) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsQueueServicesQueue) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsQueueServicesQueue but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsQueueServicesQueue + err := queue.AssignProperties_To_StorageAccountsQueueServicesQueue(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from queue") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return queue.AssignProperties_To_StorageAccountsQueueServicesQueue(destination) + return nil } var _ genruntime.KubernetesResource = &StorageAccountsQueueServicesQueue{} @@ -233,8 +246,6 @@ type augmentConversionForStorageAccountsQueueServicesQueue interface { // Storage version of v1api20210401.StorageAccounts_QueueServices_Queue_Spec type StorageAccounts_QueueServices_Queue_Spec struct { - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=3 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` diff --git a/v2/api/storage/v1api20210401/storage/storage_accounts_queue_services_queue_types_gen_test.go b/v2/api/storage/v1api20210401/storage/storage_accounts_queue_services_queue_types_gen_test.go index fe90917c37f..062b0c322a6 100644 --- a/v2/api/storage/v1api20210401/storage/storage_accounts_queue_services_queue_types_gen_test.go +++ b/v2/api/storage/v1api20210401/storage/storage_accounts_queue_services_queue_types_gen_test.go @@ -6,6 +6,7 @@ package storage import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsQueueServicesQueue(subject Stora copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsQueueServicesQueue + var hub v20230101s.StorageAccountsQueueServicesQueue err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20210401/storage/structure.txt b/v2/api/storage/v1api20210401/storage/structure.txt index e86b2263734..4388f884e9d 100644 --- a/v2/api/storage/v1api20210401/storage/structure.txt +++ b/v2/api/storage/v1api20210401/storage/structure.txt @@ -21,9 +21,7 @@ github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage │ │ │ ├── DefaultSharePermission: *string │ │ │ ├── DirectoryServiceOptions: *string │ │ │ └── PropertyBag: genruntime.PropertyBag -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 24 -│ │ │ └── Rule 1: MinLength: 3 +│ │ ├── AzureName: string │ │ ├── CustomDomain: *Object (3 properties) │ │ │ ├── Name: *string │ │ │ ├── PropertyBag: genruntime.PropertyBag @@ -413,9 +411,7 @@ github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage ├── StorageAccountsBlobServicesContainer: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401.StorageAccountsBlobService │ ├── Spec: Object (9 properties) -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 63 -│ │ │ └── Rule 1: MinLength: 3 +│ │ ├── AzureName: string │ │ ├── DefaultEncryptionScope: *string │ │ ├── DenyEncryptionScopeOverride: *bool │ │ ├── ImmutableStorageWithVersioning: *Object (2 properties) @@ -636,9 +632,7 @@ github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage ├── StorageAccountsQueueServicesQueue: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401.StorageAccountsQueueService │ ├── Spec: Object (5 properties) -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 63 -│ │ │ └── Rule 1: MinLength: 3 +│ │ ├── AzureName: string │ │ ├── Metadata: map[string]string │ │ ├── OriginalVersion: string │ │ ├── Owner: *genruntime.KnownResourceReference diff --git a/v2/api/storage/v1api20210401/storage_account_types_gen_test.go b/v2/api/storage/v1api20210401/storage_account_types_gen_test.go index 1a67b939386..9ee7ab3f11a 100644 --- a/v2/api/storage/v1api20210401/storage_account_types_gen_test.go +++ b/v2/api/storage/v1api20210401/storage_account_types_gen_test.go @@ -6,7 +6,7 @@ package v1api20210401 import ( "encoding/json" v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" - v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -37,7 +37,7 @@ func RunResourceConversionTestForStorageAccount(subject StorageAccount) string { copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccount + var hub v20230101s.StorageAccount err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20210401/storage_accounts_blob_service_types_gen_test.go b/v2/api/storage/v1api20210401/storage_accounts_blob_service_types_gen_test.go index fc0503d032e..ac13eb02277 100644 --- a/v2/api/storage/v1api20210401/storage_accounts_blob_service_types_gen_test.go +++ b/v2/api/storage/v1api20210401/storage_accounts_blob_service_types_gen_test.go @@ -6,7 +6,7 @@ package v1api20210401 import ( "encoding/json" v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" - v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -37,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsBlobService(subject StorageAccou copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsBlobService + var hub v20230101s.StorageAccountsBlobService err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20210401/storage_accounts_blob_services_container_types_gen_test.go b/v2/api/storage/v1api20210401/storage_accounts_blob_services_container_types_gen_test.go index 8ac75dcfe02..6dd5982f2b3 100644 --- a/v2/api/storage/v1api20210401/storage_accounts_blob_services_container_types_gen_test.go +++ b/v2/api/storage/v1api20210401/storage_accounts_blob_services_container_types_gen_test.go @@ -6,7 +6,7 @@ package v1api20210401 import ( "encoding/json" v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" - v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -37,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsBlobServicesContainer(subject St copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsBlobServicesContainer + var hub v20230101s.StorageAccountsBlobServicesContainer err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20210401/storage_accounts_management_policy_types_gen_test.go b/v2/api/storage/v1api20210401/storage_accounts_management_policy_types_gen_test.go index 1f7cd538661..631960fff02 100644 --- a/v2/api/storage/v1api20210401/storage_accounts_management_policy_types_gen_test.go +++ b/v2/api/storage/v1api20210401/storage_accounts_management_policy_types_gen_test.go @@ -6,7 +6,7 @@ package v1api20210401 import ( "encoding/json" v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" - v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -37,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsManagementPolicy(subject Storage copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsManagementPolicy + var hub v20230101s.StorageAccountsManagementPolicy err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20210401/storage_accounts_queue_service_types_gen_test.go b/v2/api/storage/v1api20210401/storage_accounts_queue_service_types_gen_test.go index aa9a27a6a0b..11b0d605daf 100644 --- a/v2/api/storage/v1api20210401/storage_accounts_queue_service_types_gen_test.go +++ b/v2/api/storage/v1api20210401/storage_accounts_queue_service_types_gen_test.go @@ -6,7 +6,7 @@ package v1api20210401 import ( "encoding/json" v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" - v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -37,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsQueueService(subject StorageAcco copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsQueueService + var hub v20230101s.StorageAccountsQueueService err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20210401/storage_accounts_queue_services_queue_types_gen_test.go b/v2/api/storage/v1api20210401/storage_accounts_queue_services_queue_types_gen_test.go index ba7ac4ee3e2..06d8004016b 100644 --- a/v2/api/storage/v1api20210401/storage_accounts_queue_services_queue_types_gen_test.go +++ b/v2/api/storage/v1api20210401/storage_accounts_queue_services_queue_types_gen_test.go @@ -6,7 +6,7 @@ package v1api20210401 import ( "encoding/json" v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" - v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -37,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsQueueServicesQueue(subject Stora copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsQueueServicesQueue + var hub v20230101s.StorageAccountsQueueServicesQueue err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20220901/storage/storage_account_types_gen.go b/v2/api/storage/v1api20220901/storage/storage_account_types_gen.go index fc49dac9681..764224a95e9 100644 --- a/v2/api/storage/v1api20220901/storage/storage_account_types_gen.go +++ b/v2/api/storage/v1api20220901/storage/storage_account_types_gen.go @@ -5,6 +5,8 @@ package storage import ( "context" + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" @@ -14,14 +16,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/conversion" ) -// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccounts,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccounts/status,storageaccounts/finalizers},verbs=get;update;patch - // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" @@ -49,6 +48,28 @@ func (account *StorageAccount) SetConditions(conditions conditions.Conditions) { account.Status.Conditions = conditions } +var _ conversion.Convertible = &StorageAccount{} + +// ConvertFrom populates our StorageAccount from the provided hub StorageAccount +func (account *StorageAccount) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccount) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccount but received %T instead", hub) + } + + return account.AssignProperties_From_StorageAccount(source) +} + +// ConvertTo populates the provided hub StorageAccount from our StorageAccount +func (account *StorageAccount) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccount) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccount but received %T instead", hub) + } + + return account.AssignProperties_To_StorageAccount(destination) +} + var _ genruntime.KubernetesExporter = &StorageAccount{} // ExportKubernetesResources defines a resource which can create other resources in Kubernetes. @@ -174,8 +195,75 @@ func (account *StorageAccount) SetStatus(status genruntime.ConvertibleStatus) er return nil } -// Hub marks that this StorageAccount is the hub type for conversion -func (account *StorageAccount) Hub() {} +// AssignProperties_From_StorageAccount populates our StorageAccount from the provided source StorageAccount +func (account *StorageAccount) AssignProperties_From_StorageAccount(source *v20230101s.StorageAccount) error { + + // ObjectMeta + account.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccount_Spec + err := spec.AssignProperties_From_StorageAccount_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccount_Spec() to populate field Spec") + } + account.Spec = spec + + // Status + var status StorageAccount_STATUS + err = status.AssignProperties_From_StorageAccount_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccount_STATUS() to populate field Status") + } + account.Status = status + + // Invoke the augmentConversionForStorageAccount interface (if implemented) to customize the conversion + var accountAsAny any = account + if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount); ok { + err := augmentedAccount.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccount populates the provided destination StorageAccount from our StorageAccount +func (account *StorageAccount) AssignProperties_To_StorageAccount(destination *v20230101s.StorageAccount) error { + + // ObjectMeta + destination.ObjectMeta = *account.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccount_Spec + err := account.Spec.AssignProperties_To_StorageAccount_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccount_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccount_STATUS + err = account.Status.AssignProperties_To_StorageAccount_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccount_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForStorageAccount interface (if implemented) to customize the conversion + var accountAsAny any = account + if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount); ok { + err := augmentedAccount.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (account *StorageAccount) OriginalGVK() *schema.GroupVersionKind { @@ -203,6 +291,11 @@ type APIVersion string const APIVersion_Value = APIVersion("2022-09-01") +type augmentConversionForStorageAccount interface { + AssignPropertiesFrom(src *v20230101s.StorageAccount) error + AssignPropertiesTo(dst *v20230101s.StorageAccount) error +} + // Storage version of v1api20220901.StorageAccount_Spec type StorageAccount_Spec struct { AccessTier *string `json:"accessTier,omitempty"` @@ -212,8 +305,6 @@ type StorageAccount_Spec struct { AllowedCopyScope *string `json:"allowedCopyScope,omitempty"` AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` - // +kubebuilder:validation:MaxLength=24 - // +kubebuilder:validation:MinLength=3 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` @@ -255,20 +346,614 @@ var _ genruntime.ConvertibleSpec = &StorageAccount_Spec{} // ConvertSpecFrom populates our StorageAccount_Spec from the provided source func (account *StorageAccount_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == account { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + src, ok := source.(*v20230101s.StorageAccount_Spec) + if ok { + // Populate our instance from source + return account.AssignProperties_From_StorageAccount_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccount_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = account.AssignProperties_From_StorageAccount_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") } - return source.ConvertSpecTo(account) + return nil } // ConvertSpecTo populates the provided destination from our StorageAccount_Spec func (account *StorageAccount_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == account { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + dst, ok := destination.(*v20230101s.StorageAccount_Spec) + if ok { + // Populate destination from our instance + return account.AssignProperties_To_StorageAccount_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccount_Spec{} + err := account.AssignProperties_To_StorageAccount_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccount_Spec populates our StorageAccount_Spec from the provided source StorageAccount_Spec +func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(source *v20230101s.StorageAccount_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AccessTier + account.AccessTier = genruntime.ClonePointerToString(source.AccessTier) + + // AllowBlobPublicAccess + if source.AllowBlobPublicAccess != nil { + allowBlobPublicAccess := *source.AllowBlobPublicAccess + account.AllowBlobPublicAccess = &allowBlobPublicAccess + } else { + account.AllowBlobPublicAccess = nil + } + + // AllowCrossTenantReplication + if source.AllowCrossTenantReplication != nil { + allowCrossTenantReplication := *source.AllowCrossTenantReplication + account.AllowCrossTenantReplication = &allowCrossTenantReplication + } else { + account.AllowCrossTenantReplication = nil + } + + // AllowSharedKeyAccess + if source.AllowSharedKeyAccess != nil { + allowSharedKeyAccess := *source.AllowSharedKeyAccess + account.AllowSharedKeyAccess = &allowSharedKeyAccess + } else { + account.AllowSharedKeyAccess = nil + } + + // AllowedCopyScope + account.AllowedCopyScope = genruntime.ClonePointerToString(source.AllowedCopyScope) + + // AzureFilesIdentityBasedAuthentication + if source.AzureFilesIdentityBasedAuthentication != nil { + var azureFilesIdentityBasedAuthentication AzureFilesIdentityBasedAuthentication + err := azureFilesIdentityBasedAuthentication.AssignProperties_From_AzureFilesIdentityBasedAuthentication(source.AzureFilesIdentityBasedAuthentication) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AzureFilesIdentityBasedAuthentication() to populate field AzureFilesIdentityBasedAuthentication") + } + account.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication + } else { + account.AzureFilesIdentityBasedAuthentication = nil + } + + // AzureName + account.AzureName = source.AzureName + + // CustomDomain + if source.CustomDomain != nil { + var customDomain CustomDomain + err := customDomain.AssignProperties_From_CustomDomain(source.CustomDomain) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CustomDomain() to populate field CustomDomain") + } + account.CustomDomain = &customDomain + } else { + account.CustomDomain = nil + } + + // DefaultToOAuthAuthentication + if source.DefaultToOAuthAuthentication != nil { + defaultToOAuthAuthentication := *source.DefaultToOAuthAuthentication + account.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication + } else { + account.DefaultToOAuthAuthentication = nil + } + + // DnsEndpointType + account.DnsEndpointType = genruntime.ClonePointerToString(source.DnsEndpointType) + + // Encryption + if source.Encryption != nil { + var encryption Encryption + err := encryption.AssignProperties_From_Encryption(source.Encryption) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Encryption() to populate field Encryption") + } + account.Encryption = &encryption + } else { + account.Encryption = nil + } + + // ExtendedLocation + if source.ExtendedLocation != nil { + var extendedLocation ExtendedLocation + err := extendedLocation.AssignProperties_From_ExtendedLocation(source.ExtendedLocation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ExtendedLocation() to populate field ExtendedLocation") + } + account.ExtendedLocation = &extendedLocation + } else { + account.ExtendedLocation = nil + } + + // Identity + if source.Identity != nil { + var identity Identity + err := identity.AssignProperties_From_Identity(source.Identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Identity() to populate field Identity") + } + account.Identity = &identity + } else { + account.Identity = nil + } + + // ImmutableStorageWithVersioning + if source.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning ImmutableStorageAccount + err := immutableStorageWithVersioning.AssignProperties_From_ImmutableStorageAccount(source.ImmutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ImmutableStorageAccount() to populate field ImmutableStorageWithVersioning") + } + account.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + account.ImmutableStorageWithVersioning = nil + } + + // IsHnsEnabled + if source.IsHnsEnabled != nil { + isHnsEnabled := *source.IsHnsEnabled + account.IsHnsEnabled = &isHnsEnabled + } else { + account.IsHnsEnabled = nil + } + + // IsLocalUserEnabled + if source.IsLocalUserEnabled != nil { + isLocalUserEnabled := *source.IsLocalUserEnabled + account.IsLocalUserEnabled = &isLocalUserEnabled + } else { + account.IsLocalUserEnabled = nil + } + + // IsNfsV3Enabled + if source.IsNfsV3Enabled != nil { + isNfsV3Enabled := *source.IsNfsV3Enabled + account.IsNfsV3Enabled = &isNfsV3Enabled + } else { + account.IsNfsV3Enabled = nil + } + + // IsSftpEnabled + if source.IsSftpEnabled != nil { + isSftpEnabled := *source.IsSftpEnabled + account.IsSftpEnabled = &isSftpEnabled + } else { + account.IsSftpEnabled = nil + } + + // KeyPolicy + if source.KeyPolicy != nil { + var keyPolicy KeyPolicy + err := keyPolicy.AssignProperties_From_KeyPolicy(source.KeyPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyPolicy() to populate field KeyPolicy") + } + account.KeyPolicy = &keyPolicy + } else { + account.KeyPolicy = nil + } + + // Kind + account.Kind = genruntime.ClonePointerToString(source.Kind) + + // LargeFileSharesState + account.LargeFileSharesState = genruntime.ClonePointerToString(source.LargeFileSharesState) + + // Location + account.Location = genruntime.ClonePointerToString(source.Location) + + // MinimumTlsVersion + account.MinimumTlsVersion = genruntime.ClonePointerToString(source.MinimumTlsVersion) + + // NetworkAcls + if source.NetworkAcls != nil { + var networkAcl NetworkRuleSet + err := networkAcl.AssignProperties_From_NetworkRuleSet(source.NetworkAcls) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_NetworkRuleSet() to populate field NetworkAcls") + } + account.NetworkAcls = &networkAcl + } else { + account.NetworkAcls = nil + } + + // OperatorSpec + if source.OperatorSpec != nil { + var operatorSpec StorageAccountOperatorSpec + err := operatorSpec.AssignProperties_From_StorageAccountOperatorSpec(source.OperatorSpec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccountOperatorSpec() to populate field OperatorSpec") + } + account.OperatorSpec = &operatorSpec + } else { + account.OperatorSpec = nil + } + + // OriginalVersion + account.OriginalVersion = source.OriginalVersion + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + account.Owner = &owner + } else { + account.Owner = nil + } + + // PublicNetworkAccess + account.PublicNetworkAccess = genruntime.ClonePointerToString(source.PublicNetworkAccess) + + // RoutingPreference + if source.RoutingPreference != nil { + var routingPreference RoutingPreference + err := routingPreference.AssignProperties_From_RoutingPreference(source.RoutingPreference) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_RoutingPreference() to populate field RoutingPreference") + } + account.RoutingPreference = &routingPreference + } else { + account.RoutingPreference = nil + } + + // SasPolicy + if source.SasPolicy != nil { + var sasPolicy SasPolicy + err := sasPolicy.AssignProperties_From_SasPolicy(source.SasPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SasPolicy() to populate field SasPolicy") + } + account.SasPolicy = &sasPolicy + } else { + account.SasPolicy = nil + } + + // Sku + if source.Sku != nil { + var sku Sku + err := sku.AssignProperties_From_Sku(source.Sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Sku() to populate field Sku") + } + account.Sku = &sku + } else { + account.Sku = nil + } + + // SupportsHttpsTrafficOnly + if source.SupportsHttpsTrafficOnly != nil { + supportsHttpsTrafficOnly := *source.SupportsHttpsTrafficOnly + account.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly + } else { + account.SupportsHttpsTrafficOnly = nil + } + + // Tags + account.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // Update the property bag + if len(propertyBag) > 0 { + account.PropertyBag = propertyBag + } else { + account.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccount_Spec interface (if implemented) to customize the conversion + var accountAsAny any = account + if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount_Spec); ok { + err := augmentedAccount.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } } - return destination.ConvertSpecFrom(account) + // No error + return nil +} + +// AssignProperties_To_StorageAccount_Spec populates the provided destination StorageAccount_Spec from our StorageAccount_Spec +func (account *StorageAccount_Spec) AssignProperties_To_StorageAccount_Spec(destination *v20230101s.StorageAccount_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(account.PropertyBag) + + // AccessTier + destination.AccessTier = genruntime.ClonePointerToString(account.AccessTier) + + // AllowBlobPublicAccess + if account.AllowBlobPublicAccess != nil { + allowBlobPublicAccess := *account.AllowBlobPublicAccess + destination.AllowBlobPublicAccess = &allowBlobPublicAccess + } else { + destination.AllowBlobPublicAccess = nil + } + + // AllowCrossTenantReplication + if account.AllowCrossTenantReplication != nil { + allowCrossTenantReplication := *account.AllowCrossTenantReplication + destination.AllowCrossTenantReplication = &allowCrossTenantReplication + } else { + destination.AllowCrossTenantReplication = nil + } + + // AllowSharedKeyAccess + if account.AllowSharedKeyAccess != nil { + allowSharedKeyAccess := *account.AllowSharedKeyAccess + destination.AllowSharedKeyAccess = &allowSharedKeyAccess + } else { + destination.AllowSharedKeyAccess = nil + } + + // AllowedCopyScope + destination.AllowedCopyScope = genruntime.ClonePointerToString(account.AllowedCopyScope) + + // AzureFilesIdentityBasedAuthentication + if account.AzureFilesIdentityBasedAuthentication != nil { + var azureFilesIdentityBasedAuthentication v20230101s.AzureFilesIdentityBasedAuthentication + err := account.AzureFilesIdentityBasedAuthentication.AssignProperties_To_AzureFilesIdentityBasedAuthentication(&azureFilesIdentityBasedAuthentication) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AzureFilesIdentityBasedAuthentication() to populate field AzureFilesIdentityBasedAuthentication") + } + destination.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication + } else { + destination.AzureFilesIdentityBasedAuthentication = nil + } + + // AzureName + destination.AzureName = account.AzureName + + // CustomDomain + if account.CustomDomain != nil { + var customDomain v20230101s.CustomDomain + err := account.CustomDomain.AssignProperties_To_CustomDomain(&customDomain) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CustomDomain() to populate field CustomDomain") + } + destination.CustomDomain = &customDomain + } else { + destination.CustomDomain = nil + } + + // DefaultToOAuthAuthentication + if account.DefaultToOAuthAuthentication != nil { + defaultToOAuthAuthentication := *account.DefaultToOAuthAuthentication + destination.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication + } else { + destination.DefaultToOAuthAuthentication = nil + } + + // DnsEndpointType + destination.DnsEndpointType = genruntime.ClonePointerToString(account.DnsEndpointType) + + // Encryption + if account.Encryption != nil { + var encryption v20230101s.Encryption + err := account.Encryption.AssignProperties_To_Encryption(&encryption) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Encryption() to populate field Encryption") + } + destination.Encryption = &encryption + } else { + destination.Encryption = nil + } + + // ExtendedLocation + if account.ExtendedLocation != nil { + var extendedLocation v20230101s.ExtendedLocation + err := account.ExtendedLocation.AssignProperties_To_ExtendedLocation(&extendedLocation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ExtendedLocation() to populate field ExtendedLocation") + } + destination.ExtendedLocation = &extendedLocation + } else { + destination.ExtendedLocation = nil + } + + // Identity + if account.Identity != nil { + var identity v20230101s.Identity + err := account.Identity.AssignProperties_To_Identity(&identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Identity() to populate field Identity") + } + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // ImmutableStorageWithVersioning + if account.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning v20230101s.ImmutableStorageAccount + err := account.ImmutableStorageWithVersioning.AssignProperties_To_ImmutableStorageAccount(&immutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ImmutableStorageAccount() to populate field ImmutableStorageWithVersioning") + } + destination.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + destination.ImmutableStorageWithVersioning = nil + } + + // IsHnsEnabled + if account.IsHnsEnabled != nil { + isHnsEnabled := *account.IsHnsEnabled + destination.IsHnsEnabled = &isHnsEnabled + } else { + destination.IsHnsEnabled = nil + } + + // IsLocalUserEnabled + if account.IsLocalUserEnabled != nil { + isLocalUserEnabled := *account.IsLocalUserEnabled + destination.IsLocalUserEnabled = &isLocalUserEnabled + } else { + destination.IsLocalUserEnabled = nil + } + + // IsNfsV3Enabled + if account.IsNfsV3Enabled != nil { + isNfsV3Enabled := *account.IsNfsV3Enabled + destination.IsNfsV3Enabled = &isNfsV3Enabled + } else { + destination.IsNfsV3Enabled = nil + } + + // IsSftpEnabled + if account.IsSftpEnabled != nil { + isSftpEnabled := *account.IsSftpEnabled + destination.IsSftpEnabled = &isSftpEnabled + } else { + destination.IsSftpEnabled = nil + } + + // KeyPolicy + if account.KeyPolicy != nil { + var keyPolicy v20230101s.KeyPolicy + err := account.KeyPolicy.AssignProperties_To_KeyPolicy(&keyPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyPolicy() to populate field KeyPolicy") + } + destination.KeyPolicy = &keyPolicy + } else { + destination.KeyPolicy = nil + } + + // Kind + destination.Kind = genruntime.ClonePointerToString(account.Kind) + + // LargeFileSharesState + destination.LargeFileSharesState = genruntime.ClonePointerToString(account.LargeFileSharesState) + + // Location + destination.Location = genruntime.ClonePointerToString(account.Location) + + // MinimumTlsVersion + destination.MinimumTlsVersion = genruntime.ClonePointerToString(account.MinimumTlsVersion) + + // NetworkAcls + if account.NetworkAcls != nil { + var networkAcl v20230101s.NetworkRuleSet + err := account.NetworkAcls.AssignProperties_To_NetworkRuleSet(&networkAcl) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_NetworkRuleSet() to populate field NetworkAcls") + } + destination.NetworkAcls = &networkAcl + } else { + destination.NetworkAcls = nil + } + + // OperatorSpec + if account.OperatorSpec != nil { + var operatorSpec v20230101s.StorageAccountOperatorSpec + err := account.OperatorSpec.AssignProperties_To_StorageAccountOperatorSpec(&operatorSpec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccountOperatorSpec() to populate field OperatorSpec") + } + destination.OperatorSpec = &operatorSpec + } else { + destination.OperatorSpec = nil + } + + // OriginalVersion + destination.OriginalVersion = account.OriginalVersion + + // Owner + if account.Owner != nil { + owner := account.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // PublicNetworkAccess + destination.PublicNetworkAccess = genruntime.ClonePointerToString(account.PublicNetworkAccess) + + // RoutingPreference + if account.RoutingPreference != nil { + var routingPreference v20230101s.RoutingPreference + err := account.RoutingPreference.AssignProperties_To_RoutingPreference(&routingPreference) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_RoutingPreference() to populate field RoutingPreference") + } + destination.RoutingPreference = &routingPreference + } else { + destination.RoutingPreference = nil + } + + // SasPolicy + if account.SasPolicy != nil { + var sasPolicy v20230101s.SasPolicy + err := account.SasPolicy.AssignProperties_To_SasPolicy(&sasPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SasPolicy() to populate field SasPolicy") + } + destination.SasPolicy = &sasPolicy + } else { + destination.SasPolicy = nil + } + + // Sku + if account.Sku != nil { + var sku v20230101s.Sku + err := account.Sku.AssignProperties_To_Sku(&sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Sku() to populate field Sku") + } + destination.Sku = &sku + } else { + destination.Sku = nil + } + + // SupportsHttpsTrafficOnly + if account.SupportsHttpsTrafficOnly != nil { + supportsHttpsTrafficOnly := *account.SupportsHttpsTrafficOnly + destination.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly + } else { + destination.SupportsHttpsTrafficOnly = nil + } + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(account.Tags) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccount_Spec interface (if implemented) to customize the conversion + var accountAsAny any = account + if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount_Spec); ok { + err := augmentedAccount.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } // Storage version of v1api20220901.StorageAccount_STATUS @@ -329,513 +1014,6291 @@ var _ genruntime.ConvertibleStatus = &StorageAccount_STATUS{} // ConvertStatusFrom populates our StorageAccount_STATUS from the provided source func (account *StorageAccount_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == account { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + src, ok := source.(*v20230101s.StorageAccount_STATUS) + if ok { + // Populate our instance from source + return account.AssignProperties_From_StorageAccount_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccount_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") } - return source.ConvertStatusTo(account) + // Update our instance from src + err = account.AssignProperties_From_StorageAccount_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil } // ConvertStatusTo populates the provided destination from our StorageAccount_STATUS func (account *StorageAccount_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == account { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + dst, ok := destination.(*v20230101s.StorageAccount_STATUS) + if ok { + // Populate destination from our instance + return account.AssignProperties_To_StorageAccount_STATUS(dst) } - return destination.ConvertStatusFrom(account) -} + // Convert to an intermediate form + dst = &v20230101s.StorageAccount_STATUS{} + err := account.AssignProperties_To_StorageAccount_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } -// Storage version of v1api20220901.AzureFilesIdentityBasedAuthentication -// Settings for Azure Files identity based authentication. -type AzureFilesIdentityBasedAuthentication struct { - ActiveDirectoryProperties *ActiveDirectoryProperties `json:"activeDirectoryProperties,omitempty"` - DefaultSharePermission *string `json:"defaultSharePermission,omitempty"` - DirectoryServiceOptions *string `json:"directoryServiceOptions,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } -// Storage version of v1api20220901.AzureFilesIdentityBasedAuthentication_STATUS -// Settings for Azure Files identity based authentication. -type AzureFilesIdentityBasedAuthentication_STATUS struct { - ActiveDirectoryProperties *ActiveDirectoryProperties_STATUS `json:"activeDirectoryProperties,omitempty"` - DefaultSharePermission *string `json:"defaultSharePermission,omitempty"` - DirectoryServiceOptions *string `json:"directoryServiceOptions,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + return nil } -// Storage version of v1api20220901.BlobRestoreStatus_STATUS -// Blob restore status. -type BlobRestoreStatus_STATUS struct { - FailureReason *string `json:"failureReason,omitempty"` - Parameters *BlobRestoreParameters_STATUS `json:"parameters,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - RestoreId *string `json:"restoreId,omitempty"` - Status *string `json:"status,omitempty"` -} +// AssignProperties_From_StorageAccount_STATUS populates our StorageAccount_STATUS from the provided source StorageAccount_STATUS +func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATUS(source *v20230101s.StorageAccount_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) -// Storage version of v1api20220901.CustomDomain -// The custom domain assigned to this storage account. This can be set via Update. -type CustomDomain struct { - Name *string `json:"name,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - UseSubDomainName *bool `json:"useSubDomainName,omitempty"` -} + // AccessTier + account.AccessTier = genruntime.ClonePointerToString(source.AccessTier) -// Storage version of v1api20220901.CustomDomain_STATUS -// The custom domain assigned to this storage account. This can be set via Update. -type CustomDomain_STATUS struct { - Name *string `json:"name,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - UseSubDomainName *bool `json:"useSubDomainName,omitempty"` -} + // AccountMigrationInProgress + if source.AccountMigrationInProgress != nil { + propertyBag.Add("AccountMigrationInProgress", *source.AccountMigrationInProgress) + } else { + propertyBag.Remove("AccountMigrationInProgress") + } + + // AllowBlobPublicAccess + if source.AllowBlobPublicAccess != nil { + allowBlobPublicAccess := *source.AllowBlobPublicAccess + account.AllowBlobPublicAccess = &allowBlobPublicAccess + } else { + account.AllowBlobPublicAccess = nil + } + + // AllowCrossTenantReplication + if source.AllowCrossTenantReplication != nil { + allowCrossTenantReplication := *source.AllowCrossTenantReplication + account.AllowCrossTenantReplication = &allowCrossTenantReplication + } else { + account.AllowCrossTenantReplication = nil + } + + // AllowSharedKeyAccess + if source.AllowSharedKeyAccess != nil { + allowSharedKeyAccess := *source.AllowSharedKeyAccess + account.AllowSharedKeyAccess = &allowSharedKeyAccess + } else { + account.AllowSharedKeyAccess = nil + } + + // AllowedCopyScope + account.AllowedCopyScope = genruntime.ClonePointerToString(source.AllowedCopyScope) + + // AzureFilesIdentityBasedAuthentication + if source.AzureFilesIdentityBasedAuthentication != nil { + var azureFilesIdentityBasedAuthentication AzureFilesIdentityBasedAuthentication_STATUS + err := azureFilesIdentityBasedAuthentication.AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS(source.AzureFilesIdentityBasedAuthentication) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS() to populate field AzureFilesIdentityBasedAuthentication") + } + account.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication + } else { + account.AzureFilesIdentityBasedAuthentication = nil + } + + // BlobRestoreStatus + if source.BlobRestoreStatus != nil { + var blobRestoreStatus BlobRestoreStatus_STATUS + err := blobRestoreStatus.AssignProperties_From_BlobRestoreStatus_STATUS(source.BlobRestoreStatus) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_BlobRestoreStatus_STATUS() to populate field BlobRestoreStatus") + } + account.BlobRestoreStatus = &blobRestoreStatus + } else { + account.BlobRestoreStatus = nil + } + + // Conditions + account.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // CreationTime + account.CreationTime = genruntime.ClonePointerToString(source.CreationTime) + + // CustomDomain + if source.CustomDomain != nil { + var customDomain CustomDomain_STATUS + err := customDomain.AssignProperties_From_CustomDomain_STATUS(source.CustomDomain) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CustomDomain_STATUS() to populate field CustomDomain") + } + account.CustomDomain = &customDomain + } else { + account.CustomDomain = nil + } + + // DefaultToOAuthAuthentication + if source.DefaultToOAuthAuthentication != nil { + defaultToOAuthAuthentication := *source.DefaultToOAuthAuthentication + account.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication + } else { + account.DefaultToOAuthAuthentication = nil + } + + // DnsEndpointType + account.DnsEndpointType = genruntime.ClonePointerToString(source.DnsEndpointType) + + // Encryption + if source.Encryption != nil { + var encryption Encryption_STATUS + err := encryption.AssignProperties_From_Encryption_STATUS(source.Encryption) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Encryption_STATUS() to populate field Encryption") + } + account.Encryption = &encryption + } else { + account.Encryption = nil + } + + // ExtendedLocation + if source.ExtendedLocation != nil { + var extendedLocation ExtendedLocation_STATUS + err := extendedLocation.AssignProperties_From_ExtendedLocation_STATUS(source.ExtendedLocation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ExtendedLocation_STATUS() to populate field ExtendedLocation") + } + account.ExtendedLocation = &extendedLocation + } else { + account.ExtendedLocation = nil + } + + // FailoverInProgress + if source.FailoverInProgress != nil { + failoverInProgress := *source.FailoverInProgress + account.FailoverInProgress = &failoverInProgress + } else { + account.FailoverInProgress = nil + } + + // GeoReplicationStats + if source.GeoReplicationStats != nil { + var geoReplicationStat GeoReplicationStats_STATUS + err := geoReplicationStat.AssignProperties_From_GeoReplicationStats_STATUS(source.GeoReplicationStats) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_GeoReplicationStats_STATUS() to populate field GeoReplicationStats") + } + account.GeoReplicationStats = &geoReplicationStat + } else { + account.GeoReplicationStats = nil + } + + // Id + account.Id = genruntime.ClonePointerToString(source.Id) + + // Identity + if source.Identity != nil { + var identity Identity_STATUS + err := identity.AssignProperties_From_Identity_STATUS(source.Identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Identity_STATUS() to populate field Identity") + } + account.Identity = &identity + } else { + account.Identity = nil + } + + // ImmutableStorageWithVersioning + if source.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning ImmutableStorageAccount_STATUS + err := immutableStorageWithVersioning.AssignProperties_From_ImmutableStorageAccount_STATUS(source.ImmutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ImmutableStorageAccount_STATUS() to populate field ImmutableStorageWithVersioning") + } + account.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + account.ImmutableStorageWithVersioning = nil + } + + // IsHnsEnabled + if source.IsHnsEnabled != nil { + isHnsEnabled := *source.IsHnsEnabled + account.IsHnsEnabled = &isHnsEnabled + } else { + account.IsHnsEnabled = nil + } + + // IsLocalUserEnabled + if source.IsLocalUserEnabled != nil { + isLocalUserEnabled := *source.IsLocalUserEnabled + account.IsLocalUserEnabled = &isLocalUserEnabled + } else { + account.IsLocalUserEnabled = nil + } + + // IsNfsV3Enabled + if source.IsNfsV3Enabled != nil { + isNfsV3Enabled := *source.IsNfsV3Enabled + account.IsNfsV3Enabled = &isNfsV3Enabled + } else { + account.IsNfsV3Enabled = nil + } + + // IsSftpEnabled + if source.IsSftpEnabled != nil { + isSftpEnabled := *source.IsSftpEnabled + account.IsSftpEnabled = &isSftpEnabled + } else { + account.IsSftpEnabled = nil + } + + // IsSkuConversionBlocked + if source.IsSkuConversionBlocked != nil { + propertyBag.Add("IsSkuConversionBlocked", *source.IsSkuConversionBlocked) + } else { + propertyBag.Remove("IsSkuConversionBlocked") + } + + // KeyCreationTime + if source.KeyCreationTime != nil { + var keyCreationTime KeyCreationTime_STATUS + err := keyCreationTime.AssignProperties_From_KeyCreationTime_STATUS(source.KeyCreationTime) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyCreationTime_STATUS() to populate field KeyCreationTime") + } + account.KeyCreationTime = &keyCreationTime + } else { + account.KeyCreationTime = nil + } + + // KeyPolicy + if source.KeyPolicy != nil { + var keyPolicy KeyPolicy_STATUS + err := keyPolicy.AssignProperties_From_KeyPolicy_STATUS(source.KeyPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyPolicy_STATUS() to populate field KeyPolicy") + } + account.KeyPolicy = &keyPolicy + } else { + account.KeyPolicy = nil + } + + // Kind + account.Kind = genruntime.ClonePointerToString(source.Kind) + + // LargeFileSharesState + account.LargeFileSharesState = genruntime.ClonePointerToString(source.LargeFileSharesState) + + // LastGeoFailoverTime + account.LastGeoFailoverTime = genruntime.ClonePointerToString(source.LastGeoFailoverTime) + + // Location + account.Location = genruntime.ClonePointerToString(source.Location) + + // MinimumTlsVersion + account.MinimumTlsVersion = genruntime.ClonePointerToString(source.MinimumTlsVersion) + + // Name + account.Name = genruntime.ClonePointerToString(source.Name) + + // NetworkAcls + if source.NetworkAcls != nil { + var networkAcl NetworkRuleSet_STATUS + err := networkAcl.AssignProperties_From_NetworkRuleSet_STATUS(source.NetworkAcls) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_NetworkRuleSet_STATUS() to populate field NetworkAcls") + } + account.NetworkAcls = &networkAcl + } else { + account.NetworkAcls = nil + } + + // PrimaryEndpoints + if source.PrimaryEndpoints != nil { + var primaryEndpoint Endpoints_STATUS + err := primaryEndpoint.AssignProperties_From_Endpoints_STATUS(source.PrimaryEndpoints) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Endpoints_STATUS() to populate field PrimaryEndpoints") + } + account.PrimaryEndpoints = &primaryEndpoint + } else { + account.PrimaryEndpoints = nil + } + + // PrimaryLocation + account.PrimaryLocation = genruntime.ClonePointerToString(source.PrimaryLocation) + + // PrivateEndpointConnections + if source.PrivateEndpointConnections != nil { + privateEndpointConnectionList := make([]PrivateEndpointConnection_STATUS, len(source.PrivateEndpointConnections)) + for privateEndpointConnectionIndex, privateEndpointConnectionItem := range source.PrivateEndpointConnections { + // Shadow the loop variable to avoid aliasing + privateEndpointConnectionItem := privateEndpointConnectionItem + var privateEndpointConnection PrivateEndpointConnection_STATUS + err := privateEndpointConnection.AssignProperties_From_PrivateEndpointConnection_STATUS(&privateEndpointConnectionItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_PrivateEndpointConnection_STATUS() to populate field PrivateEndpointConnections") + } + privateEndpointConnectionList[privateEndpointConnectionIndex] = privateEndpointConnection + } + account.PrivateEndpointConnections = privateEndpointConnectionList + } else { + account.PrivateEndpointConnections = nil + } + + // ProvisioningState + account.ProvisioningState = genruntime.ClonePointerToString(source.ProvisioningState) + + // PublicNetworkAccess + account.PublicNetworkAccess = genruntime.ClonePointerToString(source.PublicNetworkAccess) + + // RoutingPreference + if source.RoutingPreference != nil { + var routingPreference RoutingPreference_STATUS + err := routingPreference.AssignProperties_From_RoutingPreference_STATUS(source.RoutingPreference) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_RoutingPreference_STATUS() to populate field RoutingPreference") + } + account.RoutingPreference = &routingPreference + } else { + account.RoutingPreference = nil + } + + // SasPolicy + if source.SasPolicy != nil { + var sasPolicy SasPolicy_STATUS + err := sasPolicy.AssignProperties_From_SasPolicy_STATUS(source.SasPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SasPolicy_STATUS() to populate field SasPolicy") + } + account.SasPolicy = &sasPolicy + } else { + account.SasPolicy = nil + } + + // SecondaryEndpoints + if source.SecondaryEndpoints != nil { + var secondaryEndpoint Endpoints_STATUS + err := secondaryEndpoint.AssignProperties_From_Endpoints_STATUS(source.SecondaryEndpoints) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Endpoints_STATUS() to populate field SecondaryEndpoints") + } + account.SecondaryEndpoints = &secondaryEndpoint + } else { + account.SecondaryEndpoints = nil + } + + // SecondaryLocation + account.SecondaryLocation = genruntime.ClonePointerToString(source.SecondaryLocation) + + // Sku + if source.Sku != nil { + var sku Sku_STATUS + err := sku.AssignProperties_From_Sku_STATUS(source.Sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Sku_STATUS() to populate field Sku") + } + account.Sku = &sku + } else { + account.Sku = nil + } + + // StatusOfPrimary + account.StatusOfPrimary = genruntime.ClonePointerToString(source.StatusOfPrimary) + + // StatusOfSecondary + account.StatusOfSecondary = genruntime.ClonePointerToString(source.StatusOfSecondary) + + // StorageAccountSkuConversionStatus + if source.StorageAccountSkuConversionStatus != nil { + var storageAccountSkuConversionStatus StorageAccountSkuConversionStatus_STATUS + err := storageAccountSkuConversionStatus.AssignProperties_From_StorageAccountSkuConversionStatus_STATUS(source.StorageAccountSkuConversionStatus) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccountSkuConversionStatus_STATUS() to populate field StorageAccountSkuConversionStatus") + } + account.StorageAccountSkuConversionStatus = &storageAccountSkuConversionStatus + } else { + account.StorageAccountSkuConversionStatus = nil + } + + // SupportsHttpsTrafficOnly + if source.SupportsHttpsTrafficOnly != nil { + supportsHttpsTrafficOnly := *source.SupportsHttpsTrafficOnly + account.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly + } else { + account.SupportsHttpsTrafficOnly = nil + } + + // Tags + account.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // Type + account.Type = genruntime.ClonePointerToString(source.Type) + + // Update the property bag + if len(propertyBag) > 0 { + account.PropertyBag = propertyBag + } else { + account.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccount_STATUS interface (if implemented) to customize the conversion + var accountAsAny any = account + if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount_STATUS); ok { + err := augmentedAccount.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccount_STATUS populates the provided destination StorageAccount_STATUS from our StorageAccount_STATUS +func (account *StorageAccount_STATUS) AssignProperties_To_StorageAccount_STATUS(destination *v20230101s.StorageAccount_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(account.PropertyBag) + + // AccessTier + destination.AccessTier = genruntime.ClonePointerToString(account.AccessTier) + + // AccountMigrationInProgress + if propertyBag.Contains("AccountMigrationInProgress") { + var accountMigrationInProgress bool + err := propertyBag.Pull("AccountMigrationInProgress", &accountMigrationInProgress) + if err != nil { + return errors.Wrap(err, "pulling 'AccountMigrationInProgress' from propertyBag") + } + + destination.AccountMigrationInProgress = &accountMigrationInProgress + } else { + destination.AccountMigrationInProgress = nil + } + + // AllowBlobPublicAccess + if account.AllowBlobPublicAccess != nil { + allowBlobPublicAccess := *account.AllowBlobPublicAccess + destination.AllowBlobPublicAccess = &allowBlobPublicAccess + } else { + destination.AllowBlobPublicAccess = nil + } + + // AllowCrossTenantReplication + if account.AllowCrossTenantReplication != nil { + allowCrossTenantReplication := *account.AllowCrossTenantReplication + destination.AllowCrossTenantReplication = &allowCrossTenantReplication + } else { + destination.AllowCrossTenantReplication = nil + } + + // AllowSharedKeyAccess + if account.AllowSharedKeyAccess != nil { + allowSharedKeyAccess := *account.AllowSharedKeyAccess + destination.AllowSharedKeyAccess = &allowSharedKeyAccess + } else { + destination.AllowSharedKeyAccess = nil + } + + // AllowedCopyScope + destination.AllowedCopyScope = genruntime.ClonePointerToString(account.AllowedCopyScope) + + // AzureFilesIdentityBasedAuthentication + if account.AzureFilesIdentityBasedAuthentication != nil { + var azureFilesIdentityBasedAuthentication v20230101s.AzureFilesIdentityBasedAuthentication_STATUS + err := account.AzureFilesIdentityBasedAuthentication.AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS(&azureFilesIdentityBasedAuthentication) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS() to populate field AzureFilesIdentityBasedAuthentication") + } + destination.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication + } else { + destination.AzureFilesIdentityBasedAuthentication = nil + } + + // BlobRestoreStatus + if account.BlobRestoreStatus != nil { + var blobRestoreStatus v20230101s.BlobRestoreStatus_STATUS + err := account.BlobRestoreStatus.AssignProperties_To_BlobRestoreStatus_STATUS(&blobRestoreStatus) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_BlobRestoreStatus_STATUS() to populate field BlobRestoreStatus") + } + destination.BlobRestoreStatus = &blobRestoreStatus + } else { + destination.BlobRestoreStatus = nil + } + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(account.Conditions) + + // CreationTime + destination.CreationTime = genruntime.ClonePointerToString(account.CreationTime) + + // CustomDomain + if account.CustomDomain != nil { + var customDomain v20230101s.CustomDomain_STATUS + err := account.CustomDomain.AssignProperties_To_CustomDomain_STATUS(&customDomain) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CustomDomain_STATUS() to populate field CustomDomain") + } + destination.CustomDomain = &customDomain + } else { + destination.CustomDomain = nil + } + + // DefaultToOAuthAuthentication + if account.DefaultToOAuthAuthentication != nil { + defaultToOAuthAuthentication := *account.DefaultToOAuthAuthentication + destination.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication + } else { + destination.DefaultToOAuthAuthentication = nil + } + + // DnsEndpointType + destination.DnsEndpointType = genruntime.ClonePointerToString(account.DnsEndpointType) + + // Encryption + if account.Encryption != nil { + var encryption v20230101s.Encryption_STATUS + err := account.Encryption.AssignProperties_To_Encryption_STATUS(&encryption) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Encryption_STATUS() to populate field Encryption") + } + destination.Encryption = &encryption + } else { + destination.Encryption = nil + } + + // ExtendedLocation + if account.ExtendedLocation != nil { + var extendedLocation v20230101s.ExtendedLocation_STATUS + err := account.ExtendedLocation.AssignProperties_To_ExtendedLocation_STATUS(&extendedLocation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ExtendedLocation_STATUS() to populate field ExtendedLocation") + } + destination.ExtendedLocation = &extendedLocation + } else { + destination.ExtendedLocation = nil + } + + // FailoverInProgress + if account.FailoverInProgress != nil { + failoverInProgress := *account.FailoverInProgress + destination.FailoverInProgress = &failoverInProgress + } else { + destination.FailoverInProgress = nil + } + + // GeoReplicationStats + if account.GeoReplicationStats != nil { + var geoReplicationStat v20230101s.GeoReplicationStats_STATUS + err := account.GeoReplicationStats.AssignProperties_To_GeoReplicationStats_STATUS(&geoReplicationStat) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_GeoReplicationStats_STATUS() to populate field GeoReplicationStats") + } + destination.GeoReplicationStats = &geoReplicationStat + } else { + destination.GeoReplicationStats = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(account.Id) + + // Identity + if account.Identity != nil { + var identity v20230101s.Identity_STATUS + err := account.Identity.AssignProperties_To_Identity_STATUS(&identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Identity_STATUS() to populate field Identity") + } + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // ImmutableStorageWithVersioning + if account.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning v20230101s.ImmutableStorageAccount_STATUS + err := account.ImmutableStorageWithVersioning.AssignProperties_To_ImmutableStorageAccount_STATUS(&immutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ImmutableStorageAccount_STATUS() to populate field ImmutableStorageWithVersioning") + } + destination.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + destination.ImmutableStorageWithVersioning = nil + } + + // IsHnsEnabled + if account.IsHnsEnabled != nil { + isHnsEnabled := *account.IsHnsEnabled + destination.IsHnsEnabled = &isHnsEnabled + } else { + destination.IsHnsEnabled = nil + } + + // IsLocalUserEnabled + if account.IsLocalUserEnabled != nil { + isLocalUserEnabled := *account.IsLocalUserEnabled + destination.IsLocalUserEnabled = &isLocalUserEnabled + } else { + destination.IsLocalUserEnabled = nil + } + + // IsNfsV3Enabled + if account.IsNfsV3Enabled != nil { + isNfsV3Enabled := *account.IsNfsV3Enabled + destination.IsNfsV3Enabled = &isNfsV3Enabled + } else { + destination.IsNfsV3Enabled = nil + } + + // IsSftpEnabled + if account.IsSftpEnabled != nil { + isSftpEnabled := *account.IsSftpEnabled + destination.IsSftpEnabled = &isSftpEnabled + } else { + destination.IsSftpEnabled = nil + } + + // IsSkuConversionBlocked + if propertyBag.Contains("IsSkuConversionBlocked") { + var isSkuConversionBlocked bool + err := propertyBag.Pull("IsSkuConversionBlocked", &isSkuConversionBlocked) + if err != nil { + return errors.Wrap(err, "pulling 'IsSkuConversionBlocked' from propertyBag") + } + + destination.IsSkuConversionBlocked = &isSkuConversionBlocked + } else { + destination.IsSkuConversionBlocked = nil + } + + // KeyCreationTime + if account.KeyCreationTime != nil { + var keyCreationTime v20230101s.KeyCreationTime_STATUS + err := account.KeyCreationTime.AssignProperties_To_KeyCreationTime_STATUS(&keyCreationTime) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyCreationTime_STATUS() to populate field KeyCreationTime") + } + destination.KeyCreationTime = &keyCreationTime + } else { + destination.KeyCreationTime = nil + } + + // KeyPolicy + if account.KeyPolicy != nil { + var keyPolicy v20230101s.KeyPolicy_STATUS + err := account.KeyPolicy.AssignProperties_To_KeyPolicy_STATUS(&keyPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyPolicy_STATUS() to populate field KeyPolicy") + } + destination.KeyPolicy = &keyPolicy + } else { + destination.KeyPolicy = nil + } + + // Kind + destination.Kind = genruntime.ClonePointerToString(account.Kind) + + // LargeFileSharesState + destination.LargeFileSharesState = genruntime.ClonePointerToString(account.LargeFileSharesState) + + // LastGeoFailoverTime + destination.LastGeoFailoverTime = genruntime.ClonePointerToString(account.LastGeoFailoverTime) + + // Location + destination.Location = genruntime.ClonePointerToString(account.Location) + + // MinimumTlsVersion + destination.MinimumTlsVersion = genruntime.ClonePointerToString(account.MinimumTlsVersion) + + // Name + destination.Name = genruntime.ClonePointerToString(account.Name) + + // NetworkAcls + if account.NetworkAcls != nil { + var networkAcl v20230101s.NetworkRuleSet_STATUS + err := account.NetworkAcls.AssignProperties_To_NetworkRuleSet_STATUS(&networkAcl) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_NetworkRuleSet_STATUS() to populate field NetworkAcls") + } + destination.NetworkAcls = &networkAcl + } else { + destination.NetworkAcls = nil + } + + // PrimaryEndpoints + if account.PrimaryEndpoints != nil { + var primaryEndpoint v20230101s.Endpoints_STATUS + err := account.PrimaryEndpoints.AssignProperties_To_Endpoints_STATUS(&primaryEndpoint) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Endpoints_STATUS() to populate field PrimaryEndpoints") + } + destination.PrimaryEndpoints = &primaryEndpoint + } else { + destination.PrimaryEndpoints = nil + } + + // PrimaryLocation + destination.PrimaryLocation = genruntime.ClonePointerToString(account.PrimaryLocation) + + // PrivateEndpointConnections + if account.PrivateEndpointConnections != nil { + privateEndpointConnectionList := make([]v20230101s.PrivateEndpointConnection_STATUS, len(account.PrivateEndpointConnections)) + for privateEndpointConnectionIndex, privateEndpointConnectionItem := range account.PrivateEndpointConnections { + // Shadow the loop variable to avoid aliasing + privateEndpointConnectionItem := privateEndpointConnectionItem + var privateEndpointConnection v20230101s.PrivateEndpointConnection_STATUS + err := privateEndpointConnectionItem.AssignProperties_To_PrivateEndpointConnection_STATUS(&privateEndpointConnection) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_PrivateEndpointConnection_STATUS() to populate field PrivateEndpointConnections") + } + privateEndpointConnectionList[privateEndpointConnectionIndex] = privateEndpointConnection + } + destination.PrivateEndpointConnections = privateEndpointConnectionList + } else { + destination.PrivateEndpointConnections = nil + } + + // ProvisioningState + destination.ProvisioningState = genruntime.ClonePointerToString(account.ProvisioningState) + + // PublicNetworkAccess + destination.PublicNetworkAccess = genruntime.ClonePointerToString(account.PublicNetworkAccess) + + // RoutingPreference + if account.RoutingPreference != nil { + var routingPreference v20230101s.RoutingPreference_STATUS + err := account.RoutingPreference.AssignProperties_To_RoutingPreference_STATUS(&routingPreference) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_RoutingPreference_STATUS() to populate field RoutingPreference") + } + destination.RoutingPreference = &routingPreference + } else { + destination.RoutingPreference = nil + } + + // SasPolicy + if account.SasPolicy != nil { + var sasPolicy v20230101s.SasPolicy_STATUS + err := account.SasPolicy.AssignProperties_To_SasPolicy_STATUS(&sasPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SasPolicy_STATUS() to populate field SasPolicy") + } + destination.SasPolicy = &sasPolicy + } else { + destination.SasPolicy = nil + } + + // SecondaryEndpoints + if account.SecondaryEndpoints != nil { + var secondaryEndpoint v20230101s.Endpoints_STATUS + err := account.SecondaryEndpoints.AssignProperties_To_Endpoints_STATUS(&secondaryEndpoint) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Endpoints_STATUS() to populate field SecondaryEndpoints") + } + destination.SecondaryEndpoints = &secondaryEndpoint + } else { + destination.SecondaryEndpoints = nil + } + + // SecondaryLocation + destination.SecondaryLocation = genruntime.ClonePointerToString(account.SecondaryLocation) + + // Sku + if account.Sku != nil { + var sku v20230101s.Sku_STATUS + err := account.Sku.AssignProperties_To_Sku_STATUS(&sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Sku_STATUS() to populate field Sku") + } + destination.Sku = &sku + } else { + destination.Sku = nil + } + + // StatusOfPrimary + destination.StatusOfPrimary = genruntime.ClonePointerToString(account.StatusOfPrimary) + + // StatusOfSecondary + destination.StatusOfSecondary = genruntime.ClonePointerToString(account.StatusOfSecondary) + + // StorageAccountSkuConversionStatus + if account.StorageAccountSkuConversionStatus != nil { + var storageAccountSkuConversionStatus v20230101s.StorageAccountSkuConversionStatus_STATUS + err := account.StorageAccountSkuConversionStatus.AssignProperties_To_StorageAccountSkuConversionStatus_STATUS(&storageAccountSkuConversionStatus) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccountSkuConversionStatus_STATUS() to populate field StorageAccountSkuConversionStatus") + } + destination.StorageAccountSkuConversionStatus = &storageAccountSkuConversionStatus + } else { + destination.StorageAccountSkuConversionStatus = nil + } + + // SupportsHttpsTrafficOnly + if account.SupportsHttpsTrafficOnly != nil { + supportsHttpsTrafficOnly := *account.SupportsHttpsTrafficOnly + destination.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly + } else { + destination.SupportsHttpsTrafficOnly = nil + } + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(account.Tags) + + // Type + destination.Type = genruntime.ClonePointerToString(account.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccount_STATUS interface (if implemented) to customize the conversion + var accountAsAny any = account + if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount_STATUS); ok { + err := augmentedAccount.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForStorageAccount_Spec interface { + AssignPropertiesFrom(src *v20230101s.StorageAccount_Spec) error + AssignPropertiesTo(dst *v20230101s.StorageAccount_Spec) error +} + +type augmentConversionForStorageAccount_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccount_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccount_STATUS) error +} + +// Storage version of v1api20220901.AzureFilesIdentityBasedAuthentication +// Settings for Azure Files identity based authentication. +type AzureFilesIdentityBasedAuthentication struct { + ActiveDirectoryProperties *ActiveDirectoryProperties `json:"activeDirectoryProperties,omitempty"` + DefaultSharePermission *string `json:"defaultSharePermission,omitempty"` + DirectoryServiceOptions *string `json:"directoryServiceOptions,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_AzureFilesIdentityBasedAuthentication populates our AzureFilesIdentityBasedAuthentication from the provided source AzureFilesIdentityBasedAuthentication +func (authentication *AzureFilesIdentityBasedAuthentication) AssignProperties_From_AzureFilesIdentityBasedAuthentication(source *v20230101s.AzureFilesIdentityBasedAuthentication) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ActiveDirectoryProperties + if source.ActiveDirectoryProperties != nil { + var activeDirectoryProperty ActiveDirectoryProperties + err := activeDirectoryProperty.AssignProperties_From_ActiveDirectoryProperties(source.ActiveDirectoryProperties) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ActiveDirectoryProperties() to populate field ActiveDirectoryProperties") + } + authentication.ActiveDirectoryProperties = &activeDirectoryProperty + } else { + authentication.ActiveDirectoryProperties = nil + } + + // DefaultSharePermission + authentication.DefaultSharePermission = genruntime.ClonePointerToString(source.DefaultSharePermission) + + // DirectoryServiceOptions + authentication.DirectoryServiceOptions = genruntime.ClonePointerToString(source.DirectoryServiceOptions) + + // Update the property bag + if len(propertyBag) > 0 { + authentication.PropertyBag = propertyBag + } else { + authentication.PropertyBag = nil + } + + // Invoke the augmentConversionForAzureFilesIdentityBasedAuthentication interface (if implemented) to customize the conversion + var authenticationAsAny any = authentication + if augmentedAuthentication, ok := authenticationAsAny.(augmentConversionForAzureFilesIdentityBasedAuthentication); ok { + err := augmentedAuthentication.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_AzureFilesIdentityBasedAuthentication populates the provided destination AzureFilesIdentityBasedAuthentication from our AzureFilesIdentityBasedAuthentication +func (authentication *AzureFilesIdentityBasedAuthentication) AssignProperties_To_AzureFilesIdentityBasedAuthentication(destination *v20230101s.AzureFilesIdentityBasedAuthentication) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(authentication.PropertyBag) + + // ActiveDirectoryProperties + if authentication.ActiveDirectoryProperties != nil { + var activeDirectoryProperty v20230101s.ActiveDirectoryProperties + err := authentication.ActiveDirectoryProperties.AssignProperties_To_ActiveDirectoryProperties(&activeDirectoryProperty) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ActiveDirectoryProperties() to populate field ActiveDirectoryProperties") + } + destination.ActiveDirectoryProperties = &activeDirectoryProperty + } else { + destination.ActiveDirectoryProperties = nil + } + + // DefaultSharePermission + destination.DefaultSharePermission = genruntime.ClonePointerToString(authentication.DefaultSharePermission) + + // DirectoryServiceOptions + destination.DirectoryServiceOptions = genruntime.ClonePointerToString(authentication.DirectoryServiceOptions) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForAzureFilesIdentityBasedAuthentication interface (if implemented) to customize the conversion + var authenticationAsAny any = authentication + if augmentedAuthentication, ok := authenticationAsAny.(augmentConversionForAzureFilesIdentityBasedAuthentication); ok { + err := augmentedAuthentication.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.AzureFilesIdentityBasedAuthentication_STATUS +// Settings for Azure Files identity based authentication. +type AzureFilesIdentityBasedAuthentication_STATUS struct { + ActiveDirectoryProperties *ActiveDirectoryProperties_STATUS `json:"activeDirectoryProperties,omitempty"` + DefaultSharePermission *string `json:"defaultSharePermission,omitempty"` + DirectoryServiceOptions *string `json:"directoryServiceOptions,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS populates our AzureFilesIdentityBasedAuthentication_STATUS from the provided source AzureFilesIdentityBasedAuthentication_STATUS +func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS(source *v20230101s.AzureFilesIdentityBasedAuthentication_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ActiveDirectoryProperties + if source.ActiveDirectoryProperties != nil { + var activeDirectoryProperty ActiveDirectoryProperties_STATUS + err := activeDirectoryProperty.AssignProperties_From_ActiveDirectoryProperties_STATUS(source.ActiveDirectoryProperties) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ActiveDirectoryProperties_STATUS() to populate field ActiveDirectoryProperties") + } + authentication.ActiveDirectoryProperties = &activeDirectoryProperty + } else { + authentication.ActiveDirectoryProperties = nil + } + + // DefaultSharePermission + authentication.DefaultSharePermission = genruntime.ClonePointerToString(source.DefaultSharePermission) + + // DirectoryServiceOptions + authentication.DirectoryServiceOptions = genruntime.ClonePointerToString(source.DirectoryServiceOptions) + + // Update the property bag + if len(propertyBag) > 0 { + authentication.PropertyBag = propertyBag + } else { + authentication.PropertyBag = nil + } + + // Invoke the augmentConversionForAzureFilesIdentityBasedAuthentication_STATUS interface (if implemented) to customize the conversion + var authenticationAsAny any = authentication + if augmentedAuthentication, ok := authenticationAsAny.(augmentConversionForAzureFilesIdentityBasedAuthentication_STATUS); ok { + err := augmentedAuthentication.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS populates the provided destination AzureFilesIdentityBasedAuthentication_STATUS from our AzureFilesIdentityBasedAuthentication_STATUS +func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS(destination *v20230101s.AzureFilesIdentityBasedAuthentication_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(authentication.PropertyBag) + + // ActiveDirectoryProperties + if authentication.ActiveDirectoryProperties != nil { + var activeDirectoryProperty v20230101s.ActiveDirectoryProperties_STATUS + err := authentication.ActiveDirectoryProperties.AssignProperties_To_ActiveDirectoryProperties_STATUS(&activeDirectoryProperty) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ActiveDirectoryProperties_STATUS() to populate field ActiveDirectoryProperties") + } + destination.ActiveDirectoryProperties = &activeDirectoryProperty + } else { + destination.ActiveDirectoryProperties = nil + } + + // DefaultSharePermission + destination.DefaultSharePermission = genruntime.ClonePointerToString(authentication.DefaultSharePermission) + + // DirectoryServiceOptions + destination.DirectoryServiceOptions = genruntime.ClonePointerToString(authentication.DirectoryServiceOptions) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForAzureFilesIdentityBasedAuthentication_STATUS interface (if implemented) to customize the conversion + var authenticationAsAny any = authentication + if augmentedAuthentication, ok := authenticationAsAny.(augmentConversionForAzureFilesIdentityBasedAuthentication_STATUS); ok { + err := augmentedAuthentication.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.BlobRestoreStatus_STATUS +// Blob restore status. +type BlobRestoreStatus_STATUS struct { + FailureReason *string `json:"failureReason,omitempty"` + Parameters *BlobRestoreParameters_STATUS `json:"parameters,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RestoreId *string `json:"restoreId,omitempty"` + Status *string `json:"status,omitempty"` +} + +// AssignProperties_From_BlobRestoreStatus_STATUS populates our BlobRestoreStatus_STATUS from the provided source BlobRestoreStatus_STATUS +func (status *BlobRestoreStatus_STATUS) AssignProperties_From_BlobRestoreStatus_STATUS(source *v20230101s.BlobRestoreStatus_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // FailureReason + status.FailureReason = genruntime.ClonePointerToString(source.FailureReason) + + // Parameters + if source.Parameters != nil { + var parameter BlobRestoreParameters_STATUS + err := parameter.AssignProperties_From_BlobRestoreParameters_STATUS(source.Parameters) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_BlobRestoreParameters_STATUS() to populate field Parameters") + } + status.Parameters = ¶meter + } else { + status.Parameters = nil + } + + // RestoreId + status.RestoreId = genruntime.ClonePointerToString(source.RestoreId) + + // Status + status.Status = genruntime.ClonePointerToString(source.Status) + + // Update the property bag + if len(propertyBag) > 0 { + status.PropertyBag = propertyBag + } else { + status.PropertyBag = nil + } + + // Invoke the augmentConversionForBlobRestoreStatus_STATUS interface (if implemented) to customize the conversion + var statusAsAny any = status + if augmentedStatus, ok := statusAsAny.(augmentConversionForBlobRestoreStatus_STATUS); ok { + err := augmentedStatus.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_BlobRestoreStatus_STATUS populates the provided destination BlobRestoreStatus_STATUS from our BlobRestoreStatus_STATUS +func (status *BlobRestoreStatus_STATUS) AssignProperties_To_BlobRestoreStatus_STATUS(destination *v20230101s.BlobRestoreStatus_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(status.PropertyBag) + + // FailureReason + destination.FailureReason = genruntime.ClonePointerToString(status.FailureReason) + + // Parameters + if status.Parameters != nil { + var parameter v20230101s.BlobRestoreParameters_STATUS + err := status.Parameters.AssignProperties_To_BlobRestoreParameters_STATUS(¶meter) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_BlobRestoreParameters_STATUS() to populate field Parameters") + } + destination.Parameters = ¶meter + } else { + destination.Parameters = nil + } + + // RestoreId + destination.RestoreId = genruntime.ClonePointerToString(status.RestoreId) + + // Status + destination.Status = genruntime.ClonePointerToString(status.Status) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForBlobRestoreStatus_STATUS interface (if implemented) to customize the conversion + var statusAsAny any = status + if augmentedStatus, ok := statusAsAny.(augmentConversionForBlobRestoreStatus_STATUS); ok { + err := augmentedStatus.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.CustomDomain +// The custom domain assigned to this storage account. This can be set via Update. +type CustomDomain struct { + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + UseSubDomainName *bool `json:"useSubDomainName,omitempty"` +} + +// AssignProperties_From_CustomDomain populates our CustomDomain from the provided source CustomDomain +func (domain *CustomDomain) AssignProperties_From_CustomDomain(source *v20230101s.CustomDomain) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Name + domain.Name = genruntime.ClonePointerToString(source.Name) + + // UseSubDomainName + if source.UseSubDomainName != nil { + useSubDomainName := *source.UseSubDomainName + domain.UseSubDomainName = &useSubDomainName + } else { + domain.UseSubDomainName = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + domain.PropertyBag = propertyBag + } else { + domain.PropertyBag = nil + } + + // Invoke the augmentConversionForCustomDomain interface (if implemented) to customize the conversion + var domainAsAny any = domain + if augmentedDomain, ok := domainAsAny.(augmentConversionForCustomDomain); ok { + err := augmentedDomain.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_CustomDomain populates the provided destination CustomDomain from our CustomDomain +func (domain *CustomDomain) AssignProperties_To_CustomDomain(destination *v20230101s.CustomDomain) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(domain.PropertyBag) + + // Name + destination.Name = genruntime.ClonePointerToString(domain.Name) + + // UseSubDomainName + if domain.UseSubDomainName != nil { + useSubDomainName := *domain.UseSubDomainName + destination.UseSubDomainName = &useSubDomainName + } else { + destination.UseSubDomainName = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCustomDomain interface (if implemented) to customize the conversion + var domainAsAny any = domain + if augmentedDomain, ok := domainAsAny.(augmentConversionForCustomDomain); ok { + err := augmentedDomain.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.CustomDomain_STATUS +// The custom domain assigned to this storage account. This can be set via Update. +type CustomDomain_STATUS struct { + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + UseSubDomainName *bool `json:"useSubDomainName,omitempty"` +} + +// AssignProperties_From_CustomDomain_STATUS populates our CustomDomain_STATUS from the provided source CustomDomain_STATUS +func (domain *CustomDomain_STATUS) AssignProperties_From_CustomDomain_STATUS(source *v20230101s.CustomDomain_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Name + domain.Name = genruntime.ClonePointerToString(source.Name) + + // UseSubDomainName + if source.UseSubDomainName != nil { + useSubDomainName := *source.UseSubDomainName + domain.UseSubDomainName = &useSubDomainName + } else { + domain.UseSubDomainName = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + domain.PropertyBag = propertyBag + } else { + domain.PropertyBag = nil + } + + // Invoke the augmentConversionForCustomDomain_STATUS interface (if implemented) to customize the conversion + var domainAsAny any = domain + if augmentedDomain, ok := domainAsAny.(augmentConversionForCustomDomain_STATUS); ok { + err := augmentedDomain.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_CustomDomain_STATUS populates the provided destination CustomDomain_STATUS from our CustomDomain_STATUS +func (domain *CustomDomain_STATUS) AssignProperties_To_CustomDomain_STATUS(destination *v20230101s.CustomDomain_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(domain.PropertyBag) + + // Name + destination.Name = genruntime.ClonePointerToString(domain.Name) + + // UseSubDomainName + if domain.UseSubDomainName != nil { + useSubDomainName := *domain.UseSubDomainName + destination.UseSubDomainName = &useSubDomainName + } else { + destination.UseSubDomainName = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCustomDomain_STATUS interface (if implemented) to customize the conversion + var domainAsAny any = domain + if augmentedDomain, ok := domainAsAny.(augmentConversionForCustomDomain_STATUS); ok { + err := augmentedDomain.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.Encryption +// The encryption settings on the storage account. +type Encryption struct { + Identity *EncryptionIdentity `json:"identity,omitempty"` + KeySource *string `json:"keySource,omitempty"` + Keyvaultproperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` + Services *EncryptionServices `json:"services,omitempty"` +} + +// AssignProperties_From_Encryption populates our Encryption from the provided source Encryption +func (encryption *Encryption) AssignProperties_From_Encryption(source *v20230101s.Encryption) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Identity + if source.Identity != nil { + var identity EncryptionIdentity + err := identity.AssignProperties_From_EncryptionIdentity(source.Identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionIdentity() to populate field Identity") + } + encryption.Identity = &identity + } else { + encryption.Identity = nil + } + + // KeySource + encryption.KeySource = genruntime.ClonePointerToString(source.KeySource) + + // Keyvaultproperties + if source.Keyvaultproperties != nil { + var keyvaultproperty KeyVaultProperties + err := keyvaultproperty.AssignProperties_From_KeyVaultProperties(source.Keyvaultproperties) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyVaultProperties() to populate field Keyvaultproperties") + } + encryption.Keyvaultproperties = &keyvaultproperty + } else { + encryption.Keyvaultproperties = nil + } + + // RequireInfrastructureEncryption + if source.RequireInfrastructureEncryption != nil { + requireInfrastructureEncryption := *source.RequireInfrastructureEncryption + encryption.RequireInfrastructureEncryption = &requireInfrastructureEncryption + } else { + encryption.RequireInfrastructureEncryption = nil + } + + // Services + if source.Services != nil { + var service EncryptionServices + err := service.AssignProperties_From_EncryptionServices(source.Services) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionServices() to populate field Services") + } + encryption.Services = &service + } else { + encryption.Services = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + encryption.PropertyBag = propertyBag + } else { + encryption.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryption interface (if implemented) to customize the conversion + var encryptionAsAny any = encryption + if augmentedEncryption, ok := encryptionAsAny.(augmentConversionForEncryption); ok { + err := augmentedEncryption.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Encryption populates the provided destination Encryption from our Encryption +func (encryption *Encryption) AssignProperties_To_Encryption(destination *v20230101s.Encryption) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(encryption.PropertyBag) + + // Identity + if encryption.Identity != nil { + var identity v20230101s.EncryptionIdentity + err := encryption.Identity.AssignProperties_To_EncryptionIdentity(&identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionIdentity() to populate field Identity") + } + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // KeySource + destination.KeySource = genruntime.ClonePointerToString(encryption.KeySource) + + // Keyvaultproperties + if encryption.Keyvaultproperties != nil { + var keyvaultproperty v20230101s.KeyVaultProperties + err := encryption.Keyvaultproperties.AssignProperties_To_KeyVaultProperties(&keyvaultproperty) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyVaultProperties() to populate field Keyvaultproperties") + } + destination.Keyvaultproperties = &keyvaultproperty + } else { + destination.Keyvaultproperties = nil + } + + // RequireInfrastructureEncryption + if encryption.RequireInfrastructureEncryption != nil { + requireInfrastructureEncryption := *encryption.RequireInfrastructureEncryption + destination.RequireInfrastructureEncryption = &requireInfrastructureEncryption + } else { + destination.RequireInfrastructureEncryption = nil + } + + // Services + if encryption.Services != nil { + var service v20230101s.EncryptionServices + err := encryption.Services.AssignProperties_To_EncryptionServices(&service) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionServices() to populate field Services") + } + destination.Services = &service + } else { + destination.Services = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryption interface (if implemented) to customize the conversion + var encryptionAsAny any = encryption + if augmentedEncryption, ok := encryptionAsAny.(augmentConversionForEncryption); ok { + err := augmentedEncryption.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.Encryption_STATUS +// The encryption settings on the storage account. +type Encryption_STATUS struct { + Identity *EncryptionIdentity_STATUS `json:"identity,omitempty"` + KeySource *string `json:"keySource,omitempty"` + Keyvaultproperties *KeyVaultProperties_STATUS `json:"keyvaultproperties,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` + Services *EncryptionServices_STATUS `json:"services,omitempty"` +} + +// AssignProperties_From_Encryption_STATUS populates our Encryption_STATUS from the provided source Encryption_STATUS +func (encryption *Encryption_STATUS) AssignProperties_From_Encryption_STATUS(source *v20230101s.Encryption_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Identity + if source.Identity != nil { + var identity EncryptionIdentity_STATUS + err := identity.AssignProperties_From_EncryptionIdentity_STATUS(source.Identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionIdentity_STATUS() to populate field Identity") + } + encryption.Identity = &identity + } else { + encryption.Identity = nil + } + + // KeySource + encryption.KeySource = genruntime.ClonePointerToString(source.KeySource) + + // Keyvaultproperties + if source.Keyvaultproperties != nil { + var keyvaultproperty KeyVaultProperties_STATUS + err := keyvaultproperty.AssignProperties_From_KeyVaultProperties_STATUS(source.Keyvaultproperties) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyVaultProperties_STATUS() to populate field Keyvaultproperties") + } + encryption.Keyvaultproperties = &keyvaultproperty + } else { + encryption.Keyvaultproperties = nil + } + + // RequireInfrastructureEncryption + if source.RequireInfrastructureEncryption != nil { + requireInfrastructureEncryption := *source.RequireInfrastructureEncryption + encryption.RequireInfrastructureEncryption = &requireInfrastructureEncryption + } else { + encryption.RequireInfrastructureEncryption = nil + } + + // Services + if source.Services != nil { + var service EncryptionServices_STATUS + err := service.AssignProperties_From_EncryptionServices_STATUS(source.Services) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionServices_STATUS() to populate field Services") + } + encryption.Services = &service + } else { + encryption.Services = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + encryption.PropertyBag = propertyBag + } else { + encryption.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryption_STATUS interface (if implemented) to customize the conversion + var encryptionAsAny any = encryption + if augmentedEncryption, ok := encryptionAsAny.(augmentConversionForEncryption_STATUS); ok { + err := augmentedEncryption.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Encryption_STATUS populates the provided destination Encryption_STATUS from our Encryption_STATUS +func (encryption *Encryption_STATUS) AssignProperties_To_Encryption_STATUS(destination *v20230101s.Encryption_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(encryption.PropertyBag) + + // Identity + if encryption.Identity != nil { + var identity v20230101s.EncryptionIdentity_STATUS + err := encryption.Identity.AssignProperties_To_EncryptionIdentity_STATUS(&identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionIdentity_STATUS() to populate field Identity") + } + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // KeySource + destination.KeySource = genruntime.ClonePointerToString(encryption.KeySource) + + // Keyvaultproperties + if encryption.Keyvaultproperties != nil { + var keyvaultproperty v20230101s.KeyVaultProperties_STATUS + err := encryption.Keyvaultproperties.AssignProperties_To_KeyVaultProperties_STATUS(&keyvaultproperty) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyVaultProperties_STATUS() to populate field Keyvaultproperties") + } + destination.Keyvaultproperties = &keyvaultproperty + } else { + destination.Keyvaultproperties = nil + } + + // RequireInfrastructureEncryption + if encryption.RequireInfrastructureEncryption != nil { + requireInfrastructureEncryption := *encryption.RequireInfrastructureEncryption + destination.RequireInfrastructureEncryption = &requireInfrastructureEncryption + } else { + destination.RequireInfrastructureEncryption = nil + } + + // Services + if encryption.Services != nil { + var service v20230101s.EncryptionServices_STATUS + err := encryption.Services.AssignProperties_To_EncryptionServices_STATUS(&service) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionServices_STATUS() to populate field Services") + } + destination.Services = &service + } else { + destination.Services = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryption_STATUS interface (if implemented) to customize the conversion + var encryptionAsAny any = encryption + if augmentedEncryption, ok := encryptionAsAny.(augmentConversionForEncryption_STATUS); ok { + err := augmentedEncryption.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.Endpoints_STATUS +// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object. +type Endpoints_STATUS struct { + Blob *string `json:"blob,omitempty"` + Dfs *string `json:"dfs,omitempty"` + File *string `json:"file,omitempty"` + InternetEndpoints *StorageAccountInternetEndpoints_STATUS `json:"internetEndpoints,omitempty"` + MicrosoftEndpoints *StorageAccountMicrosoftEndpoints_STATUS `json:"microsoftEndpoints,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Queue *string `json:"queue,omitempty"` + Table *string `json:"table,omitempty"` + Web *string `json:"web,omitempty"` +} + +// AssignProperties_From_Endpoints_STATUS populates our Endpoints_STATUS from the provided source Endpoints_STATUS +func (endpoints *Endpoints_STATUS) AssignProperties_From_Endpoints_STATUS(source *v20230101s.Endpoints_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Blob + endpoints.Blob = genruntime.ClonePointerToString(source.Blob) + + // Dfs + endpoints.Dfs = genruntime.ClonePointerToString(source.Dfs) + + // File + endpoints.File = genruntime.ClonePointerToString(source.File) + + // InternetEndpoints + if source.InternetEndpoints != nil { + var internetEndpoint StorageAccountInternetEndpoints_STATUS + err := internetEndpoint.AssignProperties_From_StorageAccountInternetEndpoints_STATUS(source.InternetEndpoints) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccountInternetEndpoints_STATUS() to populate field InternetEndpoints") + } + endpoints.InternetEndpoints = &internetEndpoint + } else { + endpoints.InternetEndpoints = nil + } + + // MicrosoftEndpoints + if source.MicrosoftEndpoints != nil { + var microsoftEndpoint StorageAccountMicrosoftEndpoints_STATUS + err := microsoftEndpoint.AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS(source.MicrosoftEndpoints) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS() to populate field MicrosoftEndpoints") + } + endpoints.MicrosoftEndpoints = µsoftEndpoint + } else { + endpoints.MicrosoftEndpoints = nil + } + + // Queue + endpoints.Queue = genruntime.ClonePointerToString(source.Queue) + + // Table + endpoints.Table = genruntime.ClonePointerToString(source.Table) + + // Web + endpoints.Web = genruntime.ClonePointerToString(source.Web) + + // Update the property bag + if len(propertyBag) > 0 { + endpoints.PropertyBag = propertyBag + } else { + endpoints.PropertyBag = nil + } + + // Invoke the augmentConversionForEndpoints_STATUS interface (if implemented) to customize the conversion + var endpointsAsAny any = endpoints + if augmentedEndpoints, ok := endpointsAsAny.(augmentConversionForEndpoints_STATUS); ok { + err := augmentedEndpoints.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Endpoints_STATUS populates the provided destination Endpoints_STATUS from our Endpoints_STATUS +func (endpoints *Endpoints_STATUS) AssignProperties_To_Endpoints_STATUS(destination *v20230101s.Endpoints_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(endpoints.PropertyBag) + + // Blob + destination.Blob = genruntime.ClonePointerToString(endpoints.Blob) + + // Dfs + destination.Dfs = genruntime.ClonePointerToString(endpoints.Dfs) + + // File + destination.File = genruntime.ClonePointerToString(endpoints.File) + + // InternetEndpoints + if endpoints.InternetEndpoints != nil { + var internetEndpoint v20230101s.StorageAccountInternetEndpoints_STATUS + err := endpoints.InternetEndpoints.AssignProperties_To_StorageAccountInternetEndpoints_STATUS(&internetEndpoint) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccountInternetEndpoints_STATUS() to populate field InternetEndpoints") + } + destination.InternetEndpoints = &internetEndpoint + } else { + destination.InternetEndpoints = nil + } + + // MicrosoftEndpoints + if endpoints.MicrosoftEndpoints != nil { + var microsoftEndpoint v20230101s.StorageAccountMicrosoftEndpoints_STATUS + err := endpoints.MicrosoftEndpoints.AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS(µsoftEndpoint) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS() to populate field MicrosoftEndpoints") + } + destination.MicrosoftEndpoints = µsoftEndpoint + } else { + destination.MicrosoftEndpoints = nil + } + + // Queue + destination.Queue = genruntime.ClonePointerToString(endpoints.Queue) + + // Table + destination.Table = genruntime.ClonePointerToString(endpoints.Table) + + // Web + destination.Web = genruntime.ClonePointerToString(endpoints.Web) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForEndpoints_STATUS interface (if implemented) to customize the conversion + var endpointsAsAny any = endpoints + if augmentedEndpoints, ok := endpointsAsAny.(augmentConversionForEndpoints_STATUS); ok { + err := augmentedEndpoints.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.ExtendedLocation +// The complex type of the extended location. +type ExtendedLocation struct { + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` +} + +// AssignProperties_From_ExtendedLocation populates our ExtendedLocation from the provided source ExtendedLocation +func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source *v20230101s.ExtendedLocation) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Name + location.Name = genruntime.ClonePointerToString(source.Name) + + // Type + location.Type = genruntime.ClonePointerToString(source.Type) + + // Update the property bag + if len(propertyBag) > 0 { + location.PropertyBag = propertyBag + } else { + location.PropertyBag = nil + } + + // Invoke the augmentConversionForExtendedLocation interface (if implemented) to customize the conversion + var locationAsAny any = location + if augmentedLocation, ok := locationAsAny.(augmentConversionForExtendedLocation); ok { + err := augmentedLocation.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ExtendedLocation populates the provided destination ExtendedLocation from our ExtendedLocation +func (location *ExtendedLocation) AssignProperties_To_ExtendedLocation(destination *v20230101s.ExtendedLocation) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(location.PropertyBag) + + // Name + destination.Name = genruntime.ClonePointerToString(location.Name) + + // Type + destination.Type = genruntime.ClonePointerToString(location.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForExtendedLocation interface (if implemented) to customize the conversion + var locationAsAny any = location + if augmentedLocation, ok := locationAsAny.(augmentConversionForExtendedLocation); ok { + err := augmentedLocation.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.ExtendedLocation_STATUS +// The complex type of the extended location. +type ExtendedLocation_STATUS struct { + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` +} + +// AssignProperties_From_ExtendedLocation_STATUS populates our ExtendedLocation_STATUS from the provided source ExtendedLocation_STATUS +func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_STATUS(source *v20230101s.ExtendedLocation_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Name + location.Name = genruntime.ClonePointerToString(source.Name) + + // Type + location.Type = genruntime.ClonePointerToString(source.Type) + + // Update the property bag + if len(propertyBag) > 0 { + location.PropertyBag = propertyBag + } else { + location.PropertyBag = nil + } + + // Invoke the augmentConversionForExtendedLocation_STATUS interface (if implemented) to customize the conversion + var locationAsAny any = location + if augmentedLocation, ok := locationAsAny.(augmentConversionForExtendedLocation_STATUS); ok { + err := augmentedLocation.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ExtendedLocation_STATUS populates the provided destination ExtendedLocation_STATUS from our ExtendedLocation_STATUS +func (location *ExtendedLocation_STATUS) AssignProperties_To_ExtendedLocation_STATUS(destination *v20230101s.ExtendedLocation_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(location.PropertyBag) + + // Name + destination.Name = genruntime.ClonePointerToString(location.Name) + + // Type + destination.Type = genruntime.ClonePointerToString(location.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForExtendedLocation_STATUS interface (if implemented) to customize the conversion + var locationAsAny any = location + if augmentedLocation, ok := locationAsAny.(augmentConversionForExtendedLocation_STATUS); ok { + err := augmentedLocation.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.GeoReplicationStats_STATUS +// Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when +// geo-redundant replication is enabled for the storage account. +type GeoReplicationStats_STATUS struct { + CanFailover *bool `json:"canFailover,omitempty"` + LastSyncTime *string `json:"lastSyncTime,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Status *string `json:"status,omitempty"` +} + +// AssignProperties_From_GeoReplicationStats_STATUS populates our GeoReplicationStats_STATUS from the provided source GeoReplicationStats_STATUS +func (stats *GeoReplicationStats_STATUS) AssignProperties_From_GeoReplicationStats_STATUS(source *v20230101s.GeoReplicationStats_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // CanFailover + if source.CanFailover != nil { + canFailover := *source.CanFailover + stats.CanFailover = &canFailover + } else { + stats.CanFailover = nil + } + + // CanPlannedFailover + if source.CanPlannedFailover != nil { + propertyBag.Add("CanPlannedFailover", *source.CanPlannedFailover) + } else { + propertyBag.Remove("CanPlannedFailover") + } + + // LastSyncTime + stats.LastSyncTime = genruntime.ClonePointerToString(source.LastSyncTime) + + // PostFailoverRedundancy + if source.PostFailoverRedundancy != nil { + propertyBag.Add("PostFailoverRedundancy", *source.PostFailoverRedundancy) + } else { + propertyBag.Remove("PostFailoverRedundancy") + } + + // PostPlannedFailoverRedundancy + if source.PostPlannedFailoverRedundancy != nil { + propertyBag.Add("PostPlannedFailoverRedundancy", *source.PostPlannedFailoverRedundancy) + } else { + propertyBag.Remove("PostPlannedFailoverRedundancy") + } + + // Status + stats.Status = genruntime.ClonePointerToString(source.Status) + + // Update the property bag + if len(propertyBag) > 0 { + stats.PropertyBag = propertyBag + } else { + stats.PropertyBag = nil + } + + // Invoke the augmentConversionForGeoReplicationStats_STATUS interface (if implemented) to customize the conversion + var statsAsAny any = stats + if augmentedStats, ok := statsAsAny.(augmentConversionForGeoReplicationStats_STATUS); ok { + err := augmentedStats.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_GeoReplicationStats_STATUS populates the provided destination GeoReplicationStats_STATUS from our GeoReplicationStats_STATUS +func (stats *GeoReplicationStats_STATUS) AssignProperties_To_GeoReplicationStats_STATUS(destination *v20230101s.GeoReplicationStats_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(stats.PropertyBag) + + // CanFailover + if stats.CanFailover != nil { + canFailover := *stats.CanFailover + destination.CanFailover = &canFailover + } else { + destination.CanFailover = nil + } + + // CanPlannedFailover + if propertyBag.Contains("CanPlannedFailover") { + var canPlannedFailover bool + err := propertyBag.Pull("CanPlannedFailover", &canPlannedFailover) + if err != nil { + return errors.Wrap(err, "pulling 'CanPlannedFailover' from propertyBag") + } + + destination.CanPlannedFailover = &canPlannedFailover + } else { + destination.CanPlannedFailover = nil + } + + // LastSyncTime + destination.LastSyncTime = genruntime.ClonePointerToString(stats.LastSyncTime) + + // PostFailoverRedundancy + if propertyBag.Contains("PostFailoverRedundancy") { + var postFailoverRedundancy string + err := propertyBag.Pull("PostFailoverRedundancy", &postFailoverRedundancy) + if err != nil { + return errors.Wrap(err, "pulling 'PostFailoverRedundancy' from propertyBag") + } + + destination.PostFailoverRedundancy = &postFailoverRedundancy + } else { + destination.PostFailoverRedundancy = nil + } + + // PostPlannedFailoverRedundancy + if propertyBag.Contains("PostPlannedFailoverRedundancy") { + var postPlannedFailoverRedundancy string + err := propertyBag.Pull("PostPlannedFailoverRedundancy", &postPlannedFailoverRedundancy) + if err != nil { + return errors.Wrap(err, "pulling 'PostPlannedFailoverRedundancy' from propertyBag") + } + + destination.PostPlannedFailoverRedundancy = &postPlannedFailoverRedundancy + } else { + destination.PostPlannedFailoverRedundancy = nil + } + + // Status + destination.Status = genruntime.ClonePointerToString(stats.Status) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForGeoReplicationStats_STATUS interface (if implemented) to customize the conversion + var statsAsAny any = stats + if augmentedStats, ok := statsAsAny.(augmentConversionForGeoReplicationStats_STATUS); ok { + err := augmentedStats.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.Identity +// Identity for the resource. +type Identity struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` + UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"` +} + +// AssignProperties_From_Identity populates our Identity from the provided source Identity +func (identity *Identity) AssignProperties_From_Identity(source *v20230101s.Identity) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Type + identity.Type = genruntime.ClonePointerToString(source.Type) + + // UserAssignedIdentities + if source.UserAssignedIdentities != nil { + userAssignedIdentityList := make([]UserAssignedIdentityDetails, len(source.UserAssignedIdentities)) + for userAssignedIdentityIndex, userAssignedIdentityItem := range source.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityItem := userAssignedIdentityItem + var userAssignedIdentity UserAssignedIdentityDetails + err := userAssignedIdentity.AssignProperties_From_UserAssignedIdentityDetails(&userAssignedIdentityItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_UserAssignedIdentityDetails() to populate field UserAssignedIdentities") + } + userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity + } + identity.UserAssignedIdentities = userAssignedIdentityList + } else { + identity.UserAssignedIdentities = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + identity.PropertyBag = propertyBag + } else { + identity.PropertyBag = nil + } + + // Invoke the augmentConversionForIdentity interface (if implemented) to customize the conversion + var identityAsAny any = identity + if augmentedIdentity, ok := identityAsAny.(augmentConversionForIdentity); ok { + err := augmentedIdentity.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Identity populates the provided destination Identity from our Identity +func (identity *Identity) AssignProperties_To_Identity(destination *v20230101s.Identity) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(identity.PropertyBag) + + // Type + destination.Type = genruntime.ClonePointerToString(identity.Type) + + // UserAssignedIdentities + if identity.UserAssignedIdentities != nil { + userAssignedIdentityList := make([]v20230101s.UserAssignedIdentityDetails, len(identity.UserAssignedIdentities)) + for userAssignedIdentityIndex, userAssignedIdentityItem := range identity.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityItem := userAssignedIdentityItem + var userAssignedIdentity v20230101s.UserAssignedIdentityDetails + err := userAssignedIdentityItem.AssignProperties_To_UserAssignedIdentityDetails(&userAssignedIdentity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_UserAssignedIdentityDetails() to populate field UserAssignedIdentities") + } + userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity + } + destination.UserAssignedIdentities = userAssignedIdentityList + } else { + destination.UserAssignedIdentities = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForIdentity interface (if implemented) to customize the conversion + var identityAsAny any = identity + if augmentedIdentity, ok := identityAsAny.(augmentConversionForIdentity); ok { + err := augmentedIdentity.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.Identity_STATUS +// Identity for the resource. +type Identity_STATUS struct { + PrincipalId *string `json:"principalId,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TenantId *string `json:"tenantId,omitempty"` + Type *string `json:"type,omitempty"` + UserAssignedIdentities map[string]UserAssignedIdentity_STATUS `json:"userAssignedIdentities,omitempty"` +} + +// AssignProperties_From_Identity_STATUS populates our Identity_STATUS from the provided source Identity_STATUS +func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v20230101s.Identity_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // PrincipalId + identity.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId) + + // TenantId + identity.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // Type + identity.Type = genruntime.ClonePointerToString(source.Type) + + // UserAssignedIdentities + if source.UserAssignedIdentities != nil { + userAssignedIdentityMap := make(map[string]UserAssignedIdentity_STATUS, len(source.UserAssignedIdentities)) + for userAssignedIdentityKey, userAssignedIdentityValue := range source.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityValue := userAssignedIdentityValue + var userAssignedIdentity UserAssignedIdentity_STATUS + err := userAssignedIdentity.AssignProperties_From_UserAssignedIdentity_STATUS(&userAssignedIdentityValue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_UserAssignedIdentity_STATUS() to populate field UserAssignedIdentities") + } + userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity + } + identity.UserAssignedIdentities = userAssignedIdentityMap + } else { + identity.UserAssignedIdentities = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + identity.PropertyBag = propertyBag + } else { + identity.PropertyBag = nil + } + + // Invoke the augmentConversionForIdentity_STATUS interface (if implemented) to customize the conversion + var identityAsAny any = identity + if augmentedIdentity, ok := identityAsAny.(augmentConversionForIdentity_STATUS); ok { + err := augmentedIdentity.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Identity_STATUS populates the provided destination Identity_STATUS from our Identity_STATUS +func (identity *Identity_STATUS) AssignProperties_To_Identity_STATUS(destination *v20230101s.Identity_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(identity.PropertyBag) + + // PrincipalId + destination.PrincipalId = genruntime.ClonePointerToString(identity.PrincipalId) + + // TenantId + destination.TenantId = genruntime.ClonePointerToString(identity.TenantId) + + // Type + destination.Type = genruntime.ClonePointerToString(identity.Type) + + // UserAssignedIdentities + if identity.UserAssignedIdentities != nil { + userAssignedIdentityMap := make(map[string]v20230101s.UserAssignedIdentity_STATUS, len(identity.UserAssignedIdentities)) + for userAssignedIdentityKey, userAssignedIdentityValue := range identity.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityValue := userAssignedIdentityValue + var userAssignedIdentity v20230101s.UserAssignedIdentity_STATUS + err := userAssignedIdentityValue.AssignProperties_To_UserAssignedIdentity_STATUS(&userAssignedIdentity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_UserAssignedIdentity_STATUS() to populate field UserAssignedIdentities") + } + userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity + } + destination.UserAssignedIdentities = userAssignedIdentityMap + } else { + destination.UserAssignedIdentities = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForIdentity_STATUS interface (if implemented) to customize the conversion + var identityAsAny any = identity + if augmentedIdentity, ok := identityAsAny.(augmentConversionForIdentity_STATUS); ok { + err := augmentedIdentity.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.ImmutableStorageAccount +// This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. +type ImmutableStorageAccount struct { + Enabled *bool `json:"enabled,omitempty"` + ImmutabilityPolicy *AccountImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_ImmutableStorageAccount populates our ImmutableStorageAccount from the provided source ImmutableStorageAccount +func (account *ImmutableStorageAccount) AssignProperties_From_ImmutableStorageAccount(source *v20230101s.ImmutableStorageAccount) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + account.Enabled = &enabled + } else { + account.Enabled = nil + } + + // ImmutabilityPolicy + if source.ImmutabilityPolicy != nil { + var immutabilityPolicy AccountImmutabilityPolicyProperties + err := immutabilityPolicy.AssignProperties_From_AccountImmutabilityPolicyProperties(source.ImmutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AccountImmutabilityPolicyProperties() to populate field ImmutabilityPolicy") + } + account.ImmutabilityPolicy = &immutabilityPolicy + } else { + account.ImmutabilityPolicy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + account.PropertyBag = propertyBag + } else { + account.PropertyBag = nil + } + + // Invoke the augmentConversionForImmutableStorageAccount interface (if implemented) to customize the conversion + var accountAsAny any = account + if augmentedAccount, ok := accountAsAny.(augmentConversionForImmutableStorageAccount); ok { + err := augmentedAccount.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ImmutableStorageAccount populates the provided destination ImmutableStorageAccount from our ImmutableStorageAccount +func (account *ImmutableStorageAccount) AssignProperties_To_ImmutableStorageAccount(destination *v20230101s.ImmutableStorageAccount) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(account.PropertyBag) + + // Enabled + if account.Enabled != nil { + enabled := *account.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // ImmutabilityPolicy + if account.ImmutabilityPolicy != nil { + var immutabilityPolicy v20230101s.AccountImmutabilityPolicyProperties + err := account.ImmutabilityPolicy.AssignProperties_To_AccountImmutabilityPolicyProperties(&immutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AccountImmutabilityPolicyProperties() to populate field ImmutabilityPolicy") + } + destination.ImmutabilityPolicy = &immutabilityPolicy + } else { + destination.ImmutabilityPolicy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForImmutableStorageAccount interface (if implemented) to customize the conversion + var accountAsAny any = account + if augmentedAccount, ok := accountAsAny.(augmentConversionForImmutableStorageAccount); ok { + err := augmentedAccount.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.ImmutableStorageAccount_STATUS +// This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. +type ImmutableStorageAccount_STATUS struct { + Enabled *bool `json:"enabled,omitempty"` + ImmutabilityPolicy *AccountImmutabilityPolicyProperties_STATUS `json:"immutabilityPolicy,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_ImmutableStorageAccount_STATUS populates our ImmutableStorageAccount_STATUS from the provided source ImmutableStorageAccount_STATUS +func (account *ImmutableStorageAccount_STATUS) AssignProperties_From_ImmutableStorageAccount_STATUS(source *v20230101s.ImmutableStorageAccount_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + account.Enabled = &enabled + } else { + account.Enabled = nil + } + + // ImmutabilityPolicy + if source.ImmutabilityPolicy != nil { + var immutabilityPolicy AccountImmutabilityPolicyProperties_STATUS + err := immutabilityPolicy.AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS(source.ImmutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS() to populate field ImmutabilityPolicy") + } + account.ImmutabilityPolicy = &immutabilityPolicy + } else { + account.ImmutabilityPolicy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + account.PropertyBag = propertyBag + } else { + account.PropertyBag = nil + } + + // Invoke the augmentConversionForImmutableStorageAccount_STATUS interface (if implemented) to customize the conversion + var accountAsAny any = account + if augmentedAccount, ok := accountAsAny.(augmentConversionForImmutableStorageAccount_STATUS); ok { + err := augmentedAccount.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ImmutableStorageAccount_STATUS populates the provided destination ImmutableStorageAccount_STATUS from our ImmutableStorageAccount_STATUS +func (account *ImmutableStorageAccount_STATUS) AssignProperties_To_ImmutableStorageAccount_STATUS(destination *v20230101s.ImmutableStorageAccount_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(account.PropertyBag) + + // Enabled + if account.Enabled != nil { + enabled := *account.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // ImmutabilityPolicy + if account.ImmutabilityPolicy != nil { + var immutabilityPolicy v20230101s.AccountImmutabilityPolicyProperties_STATUS + err := account.ImmutabilityPolicy.AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS(&immutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS() to populate field ImmutabilityPolicy") + } + destination.ImmutabilityPolicy = &immutabilityPolicy + } else { + destination.ImmutabilityPolicy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForImmutableStorageAccount_STATUS interface (if implemented) to customize the conversion + var accountAsAny any = account + if augmentedAccount, ok := accountAsAny.(augmentConversionForImmutableStorageAccount_STATUS); ok { + err := augmentedAccount.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.KeyCreationTime_STATUS +// Storage account keys creation time. +type KeyCreationTime_STATUS struct { + Key1 *string `json:"key1,omitempty"` + Key2 *string `json:"key2,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_KeyCreationTime_STATUS populates our KeyCreationTime_STATUS from the provided source KeyCreationTime_STATUS +func (time *KeyCreationTime_STATUS) AssignProperties_From_KeyCreationTime_STATUS(source *v20230101s.KeyCreationTime_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Key1 + time.Key1 = genruntime.ClonePointerToString(source.Key1) + + // Key2 + time.Key2 = genruntime.ClonePointerToString(source.Key2) + + // Update the property bag + if len(propertyBag) > 0 { + time.PropertyBag = propertyBag + } else { + time.PropertyBag = nil + } + + // Invoke the augmentConversionForKeyCreationTime_STATUS interface (if implemented) to customize the conversion + var timeAsAny any = time + if augmentedTime, ok := timeAsAny.(augmentConversionForKeyCreationTime_STATUS); ok { + err := augmentedTime.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_KeyCreationTime_STATUS populates the provided destination KeyCreationTime_STATUS from our KeyCreationTime_STATUS +func (time *KeyCreationTime_STATUS) AssignProperties_To_KeyCreationTime_STATUS(destination *v20230101s.KeyCreationTime_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(time.PropertyBag) + + // Key1 + destination.Key1 = genruntime.ClonePointerToString(time.Key1) + + // Key2 + destination.Key2 = genruntime.ClonePointerToString(time.Key2) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForKeyCreationTime_STATUS interface (if implemented) to customize the conversion + var timeAsAny any = time + if augmentedTime, ok := timeAsAny.(augmentConversionForKeyCreationTime_STATUS); ok { + err := augmentedTime.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.KeyPolicy +// KeyPolicy assigned to the storage account. +type KeyPolicy struct { + KeyExpirationPeriodInDays *int `json:"keyExpirationPeriodInDays,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_KeyPolicy populates our KeyPolicy from the provided source KeyPolicy +func (policy *KeyPolicy) AssignProperties_From_KeyPolicy(source *v20230101s.KeyPolicy) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // KeyExpirationPeriodInDays + policy.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(source.KeyExpirationPeriodInDays) + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForKeyPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForKeyPolicy); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_KeyPolicy populates the provided destination KeyPolicy from our KeyPolicy +func (policy *KeyPolicy) AssignProperties_To_KeyPolicy(destination *v20230101s.KeyPolicy) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // KeyExpirationPeriodInDays + destination.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(policy.KeyExpirationPeriodInDays) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForKeyPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForKeyPolicy); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.KeyPolicy_STATUS +// KeyPolicy assigned to the storage account. +type KeyPolicy_STATUS struct { + KeyExpirationPeriodInDays *int `json:"keyExpirationPeriodInDays,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_KeyPolicy_STATUS populates our KeyPolicy_STATUS from the provided source KeyPolicy_STATUS +func (policy *KeyPolicy_STATUS) AssignProperties_From_KeyPolicy_STATUS(source *v20230101s.KeyPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // KeyExpirationPeriodInDays + policy.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(source.KeyExpirationPeriodInDays) + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForKeyPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForKeyPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_KeyPolicy_STATUS populates the provided destination KeyPolicy_STATUS from our KeyPolicy_STATUS +func (policy *KeyPolicy_STATUS) AssignProperties_To_KeyPolicy_STATUS(destination *v20230101s.KeyPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // KeyExpirationPeriodInDays + destination.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(policy.KeyExpirationPeriodInDays) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForKeyPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForKeyPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.NetworkRuleSet +// Network rule set +type NetworkRuleSet struct { + Bypass *string `json:"bypass,omitempty"` + DefaultAction *string `json:"defaultAction,omitempty"` + IpRules []IPRule `json:"ipRules,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ResourceAccessRules []ResourceAccessRule `json:"resourceAccessRules,omitempty"` + VirtualNetworkRules []VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` +} + +// AssignProperties_From_NetworkRuleSet populates our NetworkRuleSet from the provided source NetworkRuleSet +func (ruleSet *NetworkRuleSet) AssignProperties_From_NetworkRuleSet(source *v20230101s.NetworkRuleSet) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Bypass + ruleSet.Bypass = genruntime.ClonePointerToString(source.Bypass) + + // DefaultAction + ruleSet.DefaultAction = genruntime.ClonePointerToString(source.DefaultAction) + + // IpRules + if source.IpRules != nil { + ipRuleList := make([]IPRule, len(source.IpRules)) + for ipRuleIndex, ipRuleItem := range source.IpRules { + // Shadow the loop variable to avoid aliasing + ipRuleItem := ipRuleItem + var ipRule IPRule + err := ipRule.AssignProperties_From_IPRule(&ipRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_IPRule() to populate field IpRules") + } + ipRuleList[ipRuleIndex] = ipRule + } + ruleSet.IpRules = ipRuleList + } else { + ruleSet.IpRules = nil + } + + // ResourceAccessRules + if source.ResourceAccessRules != nil { + resourceAccessRuleList := make([]ResourceAccessRule, len(source.ResourceAccessRules)) + for resourceAccessRuleIndex, resourceAccessRuleItem := range source.ResourceAccessRules { + // Shadow the loop variable to avoid aliasing + resourceAccessRuleItem := resourceAccessRuleItem + var resourceAccessRule ResourceAccessRule + err := resourceAccessRule.AssignProperties_From_ResourceAccessRule(&resourceAccessRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ResourceAccessRule() to populate field ResourceAccessRules") + } + resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule + } + ruleSet.ResourceAccessRules = resourceAccessRuleList + } else { + ruleSet.ResourceAccessRules = nil + } + + // VirtualNetworkRules + if source.VirtualNetworkRules != nil { + virtualNetworkRuleList := make([]VirtualNetworkRule, len(source.VirtualNetworkRules)) + for virtualNetworkRuleIndex, virtualNetworkRuleItem := range source.VirtualNetworkRules { + // Shadow the loop variable to avoid aliasing + virtualNetworkRuleItem := virtualNetworkRuleItem + var virtualNetworkRule VirtualNetworkRule + err := virtualNetworkRule.AssignProperties_From_VirtualNetworkRule(&virtualNetworkRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_VirtualNetworkRule() to populate field VirtualNetworkRules") + } + virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule + } + ruleSet.VirtualNetworkRules = virtualNetworkRuleList + } else { + ruleSet.VirtualNetworkRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + ruleSet.PropertyBag = propertyBag + } else { + ruleSet.PropertyBag = nil + } + + // Invoke the augmentConversionForNetworkRuleSet interface (if implemented) to customize the conversion + var ruleSetAsAny any = ruleSet + if augmentedRuleSet, ok := ruleSetAsAny.(augmentConversionForNetworkRuleSet); ok { + err := augmentedRuleSet.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_NetworkRuleSet populates the provided destination NetworkRuleSet from our NetworkRuleSet +func (ruleSet *NetworkRuleSet) AssignProperties_To_NetworkRuleSet(destination *v20230101s.NetworkRuleSet) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(ruleSet.PropertyBag) + + // Bypass + destination.Bypass = genruntime.ClonePointerToString(ruleSet.Bypass) + + // DefaultAction + destination.DefaultAction = genruntime.ClonePointerToString(ruleSet.DefaultAction) + + // IpRules + if ruleSet.IpRules != nil { + ipRuleList := make([]v20230101s.IPRule, len(ruleSet.IpRules)) + for ipRuleIndex, ipRuleItem := range ruleSet.IpRules { + // Shadow the loop variable to avoid aliasing + ipRuleItem := ipRuleItem + var ipRule v20230101s.IPRule + err := ipRuleItem.AssignProperties_To_IPRule(&ipRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_IPRule() to populate field IpRules") + } + ipRuleList[ipRuleIndex] = ipRule + } + destination.IpRules = ipRuleList + } else { + destination.IpRules = nil + } + + // ResourceAccessRules + if ruleSet.ResourceAccessRules != nil { + resourceAccessRuleList := make([]v20230101s.ResourceAccessRule, len(ruleSet.ResourceAccessRules)) + for resourceAccessRuleIndex, resourceAccessRuleItem := range ruleSet.ResourceAccessRules { + // Shadow the loop variable to avoid aliasing + resourceAccessRuleItem := resourceAccessRuleItem + var resourceAccessRule v20230101s.ResourceAccessRule + err := resourceAccessRuleItem.AssignProperties_To_ResourceAccessRule(&resourceAccessRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ResourceAccessRule() to populate field ResourceAccessRules") + } + resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule + } + destination.ResourceAccessRules = resourceAccessRuleList + } else { + destination.ResourceAccessRules = nil + } + + // VirtualNetworkRules + if ruleSet.VirtualNetworkRules != nil { + virtualNetworkRuleList := make([]v20230101s.VirtualNetworkRule, len(ruleSet.VirtualNetworkRules)) + for virtualNetworkRuleIndex, virtualNetworkRuleItem := range ruleSet.VirtualNetworkRules { + // Shadow the loop variable to avoid aliasing + virtualNetworkRuleItem := virtualNetworkRuleItem + var virtualNetworkRule v20230101s.VirtualNetworkRule + err := virtualNetworkRuleItem.AssignProperties_To_VirtualNetworkRule(&virtualNetworkRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_VirtualNetworkRule() to populate field VirtualNetworkRules") + } + virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule + } + destination.VirtualNetworkRules = virtualNetworkRuleList + } else { + destination.VirtualNetworkRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForNetworkRuleSet interface (if implemented) to customize the conversion + var ruleSetAsAny any = ruleSet + if augmentedRuleSet, ok := ruleSetAsAny.(augmentConversionForNetworkRuleSet); ok { + err := augmentedRuleSet.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.NetworkRuleSet_STATUS +// Network rule set +type NetworkRuleSet_STATUS struct { + Bypass *string `json:"bypass,omitempty"` + DefaultAction *string `json:"defaultAction,omitempty"` + IpRules []IPRule_STATUS `json:"ipRules,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ResourceAccessRules []ResourceAccessRule_STATUS `json:"resourceAccessRules,omitempty"` + VirtualNetworkRules []VirtualNetworkRule_STATUS `json:"virtualNetworkRules,omitempty"` +} + +// AssignProperties_From_NetworkRuleSet_STATUS populates our NetworkRuleSet_STATUS from the provided source NetworkRuleSet_STATUS +func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_From_NetworkRuleSet_STATUS(source *v20230101s.NetworkRuleSet_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Bypass + ruleSet.Bypass = genruntime.ClonePointerToString(source.Bypass) + + // DefaultAction + ruleSet.DefaultAction = genruntime.ClonePointerToString(source.DefaultAction) + + // IpRules + if source.IpRules != nil { + ipRuleList := make([]IPRule_STATUS, len(source.IpRules)) + for ipRuleIndex, ipRuleItem := range source.IpRules { + // Shadow the loop variable to avoid aliasing + ipRuleItem := ipRuleItem + var ipRule IPRule_STATUS + err := ipRule.AssignProperties_From_IPRule_STATUS(&ipRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_IPRule_STATUS() to populate field IpRules") + } + ipRuleList[ipRuleIndex] = ipRule + } + ruleSet.IpRules = ipRuleList + } else { + ruleSet.IpRules = nil + } + + // ResourceAccessRules + if source.ResourceAccessRules != nil { + resourceAccessRuleList := make([]ResourceAccessRule_STATUS, len(source.ResourceAccessRules)) + for resourceAccessRuleIndex, resourceAccessRuleItem := range source.ResourceAccessRules { + // Shadow the loop variable to avoid aliasing + resourceAccessRuleItem := resourceAccessRuleItem + var resourceAccessRule ResourceAccessRule_STATUS + err := resourceAccessRule.AssignProperties_From_ResourceAccessRule_STATUS(&resourceAccessRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ResourceAccessRule_STATUS() to populate field ResourceAccessRules") + } + resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule + } + ruleSet.ResourceAccessRules = resourceAccessRuleList + } else { + ruleSet.ResourceAccessRules = nil + } + + // VirtualNetworkRules + if source.VirtualNetworkRules != nil { + virtualNetworkRuleList := make([]VirtualNetworkRule_STATUS, len(source.VirtualNetworkRules)) + for virtualNetworkRuleIndex, virtualNetworkRuleItem := range source.VirtualNetworkRules { + // Shadow the loop variable to avoid aliasing + virtualNetworkRuleItem := virtualNetworkRuleItem + var virtualNetworkRule VirtualNetworkRule_STATUS + err := virtualNetworkRule.AssignProperties_From_VirtualNetworkRule_STATUS(&virtualNetworkRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_VirtualNetworkRule_STATUS() to populate field VirtualNetworkRules") + } + virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule + } + ruleSet.VirtualNetworkRules = virtualNetworkRuleList + } else { + ruleSet.VirtualNetworkRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + ruleSet.PropertyBag = propertyBag + } else { + ruleSet.PropertyBag = nil + } + + // Invoke the augmentConversionForNetworkRuleSet_STATUS interface (if implemented) to customize the conversion + var ruleSetAsAny any = ruleSet + if augmentedRuleSet, ok := ruleSetAsAny.(augmentConversionForNetworkRuleSet_STATUS); ok { + err := augmentedRuleSet.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_NetworkRuleSet_STATUS populates the provided destination NetworkRuleSet_STATUS from our NetworkRuleSet_STATUS +func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_To_NetworkRuleSet_STATUS(destination *v20230101s.NetworkRuleSet_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(ruleSet.PropertyBag) + + // Bypass + destination.Bypass = genruntime.ClonePointerToString(ruleSet.Bypass) + + // DefaultAction + destination.DefaultAction = genruntime.ClonePointerToString(ruleSet.DefaultAction) + + // IpRules + if ruleSet.IpRules != nil { + ipRuleList := make([]v20230101s.IPRule_STATUS, len(ruleSet.IpRules)) + for ipRuleIndex, ipRuleItem := range ruleSet.IpRules { + // Shadow the loop variable to avoid aliasing + ipRuleItem := ipRuleItem + var ipRule v20230101s.IPRule_STATUS + err := ipRuleItem.AssignProperties_To_IPRule_STATUS(&ipRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_IPRule_STATUS() to populate field IpRules") + } + ipRuleList[ipRuleIndex] = ipRule + } + destination.IpRules = ipRuleList + } else { + destination.IpRules = nil + } + + // ResourceAccessRules + if ruleSet.ResourceAccessRules != nil { + resourceAccessRuleList := make([]v20230101s.ResourceAccessRule_STATUS, len(ruleSet.ResourceAccessRules)) + for resourceAccessRuleIndex, resourceAccessRuleItem := range ruleSet.ResourceAccessRules { + // Shadow the loop variable to avoid aliasing + resourceAccessRuleItem := resourceAccessRuleItem + var resourceAccessRule v20230101s.ResourceAccessRule_STATUS + err := resourceAccessRuleItem.AssignProperties_To_ResourceAccessRule_STATUS(&resourceAccessRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ResourceAccessRule_STATUS() to populate field ResourceAccessRules") + } + resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule + } + destination.ResourceAccessRules = resourceAccessRuleList + } else { + destination.ResourceAccessRules = nil + } + + // VirtualNetworkRules + if ruleSet.VirtualNetworkRules != nil { + virtualNetworkRuleList := make([]v20230101s.VirtualNetworkRule_STATUS, len(ruleSet.VirtualNetworkRules)) + for virtualNetworkRuleIndex, virtualNetworkRuleItem := range ruleSet.VirtualNetworkRules { + // Shadow the loop variable to avoid aliasing + virtualNetworkRuleItem := virtualNetworkRuleItem + var virtualNetworkRule v20230101s.VirtualNetworkRule_STATUS + err := virtualNetworkRuleItem.AssignProperties_To_VirtualNetworkRule_STATUS(&virtualNetworkRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_VirtualNetworkRule_STATUS() to populate field VirtualNetworkRules") + } + virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule + } + destination.VirtualNetworkRules = virtualNetworkRuleList + } else { + destination.VirtualNetworkRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForNetworkRuleSet_STATUS interface (if implemented) to customize the conversion + var ruleSetAsAny any = ruleSet + if augmentedRuleSet, ok := ruleSetAsAny.(augmentConversionForNetworkRuleSet_STATUS); ok { + err := augmentedRuleSet.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.PrivateEndpointConnection_STATUS +// The Private Endpoint Connection resource. +type PrivateEndpointConnection_STATUS struct { + Id *string `json:"id,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_PrivateEndpointConnection_STATUS populates our PrivateEndpointConnection_STATUS from the provided source PrivateEndpointConnection_STATUS +func (connection *PrivateEndpointConnection_STATUS) AssignProperties_From_PrivateEndpointConnection_STATUS(source *v20230101s.PrivateEndpointConnection_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Id + connection.Id = genruntime.ClonePointerToString(source.Id) + + // Update the property bag + if len(propertyBag) > 0 { + connection.PropertyBag = propertyBag + } else { + connection.PropertyBag = nil + } + + // Invoke the augmentConversionForPrivateEndpointConnection_STATUS interface (if implemented) to customize the conversion + var connectionAsAny any = connection + if augmentedConnection, ok := connectionAsAny.(augmentConversionForPrivateEndpointConnection_STATUS); ok { + err := augmentedConnection.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_PrivateEndpointConnection_STATUS populates the provided destination PrivateEndpointConnection_STATUS from our PrivateEndpointConnection_STATUS +func (connection *PrivateEndpointConnection_STATUS) AssignProperties_To_PrivateEndpointConnection_STATUS(destination *v20230101s.PrivateEndpointConnection_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(connection.PropertyBag) + + // Id + destination.Id = genruntime.ClonePointerToString(connection.Id) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForPrivateEndpointConnection_STATUS interface (if implemented) to customize the conversion + var connectionAsAny any = connection + if augmentedConnection, ok := connectionAsAny.(augmentConversionForPrivateEndpointConnection_STATUS); ok { + err := augmentedConnection.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.RoutingPreference +// Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user +// data, the default option is microsoft routing +type RoutingPreference struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` + PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` + RoutingChoice *string `json:"routingChoice,omitempty"` +} + +// AssignProperties_From_RoutingPreference populates our RoutingPreference from the provided source RoutingPreference +func (preference *RoutingPreference) AssignProperties_From_RoutingPreference(source *v20230101s.RoutingPreference) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // PublishInternetEndpoints + if source.PublishInternetEndpoints != nil { + publishInternetEndpoint := *source.PublishInternetEndpoints + preference.PublishInternetEndpoints = &publishInternetEndpoint + } else { + preference.PublishInternetEndpoints = nil + } + + // PublishMicrosoftEndpoints + if source.PublishMicrosoftEndpoints != nil { + publishMicrosoftEndpoint := *source.PublishMicrosoftEndpoints + preference.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint + } else { + preference.PublishMicrosoftEndpoints = nil + } + + // RoutingChoice + preference.RoutingChoice = genruntime.ClonePointerToString(source.RoutingChoice) + + // Update the property bag + if len(propertyBag) > 0 { + preference.PropertyBag = propertyBag + } else { + preference.PropertyBag = nil + } + + // Invoke the augmentConversionForRoutingPreference interface (if implemented) to customize the conversion + var preferenceAsAny any = preference + if augmentedPreference, ok := preferenceAsAny.(augmentConversionForRoutingPreference); ok { + err := augmentedPreference.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_RoutingPreference populates the provided destination RoutingPreference from our RoutingPreference +func (preference *RoutingPreference) AssignProperties_To_RoutingPreference(destination *v20230101s.RoutingPreference) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(preference.PropertyBag) + + // PublishInternetEndpoints + if preference.PublishInternetEndpoints != nil { + publishInternetEndpoint := *preference.PublishInternetEndpoints + destination.PublishInternetEndpoints = &publishInternetEndpoint + } else { + destination.PublishInternetEndpoints = nil + } + + // PublishMicrosoftEndpoints + if preference.PublishMicrosoftEndpoints != nil { + publishMicrosoftEndpoint := *preference.PublishMicrosoftEndpoints + destination.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint + } else { + destination.PublishMicrosoftEndpoints = nil + } + + // RoutingChoice + destination.RoutingChoice = genruntime.ClonePointerToString(preference.RoutingChoice) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForRoutingPreference interface (if implemented) to customize the conversion + var preferenceAsAny any = preference + if augmentedPreference, ok := preferenceAsAny.(augmentConversionForRoutingPreference); ok { + err := augmentedPreference.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.RoutingPreference_STATUS +// Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user +// data, the default option is microsoft routing +type RoutingPreference_STATUS struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` + PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` + RoutingChoice *string `json:"routingChoice,omitempty"` +} + +// AssignProperties_From_RoutingPreference_STATUS populates our RoutingPreference_STATUS from the provided source RoutingPreference_STATUS +func (preference *RoutingPreference_STATUS) AssignProperties_From_RoutingPreference_STATUS(source *v20230101s.RoutingPreference_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // PublishInternetEndpoints + if source.PublishInternetEndpoints != nil { + publishInternetEndpoint := *source.PublishInternetEndpoints + preference.PublishInternetEndpoints = &publishInternetEndpoint + } else { + preference.PublishInternetEndpoints = nil + } + + // PublishMicrosoftEndpoints + if source.PublishMicrosoftEndpoints != nil { + publishMicrosoftEndpoint := *source.PublishMicrosoftEndpoints + preference.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint + } else { + preference.PublishMicrosoftEndpoints = nil + } + + // RoutingChoice + preference.RoutingChoice = genruntime.ClonePointerToString(source.RoutingChoice) + + // Update the property bag + if len(propertyBag) > 0 { + preference.PropertyBag = propertyBag + } else { + preference.PropertyBag = nil + } + + // Invoke the augmentConversionForRoutingPreference_STATUS interface (if implemented) to customize the conversion + var preferenceAsAny any = preference + if augmentedPreference, ok := preferenceAsAny.(augmentConversionForRoutingPreference_STATUS); ok { + err := augmentedPreference.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_RoutingPreference_STATUS populates the provided destination RoutingPreference_STATUS from our RoutingPreference_STATUS +func (preference *RoutingPreference_STATUS) AssignProperties_To_RoutingPreference_STATUS(destination *v20230101s.RoutingPreference_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(preference.PropertyBag) + + // PublishInternetEndpoints + if preference.PublishInternetEndpoints != nil { + publishInternetEndpoint := *preference.PublishInternetEndpoints + destination.PublishInternetEndpoints = &publishInternetEndpoint + } else { + destination.PublishInternetEndpoints = nil + } + + // PublishMicrosoftEndpoints + if preference.PublishMicrosoftEndpoints != nil { + publishMicrosoftEndpoint := *preference.PublishMicrosoftEndpoints + destination.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint + } else { + destination.PublishMicrosoftEndpoints = nil + } + + // RoutingChoice + destination.RoutingChoice = genruntime.ClonePointerToString(preference.RoutingChoice) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForRoutingPreference_STATUS interface (if implemented) to customize the conversion + var preferenceAsAny any = preference + if augmentedPreference, ok := preferenceAsAny.(augmentConversionForRoutingPreference_STATUS); ok { + err := augmentedPreference.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.SasPolicy +// SasPolicy assigned to the storage account. +type SasPolicy struct { + ExpirationAction *string `json:"expirationAction,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"` +} + +// AssignProperties_From_SasPolicy populates our SasPolicy from the provided source SasPolicy +func (policy *SasPolicy) AssignProperties_From_SasPolicy(source *v20230101s.SasPolicy) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ExpirationAction + policy.ExpirationAction = genruntime.ClonePointerToString(source.ExpirationAction) + + // SasExpirationPeriod + policy.SasExpirationPeriod = genruntime.ClonePointerToString(source.SasExpirationPeriod) + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForSasPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForSasPolicy); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_SasPolicy populates the provided destination SasPolicy from our SasPolicy +func (policy *SasPolicy) AssignProperties_To_SasPolicy(destination *v20230101s.SasPolicy) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // ExpirationAction + destination.ExpirationAction = genruntime.ClonePointerToString(policy.ExpirationAction) + + // SasExpirationPeriod + destination.SasExpirationPeriod = genruntime.ClonePointerToString(policy.SasExpirationPeriod) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSasPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForSasPolicy); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.SasPolicy_STATUS +// SasPolicy assigned to the storage account. +type SasPolicy_STATUS struct { + ExpirationAction *string `json:"expirationAction,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"` +} + +// AssignProperties_From_SasPolicy_STATUS populates our SasPolicy_STATUS from the provided source SasPolicy_STATUS +func (policy *SasPolicy_STATUS) AssignProperties_From_SasPolicy_STATUS(source *v20230101s.SasPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ExpirationAction + policy.ExpirationAction = genruntime.ClonePointerToString(source.ExpirationAction) + + // SasExpirationPeriod + policy.SasExpirationPeriod = genruntime.ClonePointerToString(source.SasExpirationPeriod) + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForSasPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForSasPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_SasPolicy_STATUS populates the provided destination SasPolicy_STATUS from our SasPolicy_STATUS +func (policy *SasPolicy_STATUS) AssignProperties_To_SasPolicy_STATUS(destination *v20230101s.SasPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // ExpirationAction + destination.ExpirationAction = genruntime.ClonePointerToString(policy.ExpirationAction) + + // SasExpirationPeriod + destination.SasExpirationPeriod = genruntime.ClonePointerToString(policy.SasExpirationPeriod) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSasPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForSasPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.Sku +// The SKU of the storage account. +type Sku struct { + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Tier *string `json:"tier,omitempty"` +} + +// AssignProperties_From_Sku populates our Sku from the provided source Sku +func (sku *Sku) AssignProperties_From_Sku(source *v20230101s.Sku) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Name + sku.Name = genruntime.ClonePointerToString(source.Name) + + // Tier + sku.Tier = genruntime.ClonePointerToString(source.Tier) + + // Update the property bag + if len(propertyBag) > 0 { + sku.PropertyBag = propertyBag + } else { + sku.PropertyBag = nil + } + + // Invoke the augmentConversionForSku interface (if implemented) to customize the conversion + var skuAsAny any = sku + if augmentedSku, ok := skuAsAny.(augmentConversionForSku); ok { + err := augmentedSku.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Sku populates the provided destination Sku from our Sku +func (sku *Sku) AssignProperties_To_Sku(destination *v20230101s.Sku) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(sku.PropertyBag) + + // Name + destination.Name = genruntime.ClonePointerToString(sku.Name) + + // Tier + destination.Tier = genruntime.ClonePointerToString(sku.Tier) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSku interface (if implemented) to customize the conversion + var skuAsAny any = sku + if augmentedSku, ok := skuAsAny.(augmentConversionForSku); ok { + err := augmentedSku.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.Sku_STATUS +// The SKU of the storage account. +type Sku_STATUS struct { + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Tier *string `json:"tier,omitempty"` +} + +// AssignProperties_From_Sku_STATUS populates our Sku_STATUS from the provided source Sku_STATUS +func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20230101s.Sku_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Name + sku.Name = genruntime.ClonePointerToString(source.Name) + + // Tier + sku.Tier = genruntime.ClonePointerToString(source.Tier) + + // Update the property bag + if len(propertyBag) > 0 { + sku.PropertyBag = propertyBag + } else { + sku.PropertyBag = nil + } + + // Invoke the augmentConversionForSku_STATUS interface (if implemented) to customize the conversion + var skuAsAny any = sku + if augmentedSku, ok := skuAsAny.(augmentConversionForSku_STATUS); ok { + err := augmentedSku.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Sku_STATUS populates the provided destination Sku_STATUS from our Sku_STATUS +func (sku *Sku_STATUS) AssignProperties_To_Sku_STATUS(destination *v20230101s.Sku_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(sku.PropertyBag) + + // Name + destination.Name = genruntime.ClonePointerToString(sku.Name) + + // Tier + destination.Tier = genruntime.ClonePointerToString(sku.Tier) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSku_STATUS interface (if implemented) to customize the conversion + var skuAsAny any = sku + if augmentedSku, ok := skuAsAny.(augmentConversionForSku_STATUS); ok { + err := augmentedSku.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.StorageAccountOperatorSpec +// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure +type StorageAccountOperatorSpec struct { + ConfigMaps *StorageAccountOperatorConfigMaps `json:"configMaps,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Secrets *StorageAccountOperatorSecrets `json:"secrets,omitempty"` +} + +// AssignProperties_From_StorageAccountOperatorSpec populates our StorageAccountOperatorSpec from the provided source StorageAccountOperatorSpec +func (operator *StorageAccountOperatorSpec) AssignProperties_From_StorageAccountOperatorSpec(source *v20230101s.StorageAccountOperatorSpec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ConfigMaps + if source.ConfigMaps != nil { + var configMap StorageAccountOperatorConfigMaps + err := configMap.AssignProperties_From_StorageAccountOperatorConfigMaps(source.ConfigMaps) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccountOperatorConfigMaps() to populate field ConfigMaps") + } + operator.ConfigMaps = &configMap + } else { + operator.ConfigMaps = nil + } + + // Secrets + if source.Secrets != nil { + var secret StorageAccountOperatorSecrets + err := secret.AssignProperties_From_StorageAccountOperatorSecrets(source.Secrets) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccountOperatorSecrets() to populate field Secrets") + } + operator.Secrets = &secret + } else { + operator.Secrets = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + operator.PropertyBag = propertyBag + } else { + operator.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccountOperatorSpec interface (if implemented) to customize the conversion + var operatorAsAny any = operator + if augmentedOperator, ok := operatorAsAny.(augmentConversionForStorageAccountOperatorSpec); ok { + err := augmentedOperator.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountOperatorSpec populates the provided destination StorageAccountOperatorSpec from our StorageAccountOperatorSpec +func (operator *StorageAccountOperatorSpec) AssignProperties_To_StorageAccountOperatorSpec(destination *v20230101s.StorageAccountOperatorSpec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(operator.PropertyBag) + + // ConfigMaps + if operator.ConfigMaps != nil { + var configMap v20230101s.StorageAccountOperatorConfigMaps + err := operator.ConfigMaps.AssignProperties_To_StorageAccountOperatorConfigMaps(&configMap) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccountOperatorConfigMaps() to populate field ConfigMaps") + } + destination.ConfigMaps = &configMap + } else { + destination.ConfigMaps = nil + } + + // Secrets + if operator.Secrets != nil { + var secret v20230101s.StorageAccountOperatorSecrets + err := operator.Secrets.AssignProperties_To_StorageAccountOperatorSecrets(&secret) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccountOperatorSecrets() to populate field Secrets") + } + destination.Secrets = &secret + } else { + destination.Secrets = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccountOperatorSpec interface (if implemented) to customize the conversion + var operatorAsAny any = operator + if augmentedOperator, ok := operatorAsAny.(augmentConversionForStorageAccountOperatorSpec); ok { + err := augmentedOperator.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.StorageAccountSkuConversionStatus_STATUS +// This defines the sku conversion status object for asynchronous sku conversions. +type StorageAccountSkuConversionStatus_STATUS struct { + EndTime *string `json:"endTime,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SkuConversionStatus *string `json:"skuConversionStatus,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TargetSkuName *string `json:"targetSkuName,omitempty"` +} + +// AssignProperties_From_StorageAccountSkuConversionStatus_STATUS populates our StorageAccountSkuConversionStatus_STATUS from the provided source StorageAccountSkuConversionStatus_STATUS +func (status *StorageAccountSkuConversionStatus_STATUS) AssignProperties_From_StorageAccountSkuConversionStatus_STATUS(source *v20230101s.StorageAccountSkuConversionStatus_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // EndTime + status.EndTime = genruntime.ClonePointerToString(source.EndTime) + + // SkuConversionStatus + status.SkuConversionStatus = genruntime.ClonePointerToString(source.SkuConversionStatus) + + // StartTime + status.StartTime = genruntime.ClonePointerToString(source.StartTime) + + // TargetSkuName + status.TargetSkuName = genruntime.ClonePointerToString(source.TargetSkuName) + + // Update the property bag + if len(propertyBag) > 0 { + status.PropertyBag = propertyBag + } else { + status.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccountSkuConversionStatus_STATUS interface (if implemented) to customize the conversion + var statusAsAny any = status + if augmentedStatus, ok := statusAsAny.(augmentConversionForStorageAccountSkuConversionStatus_STATUS); ok { + err := augmentedStatus.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountSkuConversionStatus_STATUS populates the provided destination StorageAccountSkuConversionStatus_STATUS from our StorageAccountSkuConversionStatus_STATUS +func (status *StorageAccountSkuConversionStatus_STATUS) AssignProperties_To_StorageAccountSkuConversionStatus_STATUS(destination *v20230101s.StorageAccountSkuConversionStatus_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(status.PropertyBag) + + // EndTime + destination.EndTime = genruntime.ClonePointerToString(status.EndTime) + + // SkuConversionStatus + destination.SkuConversionStatus = genruntime.ClonePointerToString(status.SkuConversionStatus) + + // StartTime + destination.StartTime = genruntime.ClonePointerToString(status.StartTime) + + // TargetSkuName + destination.TargetSkuName = genruntime.ClonePointerToString(status.TargetSkuName) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccountSkuConversionStatus_STATUS interface (if implemented) to customize the conversion + var statusAsAny any = status + if augmentedStatus, ok := statusAsAny.(augmentConversionForStorageAccountSkuConversionStatus_STATUS); ok { + err := augmentedStatus.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.AccountImmutabilityPolicyProperties +// This defines account-level immutability policy properties. +type AccountImmutabilityPolicyProperties struct { + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + State *string `json:"state,omitempty"` +} + +// AssignProperties_From_AccountImmutabilityPolicyProperties populates our AccountImmutabilityPolicyProperties from the provided source AccountImmutabilityPolicyProperties +func (properties *AccountImmutabilityPolicyProperties) AssignProperties_From_AccountImmutabilityPolicyProperties(source *v20230101s.AccountImmutabilityPolicyProperties) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllowProtectedAppendWrites + if source.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *source.AllowProtectedAppendWrites + properties.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + properties.AllowProtectedAppendWrites = nil + } + + // ImmutabilityPeriodSinceCreationInDays + properties.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(source.ImmutabilityPeriodSinceCreationInDays) + + // State + properties.State = genruntime.ClonePointerToString(source.State) + + // Update the property bag + if len(propertyBag) > 0 { + properties.PropertyBag = propertyBag + } else { + properties.PropertyBag = nil + } + + // Invoke the augmentConversionForAccountImmutabilityPolicyProperties interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForAccountImmutabilityPolicyProperties); ok { + err := augmentedProperties.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_AccountImmutabilityPolicyProperties populates the provided destination AccountImmutabilityPolicyProperties from our AccountImmutabilityPolicyProperties +func (properties *AccountImmutabilityPolicyProperties) AssignProperties_To_AccountImmutabilityPolicyProperties(destination *v20230101s.AccountImmutabilityPolicyProperties) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(properties.PropertyBag) + + // AllowProtectedAppendWrites + if properties.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *properties.AllowProtectedAppendWrites + destination.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + destination.AllowProtectedAppendWrites = nil + } + + // ImmutabilityPeriodSinceCreationInDays + destination.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(properties.ImmutabilityPeriodSinceCreationInDays) + + // State + destination.State = genruntime.ClonePointerToString(properties.State) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForAccountImmutabilityPolicyProperties interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForAccountImmutabilityPolicyProperties); ok { + err := augmentedProperties.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.AccountImmutabilityPolicyProperties_STATUS +// This defines account-level immutability policy properties. +type AccountImmutabilityPolicyProperties_STATUS struct { + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + State *string `json:"state,omitempty"` +} + +// AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS populates our AccountImmutabilityPolicyProperties_STATUS from the provided source AccountImmutabilityPolicyProperties_STATUS +func (properties *AccountImmutabilityPolicyProperties_STATUS) AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS(source *v20230101s.AccountImmutabilityPolicyProperties_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllowProtectedAppendWrites + if source.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *source.AllowProtectedAppendWrites + properties.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + properties.AllowProtectedAppendWrites = nil + } + + // ImmutabilityPeriodSinceCreationInDays + properties.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(source.ImmutabilityPeriodSinceCreationInDays) + + // State + properties.State = genruntime.ClonePointerToString(source.State) + + // Update the property bag + if len(propertyBag) > 0 { + properties.PropertyBag = propertyBag + } else { + properties.PropertyBag = nil + } + + // Invoke the augmentConversionForAccountImmutabilityPolicyProperties_STATUS interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForAccountImmutabilityPolicyProperties_STATUS); ok { + err := augmentedProperties.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS populates the provided destination AccountImmutabilityPolicyProperties_STATUS from our AccountImmutabilityPolicyProperties_STATUS +func (properties *AccountImmutabilityPolicyProperties_STATUS) AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS(destination *v20230101s.AccountImmutabilityPolicyProperties_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(properties.PropertyBag) + + // AllowProtectedAppendWrites + if properties.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *properties.AllowProtectedAppendWrites + destination.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + destination.AllowProtectedAppendWrites = nil + } + + // ImmutabilityPeriodSinceCreationInDays + destination.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(properties.ImmutabilityPeriodSinceCreationInDays) + + // State + destination.State = genruntime.ClonePointerToString(properties.State) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForAccountImmutabilityPolicyProperties_STATUS interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForAccountImmutabilityPolicyProperties_STATUS); ok { + err := augmentedProperties.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.ActiveDirectoryProperties +// Settings properties for Active Directory (AD). +type ActiveDirectoryProperties struct { + AccountType *string `json:"accountType,omitempty"` + AzureStorageSid *string `json:"azureStorageSid,omitempty"` + DomainGuid *string `json:"domainGuid,omitempty"` + DomainName *string `json:"domainName,omitempty"` + DomainSid *string `json:"domainSid,omitempty"` + ForestName *string `json:"forestName,omitempty"` + NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SamAccountName *string `json:"samAccountName,omitempty"` +} + +// AssignProperties_From_ActiveDirectoryProperties populates our ActiveDirectoryProperties from the provided source ActiveDirectoryProperties +func (properties *ActiveDirectoryProperties) AssignProperties_From_ActiveDirectoryProperties(source *v20230101s.ActiveDirectoryProperties) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AccountType + properties.AccountType = genruntime.ClonePointerToString(source.AccountType) + + // AzureStorageSid + properties.AzureStorageSid = genruntime.ClonePointerToString(source.AzureStorageSid) + + // DomainGuid + properties.DomainGuid = genruntime.ClonePointerToString(source.DomainGuid) + + // DomainName + properties.DomainName = genruntime.ClonePointerToString(source.DomainName) + + // DomainSid + properties.DomainSid = genruntime.ClonePointerToString(source.DomainSid) + + // ForestName + properties.ForestName = genruntime.ClonePointerToString(source.ForestName) + + // NetBiosDomainName + properties.NetBiosDomainName = genruntime.ClonePointerToString(source.NetBiosDomainName) + + // SamAccountName + properties.SamAccountName = genruntime.ClonePointerToString(source.SamAccountName) + + // Update the property bag + if len(propertyBag) > 0 { + properties.PropertyBag = propertyBag + } else { + properties.PropertyBag = nil + } + + // Invoke the augmentConversionForActiveDirectoryProperties interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForActiveDirectoryProperties); ok { + err := augmentedProperties.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ActiveDirectoryProperties populates the provided destination ActiveDirectoryProperties from our ActiveDirectoryProperties +func (properties *ActiveDirectoryProperties) AssignProperties_To_ActiveDirectoryProperties(destination *v20230101s.ActiveDirectoryProperties) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(properties.PropertyBag) + + // AccountType + destination.AccountType = genruntime.ClonePointerToString(properties.AccountType) + + // AzureStorageSid + destination.AzureStorageSid = genruntime.ClonePointerToString(properties.AzureStorageSid) + + // DomainGuid + destination.DomainGuid = genruntime.ClonePointerToString(properties.DomainGuid) + + // DomainName + destination.DomainName = genruntime.ClonePointerToString(properties.DomainName) + + // DomainSid + destination.DomainSid = genruntime.ClonePointerToString(properties.DomainSid) + + // ForestName + destination.ForestName = genruntime.ClonePointerToString(properties.ForestName) + + // NetBiosDomainName + destination.NetBiosDomainName = genruntime.ClonePointerToString(properties.NetBiosDomainName) + + // SamAccountName + destination.SamAccountName = genruntime.ClonePointerToString(properties.SamAccountName) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForActiveDirectoryProperties interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForActiveDirectoryProperties); ok { + err := augmentedProperties.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.ActiveDirectoryProperties_STATUS +// Settings properties for Active Directory (AD). +type ActiveDirectoryProperties_STATUS struct { + AccountType *string `json:"accountType,omitempty"` + AzureStorageSid *string `json:"azureStorageSid,omitempty"` + DomainGuid *string `json:"domainGuid,omitempty"` + DomainName *string `json:"domainName,omitempty"` + DomainSid *string `json:"domainSid,omitempty"` + ForestName *string `json:"forestName,omitempty"` + NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SamAccountName *string `json:"samAccountName,omitempty"` +} + +// AssignProperties_From_ActiveDirectoryProperties_STATUS populates our ActiveDirectoryProperties_STATUS from the provided source ActiveDirectoryProperties_STATUS +func (properties *ActiveDirectoryProperties_STATUS) AssignProperties_From_ActiveDirectoryProperties_STATUS(source *v20230101s.ActiveDirectoryProperties_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AccountType + properties.AccountType = genruntime.ClonePointerToString(source.AccountType) + + // AzureStorageSid + properties.AzureStorageSid = genruntime.ClonePointerToString(source.AzureStorageSid) + + // DomainGuid + properties.DomainGuid = genruntime.ClonePointerToString(source.DomainGuid) + + // DomainName + properties.DomainName = genruntime.ClonePointerToString(source.DomainName) + + // DomainSid + properties.DomainSid = genruntime.ClonePointerToString(source.DomainSid) + + // ForestName + properties.ForestName = genruntime.ClonePointerToString(source.ForestName) + + // NetBiosDomainName + properties.NetBiosDomainName = genruntime.ClonePointerToString(source.NetBiosDomainName) + + // SamAccountName + properties.SamAccountName = genruntime.ClonePointerToString(source.SamAccountName) + + // Update the property bag + if len(propertyBag) > 0 { + properties.PropertyBag = propertyBag + } else { + properties.PropertyBag = nil + } + + // Invoke the augmentConversionForActiveDirectoryProperties_STATUS interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForActiveDirectoryProperties_STATUS); ok { + err := augmentedProperties.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ActiveDirectoryProperties_STATUS populates the provided destination ActiveDirectoryProperties_STATUS from our ActiveDirectoryProperties_STATUS +func (properties *ActiveDirectoryProperties_STATUS) AssignProperties_To_ActiveDirectoryProperties_STATUS(destination *v20230101s.ActiveDirectoryProperties_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(properties.PropertyBag) + + // AccountType + destination.AccountType = genruntime.ClonePointerToString(properties.AccountType) + + // AzureStorageSid + destination.AzureStorageSid = genruntime.ClonePointerToString(properties.AzureStorageSid) + + // DomainGuid + destination.DomainGuid = genruntime.ClonePointerToString(properties.DomainGuid) + + // DomainName + destination.DomainName = genruntime.ClonePointerToString(properties.DomainName) + + // DomainSid + destination.DomainSid = genruntime.ClonePointerToString(properties.DomainSid) + + // ForestName + destination.ForestName = genruntime.ClonePointerToString(properties.ForestName) + + // NetBiosDomainName + destination.NetBiosDomainName = genruntime.ClonePointerToString(properties.NetBiosDomainName) + + // SamAccountName + destination.SamAccountName = genruntime.ClonePointerToString(properties.SamAccountName) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForActiveDirectoryProperties_STATUS interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForActiveDirectoryProperties_STATUS); ok { + err := augmentedProperties.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForAzureFilesIdentityBasedAuthentication interface { + AssignPropertiesFrom(src *v20230101s.AzureFilesIdentityBasedAuthentication) error + AssignPropertiesTo(dst *v20230101s.AzureFilesIdentityBasedAuthentication) error +} + +type augmentConversionForAzureFilesIdentityBasedAuthentication_STATUS interface { + AssignPropertiesFrom(src *v20230101s.AzureFilesIdentityBasedAuthentication_STATUS) error + AssignPropertiesTo(dst *v20230101s.AzureFilesIdentityBasedAuthentication_STATUS) error +} + +type augmentConversionForBlobRestoreStatus_STATUS interface { + AssignPropertiesFrom(src *v20230101s.BlobRestoreStatus_STATUS) error + AssignPropertiesTo(dst *v20230101s.BlobRestoreStatus_STATUS) error +} + +type augmentConversionForCustomDomain interface { + AssignPropertiesFrom(src *v20230101s.CustomDomain) error + AssignPropertiesTo(dst *v20230101s.CustomDomain) error +} + +type augmentConversionForCustomDomain_STATUS interface { + AssignPropertiesFrom(src *v20230101s.CustomDomain_STATUS) error + AssignPropertiesTo(dst *v20230101s.CustomDomain_STATUS) error +} + +type augmentConversionForEncryption interface { + AssignPropertiesFrom(src *v20230101s.Encryption) error + AssignPropertiesTo(dst *v20230101s.Encryption) error +} + +type augmentConversionForEncryption_STATUS interface { + AssignPropertiesFrom(src *v20230101s.Encryption_STATUS) error + AssignPropertiesTo(dst *v20230101s.Encryption_STATUS) error +} + +type augmentConversionForEndpoints_STATUS interface { + AssignPropertiesFrom(src *v20230101s.Endpoints_STATUS) error + AssignPropertiesTo(dst *v20230101s.Endpoints_STATUS) error +} + +type augmentConversionForExtendedLocation interface { + AssignPropertiesFrom(src *v20230101s.ExtendedLocation) error + AssignPropertiesTo(dst *v20230101s.ExtendedLocation) error +} + +type augmentConversionForExtendedLocation_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ExtendedLocation_STATUS) error + AssignPropertiesTo(dst *v20230101s.ExtendedLocation_STATUS) error +} + +type augmentConversionForGeoReplicationStats_STATUS interface { + AssignPropertiesFrom(src *v20230101s.GeoReplicationStats_STATUS) error + AssignPropertiesTo(dst *v20230101s.GeoReplicationStats_STATUS) error +} + +type augmentConversionForIdentity interface { + AssignPropertiesFrom(src *v20230101s.Identity) error + AssignPropertiesTo(dst *v20230101s.Identity) error +} + +type augmentConversionForIdentity_STATUS interface { + AssignPropertiesFrom(src *v20230101s.Identity_STATUS) error + AssignPropertiesTo(dst *v20230101s.Identity_STATUS) error +} + +type augmentConversionForImmutableStorageAccount interface { + AssignPropertiesFrom(src *v20230101s.ImmutableStorageAccount) error + AssignPropertiesTo(dst *v20230101s.ImmutableStorageAccount) error +} + +type augmentConversionForImmutableStorageAccount_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ImmutableStorageAccount_STATUS) error + AssignPropertiesTo(dst *v20230101s.ImmutableStorageAccount_STATUS) error +} + +type augmentConversionForKeyCreationTime_STATUS interface { + AssignPropertiesFrom(src *v20230101s.KeyCreationTime_STATUS) error + AssignPropertiesTo(dst *v20230101s.KeyCreationTime_STATUS) error +} + +type augmentConversionForKeyPolicy interface { + AssignPropertiesFrom(src *v20230101s.KeyPolicy) error + AssignPropertiesTo(dst *v20230101s.KeyPolicy) error +} + +type augmentConversionForKeyPolicy_STATUS interface { + AssignPropertiesFrom(src *v20230101s.KeyPolicy_STATUS) error + AssignPropertiesTo(dst *v20230101s.KeyPolicy_STATUS) error +} + +type augmentConversionForNetworkRuleSet interface { + AssignPropertiesFrom(src *v20230101s.NetworkRuleSet) error + AssignPropertiesTo(dst *v20230101s.NetworkRuleSet) error +} + +type augmentConversionForNetworkRuleSet_STATUS interface { + AssignPropertiesFrom(src *v20230101s.NetworkRuleSet_STATUS) error + AssignPropertiesTo(dst *v20230101s.NetworkRuleSet_STATUS) error +} + +type augmentConversionForPrivateEndpointConnection_STATUS interface { + AssignPropertiesFrom(src *v20230101s.PrivateEndpointConnection_STATUS) error + AssignPropertiesTo(dst *v20230101s.PrivateEndpointConnection_STATUS) error +} + +type augmentConversionForRoutingPreference interface { + AssignPropertiesFrom(src *v20230101s.RoutingPreference) error + AssignPropertiesTo(dst *v20230101s.RoutingPreference) error +} + +type augmentConversionForRoutingPreference_STATUS interface { + AssignPropertiesFrom(src *v20230101s.RoutingPreference_STATUS) error + AssignPropertiesTo(dst *v20230101s.RoutingPreference_STATUS) error +} + +type augmentConversionForSasPolicy interface { + AssignPropertiesFrom(src *v20230101s.SasPolicy) error + AssignPropertiesTo(dst *v20230101s.SasPolicy) error +} + +type augmentConversionForSasPolicy_STATUS interface { + AssignPropertiesFrom(src *v20230101s.SasPolicy_STATUS) error + AssignPropertiesTo(dst *v20230101s.SasPolicy_STATUS) error +} + +type augmentConversionForSku interface { + AssignPropertiesFrom(src *v20230101s.Sku) error + AssignPropertiesTo(dst *v20230101s.Sku) error +} + +type augmentConversionForSku_STATUS interface { + AssignPropertiesFrom(src *v20230101s.Sku_STATUS) error + AssignPropertiesTo(dst *v20230101s.Sku_STATUS) error +} + +type augmentConversionForStorageAccountOperatorSpec interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountOperatorSpec) error + AssignPropertiesTo(dst *v20230101s.StorageAccountOperatorSpec) error +} + +type augmentConversionForStorageAccountSkuConversionStatus_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountSkuConversionStatus_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccountSkuConversionStatus_STATUS) error +} + +// Storage version of v1api20220901.BlobRestoreParameters_STATUS +// Blob restore parameters +type BlobRestoreParameters_STATUS struct { + BlobRanges []BlobRestoreRange_STATUS `json:"blobRanges,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TimeToRestore *string `json:"timeToRestore,omitempty"` +} + +// AssignProperties_From_BlobRestoreParameters_STATUS populates our BlobRestoreParameters_STATUS from the provided source BlobRestoreParameters_STATUS +func (parameters *BlobRestoreParameters_STATUS) AssignProperties_From_BlobRestoreParameters_STATUS(source *v20230101s.BlobRestoreParameters_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // BlobRanges + if source.BlobRanges != nil { + blobRangeList := make([]BlobRestoreRange_STATUS, len(source.BlobRanges)) + for blobRangeIndex, blobRangeItem := range source.BlobRanges { + // Shadow the loop variable to avoid aliasing + blobRangeItem := blobRangeItem + var blobRange BlobRestoreRange_STATUS + err := blobRange.AssignProperties_From_BlobRestoreRange_STATUS(&blobRangeItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_BlobRestoreRange_STATUS() to populate field BlobRanges") + } + blobRangeList[blobRangeIndex] = blobRange + } + parameters.BlobRanges = blobRangeList + } else { + parameters.BlobRanges = nil + } + + // TimeToRestore + parameters.TimeToRestore = genruntime.ClonePointerToString(source.TimeToRestore) + + // Update the property bag + if len(propertyBag) > 0 { + parameters.PropertyBag = propertyBag + } else { + parameters.PropertyBag = nil + } + + // Invoke the augmentConversionForBlobRestoreParameters_STATUS interface (if implemented) to customize the conversion + var parametersAsAny any = parameters + if augmentedParameters, ok := parametersAsAny.(augmentConversionForBlobRestoreParameters_STATUS); ok { + err := augmentedParameters.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_BlobRestoreParameters_STATUS populates the provided destination BlobRestoreParameters_STATUS from our BlobRestoreParameters_STATUS +func (parameters *BlobRestoreParameters_STATUS) AssignProperties_To_BlobRestoreParameters_STATUS(destination *v20230101s.BlobRestoreParameters_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(parameters.PropertyBag) + + // BlobRanges + if parameters.BlobRanges != nil { + blobRangeList := make([]v20230101s.BlobRestoreRange_STATUS, len(parameters.BlobRanges)) + for blobRangeIndex, blobRangeItem := range parameters.BlobRanges { + // Shadow the loop variable to avoid aliasing + blobRangeItem := blobRangeItem + var blobRange v20230101s.BlobRestoreRange_STATUS + err := blobRangeItem.AssignProperties_To_BlobRestoreRange_STATUS(&blobRange) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_BlobRestoreRange_STATUS() to populate field BlobRanges") + } + blobRangeList[blobRangeIndex] = blobRange + } + destination.BlobRanges = blobRangeList + } else { + destination.BlobRanges = nil + } + + // TimeToRestore + destination.TimeToRestore = genruntime.ClonePointerToString(parameters.TimeToRestore) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForBlobRestoreParameters_STATUS interface (if implemented) to customize the conversion + var parametersAsAny any = parameters + if augmentedParameters, ok := parametersAsAny.(augmentConversionForBlobRestoreParameters_STATUS); ok { + err := augmentedParameters.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.EncryptionIdentity +// Encryption identity for the storage account. +type EncryptionIdentity struct { + FederatedIdentityClientId *string `json:"federatedIdentityClientId,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + + // UserAssignedIdentityReference: Resource identifier of the UserAssigned identity to be associated with server-side + // encryption on the storage account. + UserAssignedIdentityReference *genruntime.ResourceReference `armReference:"UserAssignedIdentity" json:"userAssignedIdentityReference,omitempty"` +} + +// AssignProperties_From_EncryptionIdentity populates our EncryptionIdentity from the provided source EncryptionIdentity +func (identity *EncryptionIdentity) AssignProperties_From_EncryptionIdentity(source *v20230101s.EncryptionIdentity) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // FederatedIdentityClientId + identity.FederatedIdentityClientId = genruntime.ClonePointerToString(source.FederatedIdentityClientId) + + // UserAssignedIdentityReference + if source.UserAssignedIdentityReference != nil { + userAssignedIdentityReference := source.UserAssignedIdentityReference.Copy() + identity.UserAssignedIdentityReference = &userAssignedIdentityReference + } else { + identity.UserAssignedIdentityReference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + identity.PropertyBag = propertyBag + } else { + identity.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryptionIdentity interface (if implemented) to customize the conversion + var identityAsAny any = identity + if augmentedIdentity, ok := identityAsAny.(augmentConversionForEncryptionIdentity); ok { + err := augmentedIdentity.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_EncryptionIdentity populates the provided destination EncryptionIdentity from our EncryptionIdentity +func (identity *EncryptionIdentity) AssignProperties_To_EncryptionIdentity(destination *v20230101s.EncryptionIdentity) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(identity.PropertyBag) + + // FederatedIdentityClientId + destination.FederatedIdentityClientId = genruntime.ClonePointerToString(identity.FederatedIdentityClientId) + + // UserAssignedIdentityReference + if identity.UserAssignedIdentityReference != nil { + userAssignedIdentityReference := identity.UserAssignedIdentityReference.Copy() + destination.UserAssignedIdentityReference = &userAssignedIdentityReference + } else { + destination.UserAssignedIdentityReference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryptionIdentity interface (if implemented) to customize the conversion + var identityAsAny any = identity + if augmentedIdentity, ok := identityAsAny.(augmentConversionForEncryptionIdentity); ok { + err := augmentedIdentity.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.EncryptionIdentity_STATUS +// Encryption identity for the storage account. +type EncryptionIdentity_STATUS struct { + FederatedIdentityClientId *string `json:"federatedIdentityClientId,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` +} + +// AssignProperties_From_EncryptionIdentity_STATUS populates our EncryptionIdentity_STATUS from the provided source EncryptionIdentity_STATUS +func (identity *EncryptionIdentity_STATUS) AssignProperties_From_EncryptionIdentity_STATUS(source *v20230101s.EncryptionIdentity_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // FederatedIdentityClientId + identity.FederatedIdentityClientId = genruntime.ClonePointerToString(source.FederatedIdentityClientId) + + // UserAssignedIdentity + identity.UserAssignedIdentity = genruntime.ClonePointerToString(source.UserAssignedIdentity) + + // Update the property bag + if len(propertyBag) > 0 { + identity.PropertyBag = propertyBag + } else { + identity.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryptionIdentity_STATUS interface (if implemented) to customize the conversion + var identityAsAny any = identity + if augmentedIdentity, ok := identityAsAny.(augmentConversionForEncryptionIdentity_STATUS); ok { + err := augmentedIdentity.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_EncryptionIdentity_STATUS populates the provided destination EncryptionIdentity_STATUS from our EncryptionIdentity_STATUS +func (identity *EncryptionIdentity_STATUS) AssignProperties_To_EncryptionIdentity_STATUS(destination *v20230101s.EncryptionIdentity_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(identity.PropertyBag) + + // FederatedIdentityClientId + destination.FederatedIdentityClientId = genruntime.ClonePointerToString(identity.FederatedIdentityClientId) + + // UserAssignedIdentity + destination.UserAssignedIdentity = genruntime.ClonePointerToString(identity.UserAssignedIdentity) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryptionIdentity_STATUS interface (if implemented) to customize the conversion + var identityAsAny any = identity + if augmentedIdentity, ok := identityAsAny.(augmentConversionForEncryptionIdentity_STATUS); ok { + err := augmentedIdentity.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.EncryptionServices +// A list of services that support encryption. +type EncryptionServices struct { + Blob *EncryptionService `json:"blob,omitempty"` + File *EncryptionService `json:"file,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Queue *EncryptionService `json:"queue,omitempty"` + Table *EncryptionService `json:"table,omitempty"` +} + +// AssignProperties_From_EncryptionServices populates our EncryptionServices from the provided source EncryptionServices +func (services *EncryptionServices) AssignProperties_From_EncryptionServices(source *v20230101s.EncryptionServices) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Blob + if source.Blob != nil { + var blob EncryptionService + err := blob.AssignProperties_From_EncryptionService(source.Blob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService() to populate field Blob") + } + services.Blob = &blob + } else { + services.Blob = nil + } + + // File + if source.File != nil { + var file EncryptionService + err := file.AssignProperties_From_EncryptionService(source.File) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService() to populate field File") + } + services.File = &file + } else { + services.File = nil + } + + // Queue + if source.Queue != nil { + var queue EncryptionService + err := queue.AssignProperties_From_EncryptionService(source.Queue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService() to populate field Queue") + } + services.Queue = &queue + } else { + services.Queue = nil + } + + // Table + if source.Table != nil { + var table EncryptionService + err := table.AssignProperties_From_EncryptionService(source.Table) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService() to populate field Table") + } + services.Table = &table + } else { + services.Table = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + services.PropertyBag = propertyBag + } else { + services.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryptionServices interface (if implemented) to customize the conversion + var servicesAsAny any = services + if augmentedServices, ok := servicesAsAny.(augmentConversionForEncryptionServices); ok { + err := augmentedServices.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_EncryptionServices populates the provided destination EncryptionServices from our EncryptionServices +func (services *EncryptionServices) AssignProperties_To_EncryptionServices(destination *v20230101s.EncryptionServices) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(services.PropertyBag) + + // Blob + if services.Blob != nil { + var blob v20230101s.EncryptionService + err := services.Blob.AssignProperties_To_EncryptionService(&blob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService() to populate field Blob") + } + destination.Blob = &blob + } else { + destination.Blob = nil + } + + // File + if services.File != nil { + var file v20230101s.EncryptionService + err := services.File.AssignProperties_To_EncryptionService(&file) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService() to populate field File") + } + destination.File = &file + } else { + destination.File = nil + } + + // Queue + if services.Queue != nil { + var queue v20230101s.EncryptionService + err := services.Queue.AssignProperties_To_EncryptionService(&queue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService() to populate field Queue") + } + destination.Queue = &queue + } else { + destination.Queue = nil + } + + // Table + if services.Table != nil { + var table v20230101s.EncryptionService + err := services.Table.AssignProperties_To_EncryptionService(&table) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService() to populate field Table") + } + destination.Table = &table + } else { + destination.Table = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryptionServices interface (if implemented) to customize the conversion + var servicesAsAny any = services + if augmentedServices, ok := servicesAsAny.(augmentConversionForEncryptionServices); ok { + err := augmentedServices.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.EncryptionServices_STATUS +// A list of services that support encryption. +type EncryptionServices_STATUS struct { + Blob *EncryptionService_STATUS `json:"blob,omitempty"` + File *EncryptionService_STATUS `json:"file,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Queue *EncryptionService_STATUS `json:"queue,omitempty"` + Table *EncryptionService_STATUS `json:"table,omitempty"` +} + +// AssignProperties_From_EncryptionServices_STATUS populates our EncryptionServices_STATUS from the provided source EncryptionServices_STATUS +func (services *EncryptionServices_STATUS) AssignProperties_From_EncryptionServices_STATUS(source *v20230101s.EncryptionServices_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Blob + if source.Blob != nil { + var blob EncryptionService_STATUS + err := blob.AssignProperties_From_EncryptionService_STATUS(source.Blob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService_STATUS() to populate field Blob") + } + services.Blob = &blob + } else { + services.Blob = nil + } + + // File + if source.File != nil { + var file EncryptionService_STATUS + err := file.AssignProperties_From_EncryptionService_STATUS(source.File) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService_STATUS() to populate field File") + } + services.File = &file + } else { + services.File = nil + } + + // Queue + if source.Queue != nil { + var queue EncryptionService_STATUS + err := queue.AssignProperties_From_EncryptionService_STATUS(source.Queue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService_STATUS() to populate field Queue") + } + services.Queue = &queue + } else { + services.Queue = nil + } + + // Table + if source.Table != nil { + var table EncryptionService_STATUS + err := table.AssignProperties_From_EncryptionService_STATUS(source.Table) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService_STATUS() to populate field Table") + } + services.Table = &table + } else { + services.Table = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + services.PropertyBag = propertyBag + } else { + services.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryptionServices_STATUS interface (if implemented) to customize the conversion + var servicesAsAny any = services + if augmentedServices, ok := servicesAsAny.(augmentConversionForEncryptionServices_STATUS); ok { + err := augmentedServices.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_EncryptionServices_STATUS populates the provided destination EncryptionServices_STATUS from our EncryptionServices_STATUS +func (services *EncryptionServices_STATUS) AssignProperties_To_EncryptionServices_STATUS(destination *v20230101s.EncryptionServices_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(services.PropertyBag) + + // Blob + if services.Blob != nil { + var blob v20230101s.EncryptionService_STATUS + err := services.Blob.AssignProperties_To_EncryptionService_STATUS(&blob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService_STATUS() to populate field Blob") + } + destination.Blob = &blob + } else { + destination.Blob = nil + } + + // File + if services.File != nil { + var file v20230101s.EncryptionService_STATUS + err := services.File.AssignProperties_To_EncryptionService_STATUS(&file) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService_STATUS() to populate field File") + } + destination.File = &file + } else { + destination.File = nil + } + + // Queue + if services.Queue != nil { + var queue v20230101s.EncryptionService_STATUS + err := services.Queue.AssignProperties_To_EncryptionService_STATUS(&queue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService_STATUS() to populate field Queue") + } + destination.Queue = &queue + } else { + destination.Queue = nil + } + + // Table + if services.Table != nil { + var table v20230101s.EncryptionService_STATUS + err := services.Table.AssignProperties_To_EncryptionService_STATUS(&table) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService_STATUS() to populate field Table") + } + destination.Table = &table + } else { + destination.Table = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryptionServices_STATUS interface (if implemented) to customize the conversion + var servicesAsAny any = services + if augmentedServices, ok := servicesAsAny.(augmentConversionForEncryptionServices_STATUS); ok { + err := augmentedServices.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.IPRule +// IP rule with specific IP or IP range in CIDR format. +type IPRule struct { + Action *string `json:"action,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Value *string `json:"value,omitempty"` +} + +// AssignProperties_From_IPRule populates our IPRule from the provided source IPRule +func (rule *IPRule) AssignProperties_From_IPRule(source *v20230101s.IPRule) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Action + rule.Action = genruntime.ClonePointerToString(source.Action) + + // Value + rule.Value = genruntime.ClonePointerToString(source.Value) + + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } + + // Invoke the augmentConversionForIPRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForIPRule); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_IPRule populates the provided destination IPRule from our IPRule +func (rule *IPRule) AssignProperties_To_IPRule(destination *v20230101s.IPRule) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) + + // Action + destination.Action = genruntime.ClonePointerToString(rule.Action) + + // Value + destination.Value = genruntime.ClonePointerToString(rule.Value) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForIPRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForIPRule); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.IPRule_STATUS +// IP rule with specific IP or IP range in CIDR format. +type IPRule_STATUS struct { + Action *string `json:"action,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Value *string `json:"value,omitempty"` +} + +// AssignProperties_From_IPRule_STATUS populates our IPRule_STATUS from the provided source IPRule_STATUS +func (rule *IPRule_STATUS) AssignProperties_From_IPRule_STATUS(source *v20230101s.IPRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Action + rule.Action = genruntime.ClonePointerToString(source.Action) + + // Value + rule.Value = genruntime.ClonePointerToString(source.Value) + + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } + + // Invoke the augmentConversionForIPRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForIPRule_STATUS); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_IPRule_STATUS populates the provided destination IPRule_STATUS from our IPRule_STATUS +func (rule *IPRule_STATUS) AssignProperties_To_IPRule_STATUS(destination *v20230101s.IPRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) + + // Action + destination.Action = genruntime.ClonePointerToString(rule.Action) + + // Value + destination.Value = genruntime.ClonePointerToString(rule.Value) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForIPRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForIPRule_STATUS); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.KeyVaultProperties +// Properties of key vault. +type KeyVaultProperties struct { + Keyname *string `json:"keyname,omitempty"` + Keyvaulturi *string `json:"keyvaulturi,omitempty"` + Keyversion *string `json:"keyversion,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_KeyVaultProperties populates our KeyVaultProperties from the provided source KeyVaultProperties +func (properties *KeyVaultProperties) AssignProperties_From_KeyVaultProperties(source *v20230101s.KeyVaultProperties) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Keyname + properties.Keyname = genruntime.ClonePointerToString(source.Keyname) + + // Keyvaulturi + properties.Keyvaulturi = genruntime.ClonePointerToString(source.Keyvaulturi) + + // Keyversion + properties.Keyversion = genruntime.ClonePointerToString(source.Keyversion) + + // Update the property bag + if len(propertyBag) > 0 { + properties.PropertyBag = propertyBag + } else { + properties.PropertyBag = nil + } + + // Invoke the augmentConversionForKeyVaultProperties interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForKeyVaultProperties); ok { + err := augmentedProperties.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_KeyVaultProperties populates the provided destination KeyVaultProperties from our KeyVaultProperties +func (properties *KeyVaultProperties) AssignProperties_To_KeyVaultProperties(destination *v20230101s.KeyVaultProperties) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(properties.PropertyBag) + + // Keyname + destination.Keyname = genruntime.ClonePointerToString(properties.Keyname) + + // Keyvaulturi + destination.Keyvaulturi = genruntime.ClonePointerToString(properties.Keyvaulturi) + + // Keyversion + destination.Keyversion = genruntime.ClonePointerToString(properties.Keyversion) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForKeyVaultProperties interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForKeyVaultProperties); ok { + err := augmentedProperties.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.KeyVaultProperties_STATUS +// Properties of key vault. +type KeyVaultProperties_STATUS struct { + CurrentVersionedKeyExpirationTimestamp *string `json:"currentVersionedKeyExpirationTimestamp,omitempty"` + CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"` + Keyname *string `json:"keyname,omitempty"` + Keyvaulturi *string `json:"keyvaulturi,omitempty"` + Keyversion *string `json:"keyversion,omitempty"` + LastKeyRotationTimestamp *string `json:"lastKeyRotationTimestamp,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_KeyVaultProperties_STATUS populates our KeyVaultProperties_STATUS from the provided source KeyVaultProperties_STATUS +func (properties *KeyVaultProperties_STATUS) AssignProperties_From_KeyVaultProperties_STATUS(source *v20230101s.KeyVaultProperties_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // CurrentVersionedKeyExpirationTimestamp + properties.CurrentVersionedKeyExpirationTimestamp = genruntime.ClonePointerToString(source.CurrentVersionedKeyExpirationTimestamp) + + // CurrentVersionedKeyIdentifier + properties.CurrentVersionedKeyIdentifier = genruntime.ClonePointerToString(source.CurrentVersionedKeyIdentifier) + + // Keyname + properties.Keyname = genruntime.ClonePointerToString(source.Keyname) + + // Keyvaulturi + properties.Keyvaulturi = genruntime.ClonePointerToString(source.Keyvaulturi) + + // Keyversion + properties.Keyversion = genruntime.ClonePointerToString(source.Keyversion) + + // LastKeyRotationTimestamp + properties.LastKeyRotationTimestamp = genruntime.ClonePointerToString(source.LastKeyRotationTimestamp) + + // Update the property bag + if len(propertyBag) > 0 { + properties.PropertyBag = propertyBag + } else { + properties.PropertyBag = nil + } + + // Invoke the augmentConversionForKeyVaultProperties_STATUS interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForKeyVaultProperties_STATUS); ok { + err := augmentedProperties.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_KeyVaultProperties_STATUS populates the provided destination KeyVaultProperties_STATUS from our KeyVaultProperties_STATUS +func (properties *KeyVaultProperties_STATUS) AssignProperties_To_KeyVaultProperties_STATUS(destination *v20230101s.KeyVaultProperties_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(properties.PropertyBag) + + // CurrentVersionedKeyExpirationTimestamp + destination.CurrentVersionedKeyExpirationTimestamp = genruntime.ClonePointerToString(properties.CurrentVersionedKeyExpirationTimestamp) + + // CurrentVersionedKeyIdentifier + destination.CurrentVersionedKeyIdentifier = genruntime.ClonePointerToString(properties.CurrentVersionedKeyIdentifier) + + // Keyname + destination.Keyname = genruntime.ClonePointerToString(properties.Keyname) + + // Keyvaulturi + destination.Keyvaulturi = genruntime.ClonePointerToString(properties.Keyvaulturi) + + // Keyversion + destination.Keyversion = genruntime.ClonePointerToString(properties.Keyversion) + + // LastKeyRotationTimestamp + destination.LastKeyRotationTimestamp = genruntime.ClonePointerToString(properties.LastKeyRotationTimestamp) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForKeyVaultProperties_STATUS interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForKeyVaultProperties_STATUS); ok { + err := augmentedProperties.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.ResourceAccessRule +// Resource Access Rule. +type ResourceAccessRule struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + + // ResourceReference: Resource Id + ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"` + TenantId *string `json:"tenantId,omitempty"` +} + +// AssignProperties_From_ResourceAccessRule populates our ResourceAccessRule from the provided source ResourceAccessRule +func (rule *ResourceAccessRule) AssignProperties_From_ResourceAccessRule(source *v20230101s.ResourceAccessRule) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ResourceReference + if source.ResourceReference != nil { + resourceReference := source.ResourceReference.Copy() + rule.ResourceReference = &resourceReference + } else { + rule.ResourceReference = nil + } -// Storage version of v1api20220901.Encryption -// The encryption settings on the storage account. -type Encryption struct { - Identity *EncryptionIdentity `json:"identity,omitempty"` - KeySource *string `json:"keySource,omitempty"` - Keyvaultproperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` - Services *EncryptionServices `json:"services,omitempty"` + // TenantId + rule.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } + + // Invoke the augmentConversionForResourceAccessRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForResourceAccessRule); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil } -// Storage version of v1api20220901.Encryption_STATUS -// The encryption settings on the storage account. -type Encryption_STATUS struct { - Identity *EncryptionIdentity_STATUS `json:"identity,omitempty"` - KeySource *string `json:"keySource,omitempty"` - Keyvaultproperties *KeyVaultProperties_STATUS `json:"keyvaultproperties,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` - Services *EncryptionServices_STATUS `json:"services,omitempty"` +// AssignProperties_To_ResourceAccessRule populates the provided destination ResourceAccessRule from our ResourceAccessRule +func (rule *ResourceAccessRule) AssignProperties_To_ResourceAccessRule(destination *v20230101s.ResourceAccessRule) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) + + // ResourceReference + if rule.ResourceReference != nil { + resourceReference := rule.ResourceReference.Copy() + destination.ResourceReference = &resourceReference + } else { + destination.ResourceReference = nil + } + + // TenantId + destination.TenantId = genruntime.ClonePointerToString(rule.TenantId) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForResourceAccessRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForResourceAccessRule); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } -// Storage version of v1api20220901.Endpoints_STATUS -// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object. -type Endpoints_STATUS struct { - Blob *string `json:"blob,omitempty"` - Dfs *string `json:"dfs,omitempty"` - File *string `json:"file,omitempty"` - InternetEndpoints *StorageAccountInternetEndpoints_STATUS `json:"internetEndpoints,omitempty"` - MicrosoftEndpoints *StorageAccountMicrosoftEndpoints_STATUS `json:"microsoftEndpoints,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Queue *string `json:"queue,omitempty"` - Table *string `json:"table,omitempty"` - Web *string `json:"web,omitempty"` +// Storage version of v1api20220901.ResourceAccessRule_STATUS +// Resource Access Rule. +type ResourceAccessRule_STATUS struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ResourceId *string `json:"resourceId,omitempty"` + TenantId *string `json:"tenantId,omitempty"` +} + +// AssignProperties_From_ResourceAccessRule_STATUS populates our ResourceAccessRule_STATUS from the provided source ResourceAccessRule_STATUS +func (rule *ResourceAccessRule_STATUS) AssignProperties_From_ResourceAccessRule_STATUS(source *v20230101s.ResourceAccessRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ResourceId + rule.ResourceId = genruntime.ClonePointerToString(source.ResourceId) + + // TenantId + rule.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } + + // Invoke the augmentConversionForResourceAccessRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForResourceAccessRule_STATUS); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ResourceAccessRule_STATUS populates the provided destination ResourceAccessRule_STATUS from our ResourceAccessRule_STATUS +func (rule *ResourceAccessRule_STATUS) AssignProperties_To_ResourceAccessRule_STATUS(destination *v20230101s.ResourceAccessRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) + + // ResourceId + destination.ResourceId = genruntime.ClonePointerToString(rule.ResourceId) + + // TenantId + destination.TenantId = genruntime.ClonePointerToString(rule.TenantId) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForResourceAccessRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForResourceAccessRule_STATUS); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.StorageAccountInternetEndpoints_STATUS +// The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint. +type StorageAccountInternetEndpoints_STATUS struct { + Blob *string `json:"blob,omitempty"` + Dfs *string `json:"dfs,omitempty"` + File *string `json:"file,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Web *string `json:"web,omitempty"` +} + +// AssignProperties_From_StorageAccountInternetEndpoints_STATUS populates our StorageAccountInternetEndpoints_STATUS from the provided source StorageAccountInternetEndpoints_STATUS +func (endpoints *StorageAccountInternetEndpoints_STATUS) AssignProperties_From_StorageAccountInternetEndpoints_STATUS(source *v20230101s.StorageAccountInternetEndpoints_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Blob + endpoints.Blob = genruntime.ClonePointerToString(source.Blob) + + // Dfs + endpoints.Dfs = genruntime.ClonePointerToString(source.Dfs) + + // File + endpoints.File = genruntime.ClonePointerToString(source.File) + + // Web + endpoints.Web = genruntime.ClonePointerToString(source.Web) + + // Update the property bag + if len(propertyBag) > 0 { + endpoints.PropertyBag = propertyBag + } else { + endpoints.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccountInternetEndpoints_STATUS interface (if implemented) to customize the conversion + var endpointsAsAny any = endpoints + if augmentedEndpoints, ok := endpointsAsAny.(augmentConversionForStorageAccountInternetEndpoints_STATUS); ok { + err := augmentedEndpoints.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountInternetEndpoints_STATUS populates the provided destination StorageAccountInternetEndpoints_STATUS from our StorageAccountInternetEndpoints_STATUS +func (endpoints *StorageAccountInternetEndpoints_STATUS) AssignProperties_To_StorageAccountInternetEndpoints_STATUS(destination *v20230101s.StorageAccountInternetEndpoints_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(endpoints.PropertyBag) + + // Blob + destination.Blob = genruntime.ClonePointerToString(endpoints.Blob) + + // Dfs + destination.Dfs = genruntime.ClonePointerToString(endpoints.Dfs) + + // File + destination.File = genruntime.ClonePointerToString(endpoints.File) + + // Web + destination.Web = genruntime.ClonePointerToString(endpoints.Web) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccountInternetEndpoints_STATUS interface (if implemented) to customize the conversion + var endpointsAsAny any = endpoints + if augmentedEndpoints, ok := endpointsAsAny.(augmentConversionForStorageAccountInternetEndpoints_STATUS); ok { + err := augmentedEndpoints.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.StorageAccountMicrosoftEndpoints_STATUS +// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object via a microsoft routing +// endpoint. +type StorageAccountMicrosoftEndpoints_STATUS struct { + Blob *string `json:"blob,omitempty"` + Dfs *string `json:"dfs,omitempty"` + File *string `json:"file,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Queue *string `json:"queue,omitempty"` + Table *string `json:"table,omitempty"` + Web *string `json:"web,omitempty"` +} + +// AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS populates our StorageAccountMicrosoftEndpoints_STATUS from the provided source StorageAccountMicrosoftEndpoints_STATUS +func (endpoints *StorageAccountMicrosoftEndpoints_STATUS) AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS(source *v20230101s.StorageAccountMicrosoftEndpoints_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Blob + endpoints.Blob = genruntime.ClonePointerToString(source.Blob) + + // Dfs + endpoints.Dfs = genruntime.ClonePointerToString(source.Dfs) + + // File + endpoints.File = genruntime.ClonePointerToString(source.File) + + // Queue + endpoints.Queue = genruntime.ClonePointerToString(source.Queue) + + // Table + endpoints.Table = genruntime.ClonePointerToString(source.Table) + + // Web + endpoints.Web = genruntime.ClonePointerToString(source.Web) + + // Update the property bag + if len(propertyBag) > 0 { + endpoints.PropertyBag = propertyBag + } else { + endpoints.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccountMicrosoftEndpoints_STATUS interface (if implemented) to customize the conversion + var endpointsAsAny any = endpoints + if augmentedEndpoints, ok := endpointsAsAny.(augmentConversionForStorageAccountMicrosoftEndpoints_STATUS); ok { + err := augmentedEndpoints.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS populates the provided destination StorageAccountMicrosoftEndpoints_STATUS from our StorageAccountMicrosoftEndpoints_STATUS +func (endpoints *StorageAccountMicrosoftEndpoints_STATUS) AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS(destination *v20230101s.StorageAccountMicrosoftEndpoints_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(endpoints.PropertyBag) + + // Blob + destination.Blob = genruntime.ClonePointerToString(endpoints.Blob) + + // Dfs + destination.Dfs = genruntime.ClonePointerToString(endpoints.Dfs) + + // File + destination.File = genruntime.ClonePointerToString(endpoints.File) + + // Queue + destination.Queue = genruntime.ClonePointerToString(endpoints.Queue) + + // Table + destination.Table = genruntime.ClonePointerToString(endpoints.Table) + + // Web + destination.Web = genruntime.ClonePointerToString(endpoints.Web) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccountMicrosoftEndpoints_STATUS interface (if implemented) to customize the conversion + var endpointsAsAny any = endpoints + if augmentedEndpoints, ok := endpointsAsAny.(augmentConversionForStorageAccountMicrosoftEndpoints_STATUS); ok { + err := augmentedEndpoints.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.StorageAccountOperatorConfigMaps +type StorageAccountOperatorConfigMaps struct { + BlobEndpoint *genruntime.ConfigMapDestination `json:"blobEndpoint,omitempty"` + DfsEndpoint *genruntime.ConfigMapDestination `json:"dfsEndpoint,omitempty"` + FileEndpoint *genruntime.ConfigMapDestination `json:"fileEndpoint,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + QueueEndpoint *genruntime.ConfigMapDestination `json:"queueEndpoint,omitempty"` + TableEndpoint *genruntime.ConfigMapDestination `json:"tableEndpoint,omitempty"` + WebEndpoint *genruntime.ConfigMapDestination `json:"webEndpoint,omitempty"` +} + +// AssignProperties_From_StorageAccountOperatorConfigMaps populates our StorageAccountOperatorConfigMaps from the provided source StorageAccountOperatorConfigMaps +func (maps *StorageAccountOperatorConfigMaps) AssignProperties_From_StorageAccountOperatorConfigMaps(source *v20230101s.StorageAccountOperatorConfigMaps) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // BlobEndpoint + if source.BlobEndpoint != nil { + blobEndpoint := source.BlobEndpoint.Copy() + maps.BlobEndpoint = &blobEndpoint + } else { + maps.BlobEndpoint = nil + } + + // DfsEndpoint + if source.DfsEndpoint != nil { + dfsEndpoint := source.DfsEndpoint.Copy() + maps.DfsEndpoint = &dfsEndpoint + } else { + maps.DfsEndpoint = nil + } + + // FileEndpoint + if source.FileEndpoint != nil { + fileEndpoint := source.FileEndpoint.Copy() + maps.FileEndpoint = &fileEndpoint + } else { + maps.FileEndpoint = nil + } + + // QueueEndpoint + if source.QueueEndpoint != nil { + queueEndpoint := source.QueueEndpoint.Copy() + maps.QueueEndpoint = &queueEndpoint + } else { + maps.QueueEndpoint = nil + } + + // TableEndpoint + if source.TableEndpoint != nil { + tableEndpoint := source.TableEndpoint.Copy() + maps.TableEndpoint = &tableEndpoint + } else { + maps.TableEndpoint = nil + } + + // WebEndpoint + if source.WebEndpoint != nil { + webEndpoint := source.WebEndpoint.Copy() + maps.WebEndpoint = &webEndpoint + } else { + maps.WebEndpoint = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + maps.PropertyBag = propertyBag + } else { + maps.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccountOperatorConfigMaps interface (if implemented) to customize the conversion + var mapsAsAny any = maps + if augmentedMaps, ok := mapsAsAny.(augmentConversionForStorageAccountOperatorConfigMaps); ok { + err := augmentedMaps.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountOperatorConfigMaps populates the provided destination StorageAccountOperatorConfigMaps from our StorageAccountOperatorConfigMaps +func (maps *StorageAccountOperatorConfigMaps) AssignProperties_To_StorageAccountOperatorConfigMaps(destination *v20230101s.StorageAccountOperatorConfigMaps) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(maps.PropertyBag) + + // BlobEndpoint + if maps.BlobEndpoint != nil { + blobEndpoint := maps.BlobEndpoint.Copy() + destination.BlobEndpoint = &blobEndpoint + } else { + destination.BlobEndpoint = nil + } + + // DfsEndpoint + if maps.DfsEndpoint != nil { + dfsEndpoint := maps.DfsEndpoint.Copy() + destination.DfsEndpoint = &dfsEndpoint + } else { + destination.DfsEndpoint = nil + } + + // FileEndpoint + if maps.FileEndpoint != nil { + fileEndpoint := maps.FileEndpoint.Copy() + destination.FileEndpoint = &fileEndpoint + } else { + destination.FileEndpoint = nil + } + + // QueueEndpoint + if maps.QueueEndpoint != nil { + queueEndpoint := maps.QueueEndpoint.Copy() + destination.QueueEndpoint = &queueEndpoint + } else { + destination.QueueEndpoint = nil + } + + // TableEndpoint + if maps.TableEndpoint != nil { + tableEndpoint := maps.TableEndpoint.Copy() + destination.TableEndpoint = &tableEndpoint + } else { + destination.TableEndpoint = nil + } + + // WebEndpoint + if maps.WebEndpoint != nil { + webEndpoint := maps.WebEndpoint.Copy() + destination.WebEndpoint = &webEndpoint + } else { + destination.WebEndpoint = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccountOperatorConfigMaps interface (if implemented) to customize the conversion + var mapsAsAny any = maps + if augmentedMaps, ok := mapsAsAny.(augmentConversionForStorageAccountOperatorConfigMaps); ok { + err := augmentedMaps.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.StorageAccountOperatorSecrets +type StorageAccountOperatorSecrets struct { + BlobEndpoint *genruntime.SecretDestination `json:"blobEndpoint,omitempty"` + DfsEndpoint *genruntime.SecretDestination `json:"dfsEndpoint,omitempty"` + FileEndpoint *genruntime.SecretDestination `json:"fileEndpoint,omitempty"` + Key1 *genruntime.SecretDestination `json:"key1,omitempty"` + Key2 *genruntime.SecretDestination `json:"key2,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + QueueEndpoint *genruntime.SecretDestination `json:"queueEndpoint,omitempty"` + TableEndpoint *genruntime.SecretDestination `json:"tableEndpoint,omitempty"` + WebEndpoint *genruntime.SecretDestination `json:"webEndpoint,omitempty"` +} + +// AssignProperties_From_StorageAccountOperatorSecrets populates our StorageAccountOperatorSecrets from the provided source StorageAccountOperatorSecrets +func (secrets *StorageAccountOperatorSecrets) AssignProperties_From_StorageAccountOperatorSecrets(source *v20230101s.StorageAccountOperatorSecrets) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // BlobEndpoint + if source.BlobEndpoint != nil { + blobEndpoint := source.BlobEndpoint.Copy() + secrets.BlobEndpoint = &blobEndpoint + } else { + secrets.BlobEndpoint = nil + } + + // DfsEndpoint + if source.DfsEndpoint != nil { + dfsEndpoint := source.DfsEndpoint.Copy() + secrets.DfsEndpoint = &dfsEndpoint + } else { + secrets.DfsEndpoint = nil + } + + // FileEndpoint + if source.FileEndpoint != nil { + fileEndpoint := source.FileEndpoint.Copy() + secrets.FileEndpoint = &fileEndpoint + } else { + secrets.FileEndpoint = nil + } + + // Key1 + if source.Key1 != nil { + key1 := source.Key1.Copy() + secrets.Key1 = &key1 + } else { + secrets.Key1 = nil + } + + // Key2 + if source.Key2 != nil { + key2 := source.Key2.Copy() + secrets.Key2 = &key2 + } else { + secrets.Key2 = nil + } + + // QueueEndpoint + if source.QueueEndpoint != nil { + queueEndpoint := source.QueueEndpoint.Copy() + secrets.QueueEndpoint = &queueEndpoint + } else { + secrets.QueueEndpoint = nil + } + + // TableEndpoint + if source.TableEndpoint != nil { + tableEndpoint := source.TableEndpoint.Copy() + secrets.TableEndpoint = &tableEndpoint + } else { + secrets.TableEndpoint = nil + } + + // WebEndpoint + if source.WebEndpoint != nil { + webEndpoint := source.WebEndpoint.Copy() + secrets.WebEndpoint = &webEndpoint + } else { + secrets.WebEndpoint = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + secrets.PropertyBag = propertyBag + } else { + secrets.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccountOperatorSecrets interface (if implemented) to customize the conversion + var secretsAsAny any = secrets + if augmentedSecrets, ok := secretsAsAny.(augmentConversionForStorageAccountOperatorSecrets); ok { + err := augmentedSecrets.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil } -// Storage version of v1api20220901.ExtendedLocation -// The complex type of the extended location. -type ExtendedLocation struct { - Name *string `json:"name,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Type *string `json:"type,omitempty"` +// AssignProperties_To_StorageAccountOperatorSecrets populates the provided destination StorageAccountOperatorSecrets from our StorageAccountOperatorSecrets +func (secrets *StorageAccountOperatorSecrets) AssignProperties_To_StorageAccountOperatorSecrets(destination *v20230101s.StorageAccountOperatorSecrets) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(secrets.PropertyBag) + + // BlobEndpoint + if secrets.BlobEndpoint != nil { + blobEndpoint := secrets.BlobEndpoint.Copy() + destination.BlobEndpoint = &blobEndpoint + } else { + destination.BlobEndpoint = nil + } + + // DfsEndpoint + if secrets.DfsEndpoint != nil { + dfsEndpoint := secrets.DfsEndpoint.Copy() + destination.DfsEndpoint = &dfsEndpoint + } else { + destination.DfsEndpoint = nil + } + + // FileEndpoint + if secrets.FileEndpoint != nil { + fileEndpoint := secrets.FileEndpoint.Copy() + destination.FileEndpoint = &fileEndpoint + } else { + destination.FileEndpoint = nil + } + + // Key1 + if secrets.Key1 != nil { + key1 := secrets.Key1.Copy() + destination.Key1 = &key1 + } else { + destination.Key1 = nil + } + + // Key2 + if secrets.Key2 != nil { + key2 := secrets.Key2.Copy() + destination.Key2 = &key2 + } else { + destination.Key2 = nil + } + + // QueueEndpoint + if secrets.QueueEndpoint != nil { + queueEndpoint := secrets.QueueEndpoint.Copy() + destination.QueueEndpoint = &queueEndpoint + } else { + destination.QueueEndpoint = nil + } + + // TableEndpoint + if secrets.TableEndpoint != nil { + tableEndpoint := secrets.TableEndpoint.Copy() + destination.TableEndpoint = &tableEndpoint + } else { + destination.TableEndpoint = nil + } + + // WebEndpoint + if secrets.WebEndpoint != nil { + webEndpoint := secrets.WebEndpoint.Copy() + destination.WebEndpoint = &webEndpoint + } else { + destination.WebEndpoint = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccountOperatorSecrets interface (if implemented) to customize the conversion + var secretsAsAny any = secrets + if augmentedSecrets, ok := secretsAsAny.(augmentConversionForStorageAccountOperatorSecrets); ok { + err := augmentedSecrets.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } -// Storage version of v1api20220901.ExtendedLocation_STATUS -// The complex type of the extended location. -type ExtendedLocation_STATUS struct { - Name *string `json:"name,omitempty"` +// Storage version of v1api20220901.UserAssignedIdentity_STATUS +// UserAssignedIdentity for the resource. +type UserAssignedIdentity_STATUS struct { + ClientId *string `json:"clientId,omitempty"` + PrincipalId *string `json:"principalId,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Type *string `json:"type,omitempty"` } -// Storage version of v1api20220901.GeoReplicationStats_STATUS -// Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when -// geo-redundant replication is enabled for the storage account. -type GeoReplicationStats_STATUS struct { - CanFailover *bool `json:"canFailover,omitempty"` - LastSyncTime *string `json:"lastSyncTime,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Status *string `json:"status,omitempty"` +// AssignProperties_From_UserAssignedIdentity_STATUS populates our UserAssignedIdentity_STATUS from the provided source UserAssignedIdentity_STATUS +func (identity *UserAssignedIdentity_STATUS) AssignProperties_From_UserAssignedIdentity_STATUS(source *v20230101s.UserAssignedIdentity_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ClientId + identity.ClientId = genruntime.ClonePointerToString(source.ClientId) + + // PrincipalId + identity.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId) + + // Update the property bag + if len(propertyBag) > 0 { + identity.PropertyBag = propertyBag + } else { + identity.PropertyBag = nil + } + + // Invoke the augmentConversionForUserAssignedIdentity_STATUS interface (if implemented) to customize the conversion + var identityAsAny any = identity + if augmentedIdentity, ok := identityAsAny.(augmentConversionForUserAssignedIdentity_STATUS); ok { + err := augmentedIdentity.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil } -// Storage version of v1api20220901.Identity -// Identity for the resource. -type Identity struct { - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Type *string `json:"type,omitempty"` - UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"` +// AssignProperties_To_UserAssignedIdentity_STATUS populates the provided destination UserAssignedIdentity_STATUS from our UserAssignedIdentity_STATUS +func (identity *UserAssignedIdentity_STATUS) AssignProperties_To_UserAssignedIdentity_STATUS(destination *v20230101s.UserAssignedIdentity_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(identity.PropertyBag) + + // ClientId + destination.ClientId = genruntime.ClonePointerToString(identity.ClientId) + + // PrincipalId + destination.PrincipalId = genruntime.ClonePointerToString(identity.PrincipalId) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForUserAssignedIdentity_STATUS interface (if implemented) to customize the conversion + var identityAsAny any = identity + if augmentedIdentity, ok := identityAsAny.(augmentConversionForUserAssignedIdentity_STATUS); ok { + err := augmentedIdentity.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } -// Storage version of v1api20220901.Identity_STATUS -// Identity for the resource. -type Identity_STATUS struct { - PrincipalId *string `json:"principalId,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - TenantId *string `json:"tenantId,omitempty"` - Type *string `json:"type,omitempty"` - UserAssignedIdentities map[string]UserAssignedIdentity_STATUS `json:"userAssignedIdentities,omitempty"` +// Storage version of v1api20220901.UserAssignedIdentityDetails +// Information about the user assigned identity for the resource +type UserAssignedIdentityDetails struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` } -// Storage version of v1api20220901.ImmutableStorageAccount -// This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. -type ImmutableStorageAccount struct { - Enabled *bool `json:"enabled,omitempty"` - ImmutabilityPolicy *AccountImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +// AssignProperties_From_UserAssignedIdentityDetails populates our UserAssignedIdentityDetails from the provided source UserAssignedIdentityDetails +func (details *UserAssignedIdentityDetails) AssignProperties_From_UserAssignedIdentityDetails(source *v20230101s.UserAssignedIdentityDetails) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Reference + details.Reference = source.Reference.Copy() + + // Update the property bag + if len(propertyBag) > 0 { + details.PropertyBag = propertyBag + } else { + details.PropertyBag = nil + } + + // Invoke the augmentConversionForUserAssignedIdentityDetails interface (if implemented) to customize the conversion + var detailsAsAny any = details + if augmentedDetails, ok := detailsAsAny.(augmentConversionForUserAssignedIdentityDetails); ok { + err := augmentedDetails.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil } -// Storage version of v1api20220901.ImmutableStorageAccount_STATUS -// This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. -type ImmutableStorageAccount_STATUS struct { - Enabled *bool `json:"enabled,omitempty"` - ImmutabilityPolicy *AccountImmutabilityPolicyProperties_STATUS `json:"immutabilityPolicy,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +// AssignProperties_To_UserAssignedIdentityDetails populates the provided destination UserAssignedIdentityDetails from our UserAssignedIdentityDetails +func (details *UserAssignedIdentityDetails) AssignProperties_To_UserAssignedIdentityDetails(destination *v20230101s.UserAssignedIdentityDetails) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(details.PropertyBag) + + // Reference + destination.Reference = details.Reference.Copy() + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForUserAssignedIdentityDetails interface (if implemented) to customize the conversion + var detailsAsAny any = details + if augmentedDetails, ok := detailsAsAny.(augmentConversionForUserAssignedIdentityDetails); ok { + err := augmentedDetails.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } -// Storage version of v1api20220901.KeyCreationTime_STATUS -// Storage account keys creation time. -type KeyCreationTime_STATUS struct { - Key1 *string `json:"key1,omitempty"` - Key2 *string `json:"key2,omitempty"` +// Storage version of v1api20220901.VirtualNetworkRule +// Virtual Network rule. +type VirtualNetworkRule struct { + Action *string `json:"action,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} -// Storage version of v1api20220901.KeyPolicy -// KeyPolicy assigned to the storage account. -type KeyPolicy struct { - KeyExpirationPeriodInDays *int `json:"keyExpirationPeriodInDays,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + // +kubebuilder:validation:Required + // Reference: Resource ID of a subnet, for example: + // /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` + State *string `json:"state,omitempty"` } -// Storage version of v1api20220901.KeyPolicy_STATUS -// KeyPolicy assigned to the storage account. -type KeyPolicy_STATUS struct { - KeyExpirationPeriodInDays *int `json:"keyExpirationPeriodInDays,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} +// AssignProperties_From_VirtualNetworkRule populates our VirtualNetworkRule from the provided source VirtualNetworkRule +func (rule *VirtualNetworkRule) AssignProperties_From_VirtualNetworkRule(source *v20230101s.VirtualNetworkRule) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) -// Storage version of v1api20220901.NetworkRuleSet -// Network rule set -type NetworkRuleSet struct { - Bypass *string `json:"bypass,omitempty"` - DefaultAction *string `json:"defaultAction,omitempty"` - IpRules []IPRule `json:"ipRules,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - ResourceAccessRules []ResourceAccessRule `json:"resourceAccessRules,omitempty"` - VirtualNetworkRules []VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` + // Action + rule.Action = genruntime.ClonePointerToString(source.Action) + + // Reference + if source.Reference != nil { + reference := source.Reference.Copy() + rule.Reference = &reference + } else { + rule.Reference = nil + } + + // State + rule.State = genruntime.ClonePointerToString(source.State) + + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } + + // Invoke the augmentConversionForVirtualNetworkRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForVirtualNetworkRule); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil } -// Storage version of v1api20220901.NetworkRuleSet_STATUS -// Network rule set -type NetworkRuleSet_STATUS struct { - Bypass *string `json:"bypass,omitempty"` - DefaultAction *string `json:"defaultAction,omitempty"` - IpRules []IPRule_STATUS `json:"ipRules,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - ResourceAccessRules []ResourceAccessRule_STATUS `json:"resourceAccessRules,omitempty"` - VirtualNetworkRules []VirtualNetworkRule_STATUS `json:"virtualNetworkRules,omitempty"` +// AssignProperties_To_VirtualNetworkRule populates the provided destination VirtualNetworkRule from our VirtualNetworkRule +func (rule *VirtualNetworkRule) AssignProperties_To_VirtualNetworkRule(destination *v20230101s.VirtualNetworkRule) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) + + // Action + destination.Action = genruntime.ClonePointerToString(rule.Action) + + // Reference + if rule.Reference != nil { + reference := rule.Reference.Copy() + destination.Reference = &reference + } else { + destination.Reference = nil + } + + // State + destination.State = genruntime.ClonePointerToString(rule.State) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForVirtualNetworkRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForVirtualNetworkRule); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } -// Storage version of v1api20220901.PrivateEndpointConnection_STATUS -// The Private Endpoint Connection resource. -type PrivateEndpointConnection_STATUS struct { +// Storage version of v1api20220901.VirtualNetworkRule_STATUS +// Virtual Network rule. +type VirtualNetworkRule_STATUS struct { + Action *string `json:"action,omitempty"` Id *string `json:"id,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + State *string `json:"state,omitempty"` } -// Storage version of v1api20220901.RoutingPreference -// Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user -// data, the default option is microsoft routing -type RoutingPreference struct { - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` - PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` - RoutingChoice *string `json:"routingChoice,omitempty"` -} +// AssignProperties_From_VirtualNetworkRule_STATUS populates our VirtualNetworkRule_STATUS from the provided source VirtualNetworkRule_STATUS +func (rule *VirtualNetworkRule_STATUS) AssignProperties_From_VirtualNetworkRule_STATUS(source *v20230101s.VirtualNetworkRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) -// Storage version of v1api20220901.RoutingPreference_STATUS -// Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user -// data, the default option is microsoft routing -type RoutingPreference_STATUS struct { - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` - PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` - RoutingChoice *string `json:"routingChoice,omitempty"` -} + // Action + rule.Action = genruntime.ClonePointerToString(source.Action) -// Storage version of v1api20220901.SasPolicy -// SasPolicy assigned to the storage account. -type SasPolicy struct { - ExpirationAction *string `json:"expirationAction,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"` -} + // Id + rule.Id = genruntime.ClonePointerToString(source.Id) -// Storage version of v1api20220901.SasPolicy_STATUS -// SasPolicy assigned to the storage account. -type SasPolicy_STATUS struct { - ExpirationAction *string `json:"expirationAction,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"` -} + // State + rule.State = genruntime.ClonePointerToString(source.State) -// Storage version of v1api20220901.Sku -// The SKU of the storage account. -type Sku struct { - Name *string `json:"name,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Tier *string `json:"tier,omitempty"` -} + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } -// Storage version of v1api20220901.Sku_STATUS -// The SKU of the storage account. -type Sku_STATUS struct { - Name *string `json:"name,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Tier *string `json:"tier,omitempty"` -} + // Invoke the augmentConversionForVirtualNetworkRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForVirtualNetworkRule_STATUS); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } -// Storage version of v1api20220901.StorageAccountOperatorSpec -// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure -type StorageAccountOperatorSpec struct { - ConfigMaps *StorageAccountOperatorConfigMaps `json:"configMaps,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Secrets *StorageAccountOperatorSecrets `json:"secrets,omitempty"` + // No error + return nil } -// Storage version of v1api20220901.StorageAccountSkuConversionStatus_STATUS -// This defines the sku conversion status object for asynchronous sku conversions. -type StorageAccountSkuConversionStatus_STATUS struct { - EndTime *string `json:"endTime,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - SkuConversionStatus *string `json:"skuConversionStatus,omitempty"` - StartTime *string `json:"startTime,omitempty"` - TargetSkuName *string `json:"targetSkuName,omitempty"` -} +// AssignProperties_To_VirtualNetworkRule_STATUS populates the provided destination VirtualNetworkRule_STATUS from our VirtualNetworkRule_STATUS +func (rule *VirtualNetworkRule_STATUS) AssignProperties_To_VirtualNetworkRule_STATUS(destination *v20230101s.VirtualNetworkRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) -// Storage version of v1api20220901.AccountImmutabilityPolicyProperties -// This defines account-level immutability policy properties. -type AccountImmutabilityPolicyProperties struct { - AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` - ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - State *string `json:"state,omitempty"` -} + // Action + destination.Action = genruntime.ClonePointerToString(rule.Action) -// Storage version of v1api20220901.AccountImmutabilityPolicyProperties_STATUS -// This defines account-level immutability policy properties. -type AccountImmutabilityPolicyProperties_STATUS struct { - AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` - ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - State *string `json:"state,omitempty"` -} + // Id + destination.Id = genruntime.ClonePointerToString(rule.Id) + + // State + destination.State = genruntime.ClonePointerToString(rule.State) -// Storage version of v1api20220901.ActiveDirectoryProperties -// Settings properties for Active Directory (AD). -type ActiveDirectoryProperties struct { - AccountType *string `json:"accountType,omitempty"` - AzureStorageSid *string `json:"azureStorageSid,omitempty"` - DomainGuid *string `json:"domainGuid,omitempty"` - DomainName *string `json:"domainName,omitempty"` - DomainSid *string `json:"domainSid,omitempty"` - ForestName *string `json:"forestName,omitempty"` - NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - SamAccountName *string `json:"samAccountName,omitempty"` + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForVirtualNetworkRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForVirtualNetworkRule_STATUS); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } -// Storage version of v1api20220901.ActiveDirectoryProperties_STATUS -// Settings properties for Active Directory (AD). -type ActiveDirectoryProperties_STATUS struct { - AccountType *string `json:"accountType,omitempty"` - AzureStorageSid *string `json:"azureStorageSid,omitempty"` - DomainGuid *string `json:"domainGuid,omitempty"` - DomainName *string `json:"domainName,omitempty"` - DomainSid *string `json:"domainSid,omitempty"` - ForestName *string `json:"forestName,omitempty"` - NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - SamAccountName *string `json:"samAccountName,omitempty"` +type augmentConversionForAccountImmutabilityPolicyProperties interface { + AssignPropertiesFrom(src *v20230101s.AccountImmutabilityPolicyProperties) error + AssignPropertiesTo(dst *v20230101s.AccountImmutabilityPolicyProperties) error } -// Storage version of v1api20220901.BlobRestoreParameters_STATUS -// Blob restore parameters -type BlobRestoreParameters_STATUS struct { - BlobRanges []BlobRestoreRange_STATUS `json:"blobRanges,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - TimeToRestore *string `json:"timeToRestore,omitempty"` +type augmentConversionForAccountImmutabilityPolicyProperties_STATUS interface { + AssignPropertiesFrom(src *v20230101s.AccountImmutabilityPolicyProperties_STATUS) error + AssignPropertiesTo(dst *v20230101s.AccountImmutabilityPolicyProperties_STATUS) error } -// Storage version of v1api20220901.EncryptionIdentity -// Encryption identity for the storage account. -type EncryptionIdentity struct { - FederatedIdentityClientId *string `json:"federatedIdentityClientId,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +type augmentConversionForActiveDirectoryProperties interface { + AssignPropertiesFrom(src *v20230101s.ActiveDirectoryProperties) error + AssignPropertiesTo(dst *v20230101s.ActiveDirectoryProperties) error +} - // UserAssignedIdentityReference: Resource identifier of the UserAssigned identity to be associated with server-side - // encryption on the storage account. - UserAssignedIdentityReference *genruntime.ResourceReference `armReference:"UserAssignedIdentity" json:"userAssignedIdentityReference,omitempty"` +type augmentConversionForActiveDirectoryProperties_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ActiveDirectoryProperties_STATUS) error + AssignPropertiesTo(dst *v20230101s.ActiveDirectoryProperties_STATUS) error } -// Storage version of v1api20220901.EncryptionIdentity_STATUS -// Encryption identity for the storage account. -type EncryptionIdentity_STATUS struct { - FederatedIdentityClientId *string `json:"federatedIdentityClientId,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` +type augmentConversionForBlobRestoreParameters_STATUS interface { + AssignPropertiesFrom(src *v20230101s.BlobRestoreParameters_STATUS) error + AssignPropertiesTo(dst *v20230101s.BlobRestoreParameters_STATUS) error } -// Storage version of v1api20220901.EncryptionServices -// A list of services that support encryption. -type EncryptionServices struct { - Blob *EncryptionService `json:"blob,omitempty"` - File *EncryptionService `json:"file,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Queue *EncryptionService `json:"queue,omitempty"` - Table *EncryptionService `json:"table,omitempty"` +type augmentConversionForEncryptionIdentity interface { + AssignPropertiesFrom(src *v20230101s.EncryptionIdentity) error + AssignPropertiesTo(dst *v20230101s.EncryptionIdentity) error } -// Storage version of v1api20220901.EncryptionServices_STATUS -// A list of services that support encryption. -type EncryptionServices_STATUS struct { - Blob *EncryptionService_STATUS `json:"blob,omitempty"` - File *EncryptionService_STATUS `json:"file,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Queue *EncryptionService_STATUS `json:"queue,omitempty"` - Table *EncryptionService_STATUS `json:"table,omitempty"` +type augmentConversionForEncryptionIdentity_STATUS interface { + AssignPropertiesFrom(src *v20230101s.EncryptionIdentity_STATUS) error + AssignPropertiesTo(dst *v20230101s.EncryptionIdentity_STATUS) error } -// Storage version of v1api20220901.IPRule -// IP rule with specific IP or IP range in CIDR format. -type IPRule struct { - Action *string `json:"action,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Value *string `json:"value,omitempty"` +type augmentConversionForEncryptionServices interface { + AssignPropertiesFrom(src *v20230101s.EncryptionServices) error + AssignPropertiesTo(dst *v20230101s.EncryptionServices) error } -// Storage version of v1api20220901.IPRule_STATUS -// IP rule with specific IP or IP range in CIDR format. -type IPRule_STATUS struct { - Action *string `json:"action,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Value *string `json:"value,omitempty"` +type augmentConversionForEncryptionServices_STATUS interface { + AssignPropertiesFrom(src *v20230101s.EncryptionServices_STATUS) error + AssignPropertiesTo(dst *v20230101s.EncryptionServices_STATUS) error } -// Storage version of v1api20220901.KeyVaultProperties -// Properties of key vault. -type KeyVaultProperties struct { - Keyname *string `json:"keyname,omitempty"` - Keyvaulturi *string `json:"keyvaulturi,omitempty"` - Keyversion *string `json:"keyversion,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +type augmentConversionForIPRule interface { + AssignPropertiesFrom(src *v20230101s.IPRule) error + AssignPropertiesTo(dst *v20230101s.IPRule) error } -// Storage version of v1api20220901.KeyVaultProperties_STATUS -// Properties of key vault. -type KeyVaultProperties_STATUS struct { - CurrentVersionedKeyExpirationTimestamp *string `json:"currentVersionedKeyExpirationTimestamp,omitempty"` - CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"` - Keyname *string `json:"keyname,omitempty"` - Keyvaulturi *string `json:"keyvaulturi,omitempty"` - Keyversion *string `json:"keyversion,omitempty"` - LastKeyRotationTimestamp *string `json:"lastKeyRotationTimestamp,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +type augmentConversionForIPRule_STATUS interface { + AssignPropertiesFrom(src *v20230101s.IPRule_STATUS) error + AssignPropertiesTo(dst *v20230101s.IPRule_STATUS) error } -// Storage version of v1api20220901.ResourceAccessRule -// Resource Access Rule. -type ResourceAccessRule struct { - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +type augmentConversionForKeyVaultProperties interface { + AssignPropertiesFrom(src *v20230101s.KeyVaultProperties) error + AssignPropertiesTo(dst *v20230101s.KeyVaultProperties) error +} - // ResourceReference: Resource Id - ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"` - TenantId *string `json:"tenantId,omitempty"` +type augmentConversionForKeyVaultProperties_STATUS interface { + AssignPropertiesFrom(src *v20230101s.KeyVaultProperties_STATUS) error + AssignPropertiesTo(dst *v20230101s.KeyVaultProperties_STATUS) error } -// Storage version of v1api20220901.ResourceAccessRule_STATUS -// Resource Access Rule. -type ResourceAccessRule_STATUS struct { - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - TenantId *string `json:"tenantId,omitempty"` +type augmentConversionForResourceAccessRule interface { + AssignPropertiesFrom(src *v20230101s.ResourceAccessRule) error + AssignPropertiesTo(dst *v20230101s.ResourceAccessRule) error } -// Storage version of v1api20220901.StorageAccountInternetEndpoints_STATUS -// The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint. -type StorageAccountInternetEndpoints_STATUS struct { - Blob *string `json:"blob,omitempty"` - Dfs *string `json:"dfs,omitempty"` - File *string `json:"file,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Web *string `json:"web,omitempty"` +type augmentConversionForResourceAccessRule_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ResourceAccessRule_STATUS) error + AssignPropertiesTo(dst *v20230101s.ResourceAccessRule_STATUS) error } -// Storage version of v1api20220901.StorageAccountMicrosoftEndpoints_STATUS -// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object via a microsoft routing -// endpoint. -type StorageAccountMicrosoftEndpoints_STATUS struct { - Blob *string `json:"blob,omitempty"` - Dfs *string `json:"dfs,omitempty"` - File *string `json:"file,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Queue *string `json:"queue,omitempty"` - Table *string `json:"table,omitempty"` - Web *string `json:"web,omitempty"` +type augmentConversionForStorageAccountInternetEndpoints_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountInternetEndpoints_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccountInternetEndpoints_STATUS) error } -// Storage version of v1api20220901.StorageAccountOperatorConfigMaps -type StorageAccountOperatorConfigMaps struct { - BlobEndpoint *genruntime.ConfigMapDestination `json:"blobEndpoint,omitempty"` - DfsEndpoint *genruntime.ConfigMapDestination `json:"dfsEndpoint,omitempty"` - FileEndpoint *genruntime.ConfigMapDestination `json:"fileEndpoint,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - QueueEndpoint *genruntime.ConfigMapDestination `json:"queueEndpoint,omitempty"` - TableEndpoint *genruntime.ConfigMapDestination `json:"tableEndpoint,omitempty"` - WebEndpoint *genruntime.ConfigMapDestination `json:"webEndpoint,omitempty"` +type augmentConversionForStorageAccountMicrosoftEndpoints_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountMicrosoftEndpoints_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccountMicrosoftEndpoints_STATUS) error } -// Storage version of v1api20220901.StorageAccountOperatorSecrets -type StorageAccountOperatorSecrets struct { - BlobEndpoint *genruntime.SecretDestination `json:"blobEndpoint,omitempty"` - DfsEndpoint *genruntime.SecretDestination `json:"dfsEndpoint,omitempty"` - FileEndpoint *genruntime.SecretDestination `json:"fileEndpoint,omitempty"` - Key1 *genruntime.SecretDestination `json:"key1,omitempty"` - Key2 *genruntime.SecretDestination `json:"key2,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - QueueEndpoint *genruntime.SecretDestination `json:"queueEndpoint,omitempty"` - TableEndpoint *genruntime.SecretDestination `json:"tableEndpoint,omitempty"` - WebEndpoint *genruntime.SecretDestination `json:"webEndpoint,omitempty"` +type augmentConversionForStorageAccountOperatorConfigMaps interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountOperatorConfigMaps) error + AssignPropertiesTo(dst *v20230101s.StorageAccountOperatorConfigMaps) error } -// Storage version of v1api20220901.UserAssignedIdentity_STATUS -// UserAssignedIdentity for the resource. -type UserAssignedIdentity_STATUS struct { - ClientId *string `json:"clientId,omitempty"` - PrincipalId *string `json:"principalId,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +type augmentConversionForStorageAccountOperatorSecrets interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountOperatorSecrets) error + AssignPropertiesTo(dst *v20230101s.StorageAccountOperatorSecrets) error } -// Storage version of v1api20220901.UserAssignedIdentityDetails -// Information about the user assigned identity for the resource -type UserAssignedIdentityDetails struct { - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` +type augmentConversionForUserAssignedIdentity_STATUS interface { + AssignPropertiesFrom(src *v20230101s.UserAssignedIdentity_STATUS) error + AssignPropertiesTo(dst *v20230101s.UserAssignedIdentity_STATUS) error } -// Storage version of v1api20220901.VirtualNetworkRule -// Virtual Network rule. -type VirtualNetworkRule struct { - Action *string `json:"action,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +type augmentConversionForUserAssignedIdentityDetails interface { + AssignPropertiesFrom(src *v20230101s.UserAssignedIdentityDetails) error + AssignPropertiesTo(dst *v20230101s.UserAssignedIdentityDetails) error +} - // +kubebuilder:validation:Required - // Reference: Resource ID of a subnet, for example: - // /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. - Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` - State *string `json:"state,omitempty"` +type augmentConversionForVirtualNetworkRule interface { + AssignPropertiesFrom(src *v20230101s.VirtualNetworkRule) error + AssignPropertiesTo(dst *v20230101s.VirtualNetworkRule) error } -// Storage version of v1api20220901.VirtualNetworkRule_STATUS -// Virtual Network rule. -type VirtualNetworkRule_STATUS struct { - Action *string `json:"action,omitempty"` - Id *string `json:"id,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - State *string `json:"state,omitempty"` +type augmentConversionForVirtualNetworkRule_STATUS interface { + AssignPropertiesFrom(src *v20230101s.VirtualNetworkRule_STATUS) error + AssignPropertiesTo(dst *v20230101s.VirtualNetworkRule_STATUS) error } // Storage version of v1api20220901.BlobRestoreRange_STATUS @@ -846,6 +7309,68 @@ type BlobRestoreRange_STATUS struct { StartRange *string `json:"startRange,omitempty"` } +// AssignProperties_From_BlobRestoreRange_STATUS populates our BlobRestoreRange_STATUS from the provided source BlobRestoreRange_STATUS +func (restoreRange *BlobRestoreRange_STATUS) AssignProperties_From_BlobRestoreRange_STATUS(source *v20230101s.BlobRestoreRange_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // EndRange + restoreRange.EndRange = genruntime.ClonePointerToString(source.EndRange) + + // StartRange + restoreRange.StartRange = genruntime.ClonePointerToString(source.StartRange) + + // Update the property bag + if len(propertyBag) > 0 { + restoreRange.PropertyBag = propertyBag + } else { + restoreRange.PropertyBag = nil + } + + // Invoke the augmentConversionForBlobRestoreRange_STATUS interface (if implemented) to customize the conversion + var restoreRangeAsAny any = restoreRange + if augmentedRestoreRange, ok := restoreRangeAsAny.(augmentConversionForBlobRestoreRange_STATUS); ok { + err := augmentedRestoreRange.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_BlobRestoreRange_STATUS populates the provided destination BlobRestoreRange_STATUS from our BlobRestoreRange_STATUS +func (restoreRange *BlobRestoreRange_STATUS) AssignProperties_To_BlobRestoreRange_STATUS(destination *v20230101s.BlobRestoreRange_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(restoreRange.PropertyBag) + + // EndRange + destination.EndRange = genruntime.ClonePointerToString(restoreRange.EndRange) + + // StartRange + destination.StartRange = genruntime.ClonePointerToString(restoreRange.StartRange) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForBlobRestoreRange_STATUS interface (if implemented) to customize the conversion + var restoreRangeAsAny any = restoreRange + if augmentedRestoreRange, ok := restoreRangeAsAny.(augmentConversionForBlobRestoreRange_STATUS); ok { + err := augmentedRestoreRange.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.EncryptionService // A service that allows server-side encryption to be used. type EncryptionService struct { @@ -854,6 +7379,78 @@ type EncryptionService struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_EncryptionService populates our EncryptionService from the provided source EncryptionService +func (service *EncryptionService) AssignProperties_From_EncryptionService(source *v20230101s.EncryptionService) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + service.Enabled = &enabled + } else { + service.Enabled = nil + } + + // KeyType + service.KeyType = genruntime.ClonePointerToString(source.KeyType) + + // Update the property bag + if len(propertyBag) > 0 { + service.PropertyBag = propertyBag + } else { + service.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryptionService interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForEncryptionService); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_EncryptionService populates the provided destination EncryptionService from our EncryptionService +func (service *EncryptionService) AssignProperties_To_EncryptionService(destination *v20230101s.EncryptionService) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(service.PropertyBag) + + // Enabled + if service.Enabled != nil { + enabled := *service.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // KeyType + destination.KeyType = genruntime.ClonePointerToString(service.KeyType) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryptionService interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForEncryptionService); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.EncryptionService_STATUS // A service that allows server-side encryption to be used. type EncryptionService_STATUS struct { @@ -863,6 +7460,99 @@ type EncryptionService_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_EncryptionService_STATUS populates our EncryptionService_STATUS from the provided source EncryptionService_STATUS +func (service *EncryptionService_STATUS) AssignProperties_From_EncryptionService_STATUS(source *v20230101s.EncryptionService_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + service.Enabled = &enabled + } else { + service.Enabled = nil + } + + // KeyType + service.KeyType = genruntime.ClonePointerToString(source.KeyType) + + // LastEnabledTime + service.LastEnabledTime = genruntime.ClonePointerToString(source.LastEnabledTime) + + // Update the property bag + if len(propertyBag) > 0 { + service.PropertyBag = propertyBag + } else { + service.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryptionService_STATUS interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForEncryptionService_STATUS); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_EncryptionService_STATUS populates the provided destination EncryptionService_STATUS from our EncryptionService_STATUS +func (service *EncryptionService_STATUS) AssignProperties_To_EncryptionService_STATUS(destination *v20230101s.EncryptionService_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(service.PropertyBag) + + // Enabled + if service.Enabled != nil { + enabled := *service.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // KeyType + destination.KeyType = genruntime.ClonePointerToString(service.KeyType) + + // LastEnabledTime + destination.LastEnabledTime = genruntime.ClonePointerToString(service.LastEnabledTime) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForEncryptionService_STATUS interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForEncryptionService_STATUS); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForBlobRestoreRange_STATUS interface { + AssignPropertiesFrom(src *v20230101s.BlobRestoreRange_STATUS) error + AssignPropertiesTo(dst *v20230101s.BlobRestoreRange_STATUS) error +} + +type augmentConversionForEncryptionService interface { + AssignPropertiesFrom(src *v20230101s.EncryptionService) error + AssignPropertiesTo(dst *v20230101s.EncryptionService) error +} + +type augmentConversionForEncryptionService_STATUS interface { + AssignPropertiesFrom(src *v20230101s.EncryptionService_STATUS) error + AssignPropertiesTo(dst *v20230101s.EncryptionService_STATUS) error +} + func init() { SchemeBuilder.Register(&StorageAccount{}, &StorageAccountList{}) } diff --git a/v2/api/storage/v1api20220901/storage/storage_account_types_gen_test.go b/v2/api/storage/v1api20220901/storage/storage_account_types_gen_test.go index cd41415ffa4..3e25912bf24 100644 --- a/v2/api/storage/v1api20220901/storage/storage_account_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage/storage_account_types_gen_test.go @@ -5,6 +5,7 @@ package storage import ( "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -17,6 +18,91 @@ import ( "testing" ) +func Test_StorageAccount_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccount to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccount, StorageAccountGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccount tests if a specific instance of StorageAccount round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccount(subject StorageAccount) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccount + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccount + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccount_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccount to StorageAccount via AssignProperties_To_StorageAccount & AssignProperties_From_StorageAccount returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccount, StorageAccountGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccount tests if a specific instance of StorageAccount can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccount(subject StorageAccount) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccount + err := copied.AssignProperties_To_StorageAccount(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccount + err = actual.AssignProperties_From_StorageAccount(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccount_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -78,6 +164,48 @@ func AddRelatedPropertyGeneratorsForStorageAccount(gens map[string]gopter.Gen) { gens["Status"] = StorageAccount_STATUSGenerator() } +func Test_StorageAccount_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccount_Spec to StorageAccount_Spec via AssignProperties_To_StorageAccount_Spec & AssignProperties_From_StorageAccount_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccount_Spec, StorageAccount_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccount_Spec tests if a specific instance of StorageAccount_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccount_Spec(subject StorageAccount_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccount_Spec + err := copied.AssignProperties_To_StorageAccount_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccount_Spec + err = actual.AssignProperties_From_StorageAccount_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccount_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -183,6 +311,48 @@ func AddRelatedPropertyGeneratorsForStorageAccount_Spec(gens map[string]gopter.G gens["Sku"] = gen.PtrOf(SkuGenerator()) } +func Test_StorageAccount_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccount_STATUS to StorageAccount_STATUS via AssignProperties_To_StorageAccount_STATUS & AssignProperties_From_StorageAccount_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccount_STATUS, StorageAccount_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccount_STATUS tests if a specific instance of StorageAccount_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccount_STATUS(subject StorageAccount_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccount_STATUS + err := copied.AssignProperties_To_StorageAccount_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccount_STATUS + err = actual.AssignProperties_From_StorageAccount_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccount_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -303,6 +473,48 @@ func AddRelatedPropertyGeneratorsForStorageAccount_STATUS(gens map[string]gopter gens["StorageAccountSkuConversionStatus"] = gen.PtrOf(StorageAccountSkuConversionStatus_STATUSGenerator()) } +func Test_AzureFilesIdentityBasedAuthentication_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from AzureFilesIdentityBasedAuthentication to AzureFilesIdentityBasedAuthentication via AssignProperties_To_AzureFilesIdentityBasedAuthentication & AssignProperties_From_AzureFilesIdentityBasedAuthentication returns original", + prop.ForAll(RunPropertyAssignmentTestForAzureFilesIdentityBasedAuthentication, AzureFilesIdentityBasedAuthenticationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForAzureFilesIdentityBasedAuthentication tests if a specific instance of AzureFilesIdentityBasedAuthentication can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForAzureFilesIdentityBasedAuthentication(subject AzureFilesIdentityBasedAuthentication) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.AzureFilesIdentityBasedAuthentication + err := copied.AssignProperties_To_AzureFilesIdentityBasedAuthentication(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual AzureFilesIdentityBasedAuthentication + err = actual.AssignProperties_From_AzureFilesIdentityBasedAuthentication(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_AzureFilesIdentityBasedAuthentication_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -379,6 +591,48 @@ func AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication(gens m gens["ActiveDirectoryProperties"] = gen.PtrOf(ActiveDirectoryPropertiesGenerator()) } +func Test_AzureFilesIdentityBasedAuthentication_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from AzureFilesIdentityBasedAuthentication_STATUS to AzureFilesIdentityBasedAuthentication_STATUS via AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS & AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForAzureFilesIdentityBasedAuthentication_STATUS, AzureFilesIdentityBasedAuthentication_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForAzureFilesIdentityBasedAuthentication_STATUS tests if a specific instance of AzureFilesIdentityBasedAuthentication_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForAzureFilesIdentityBasedAuthentication_STATUS(subject AzureFilesIdentityBasedAuthentication_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.AzureFilesIdentityBasedAuthentication_STATUS + err := copied.AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual AzureFilesIdentityBasedAuthentication_STATUS + err = actual.AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_AzureFilesIdentityBasedAuthentication_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -455,6 +709,48 @@ func AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS gens["ActiveDirectoryProperties"] = gen.PtrOf(ActiveDirectoryProperties_STATUSGenerator()) } +func Test_BlobRestoreStatus_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from BlobRestoreStatus_STATUS to BlobRestoreStatus_STATUS via AssignProperties_To_BlobRestoreStatus_STATUS & AssignProperties_From_BlobRestoreStatus_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForBlobRestoreStatus_STATUS, BlobRestoreStatus_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForBlobRestoreStatus_STATUS tests if a specific instance of BlobRestoreStatus_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForBlobRestoreStatus_STATUS(subject BlobRestoreStatus_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.BlobRestoreStatus_STATUS + err := copied.AssignProperties_To_BlobRestoreStatus_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual BlobRestoreStatus_STATUS + err = actual.AssignProperties_From_BlobRestoreStatus_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_BlobRestoreStatus_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -532,6 +828,48 @@ func AddRelatedPropertyGeneratorsForBlobRestoreStatus_STATUS(gens map[string]gop gens["Parameters"] = gen.PtrOf(BlobRestoreParameters_STATUSGenerator()) } +func Test_CustomDomain_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from CustomDomain to CustomDomain via AssignProperties_To_CustomDomain & AssignProperties_From_CustomDomain returns original", + prop.ForAll(RunPropertyAssignmentTestForCustomDomain, CustomDomainGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCustomDomain tests if a specific instance of CustomDomain can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCustomDomain(subject CustomDomain) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.CustomDomain + err := copied.AssignProperties_To_CustomDomain(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual CustomDomain + err = actual.AssignProperties_From_CustomDomain(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_CustomDomain_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -593,6 +931,48 @@ func AddIndependentPropertyGeneratorsForCustomDomain(gens map[string]gopter.Gen) gens["UseSubDomainName"] = gen.PtrOf(gen.Bool()) } +func Test_CustomDomain_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from CustomDomain_STATUS to CustomDomain_STATUS via AssignProperties_To_CustomDomain_STATUS & AssignProperties_From_CustomDomain_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForCustomDomain_STATUS, CustomDomain_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCustomDomain_STATUS tests if a specific instance of CustomDomain_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCustomDomain_STATUS(subject CustomDomain_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.CustomDomain_STATUS + err := copied.AssignProperties_To_CustomDomain_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual CustomDomain_STATUS + err = actual.AssignProperties_From_CustomDomain_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_CustomDomain_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -655,29 +1035,71 @@ func AddIndependentPropertyGeneratorsForCustomDomain_STATUS(gens map[string]gopt gens["UseSubDomainName"] = gen.PtrOf(gen.Bool()) } -func Test_Encryption_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { +func Test_Encryption_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 + parameters.MaxSize = 10 properties := gopter.NewProperties(parameters) properties.Property( - "Round trip of Encryption via JSON returns original", - prop.ForAll(RunJSONSerializationTestForEncryption, EncryptionGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) + "Round trip from Encryption to Encryption via AssignProperties_To_Encryption & AssignProperties_From_Encryption returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryption, EncryptionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) } -// RunJSONSerializationTestForEncryption runs a test to see if a specific instance of Encryption round trips to JSON and back losslessly -func RunJSONSerializationTestForEncryption(subject Encryption) string { - // Serialize to JSON - bin, err := json.Marshal(subject) +// RunPropertyAssignmentTestForEncryption tests if a specific instance of Encryption can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryption(subject Encryption) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Encryption + err := copied.AssignProperties_To_Encryption(&other) if err != nil { return err.Error() } - // Deserialize back into memory + // Use AssignPropertiesFrom() to convert back to our original type var actual Encryption - err = json.Unmarshal(bin, &actual) + err = actual.AssignProperties_From_Encryption(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_Encryption_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Encryption via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryption, EncryptionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryption runs a test to see if a specific instance of Encryption round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryption(subject Encryption) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Encryption + err = json.Unmarshal(bin, &actual) if err != nil { return err.Error() } @@ -732,6 +1154,48 @@ func AddRelatedPropertyGeneratorsForEncryption(gens map[string]gopter.Gen) { gens["Services"] = gen.PtrOf(EncryptionServicesGenerator()) } +func Test_Encryption_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Encryption_STATUS to Encryption_STATUS via AssignProperties_To_Encryption_STATUS & AssignProperties_From_Encryption_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryption_STATUS, Encryption_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryption_STATUS tests if a specific instance of Encryption_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryption_STATUS(subject Encryption_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Encryption_STATUS + err := copied.AssignProperties_To_Encryption_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Encryption_STATUS + err = actual.AssignProperties_From_Encryption_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_Encryption_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -809,6 +1273,48 @@ func AddRelatedPropertyGeneratorsForEncryption_STATUS(gens map[string]gopter.Gen gens["Services"] = gen.PtrOf(EncryptionServices_STATUSGenerator()) } +func Test_Endpoints_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Endpoints_STATUS to Endpoints_STATUS via AssignProperties_To_Endpoints_STATUS & AssignProperties_From_Endpoints_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForEndpoints_STATUS, Endpoints_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEndpoints_STATUS tests if a specific instance of Endpoints_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEndpoints_STATUS(subject Endpoints_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Endpoints_STATUS + err := copied.AssignProperties_To_Endpoints_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Endpoints_STATUS + err = actual.AssignProperties_From_Endpoints_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_Endpoints_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -889,6 +1395,48 @@ func AddRelatedPropertyGeneratorsForEndpoints_STATUS(gens map[string]gopter.Gen) gens["MicrosoftEndpoints"] = gen.PtrOf(StorageAccountMicrosoftEndpoints_STATUSGenerator()) } +func Test_ExtendedLocation_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ExtendedLocation to ExtendedLocation via AssignProperties_To_ExtendedLocation & AssignProperties_From_ExtendedLocation returns original", + prop.ForAll(RunPropertyAssignmentTestForExtendedLocation, ExtendedLocationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForExtendedLocation tests if a specific instance of ExtendedLocation can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForExtendedLocation(subject ExtendedLocation) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ExtendedLocation + err := copied.AssignProperties_To_ExtendedLocation(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ExtendedLocation + err = actual.AssignProperties_From_ExtendedLocation(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ExtendedLocation_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -950,6 +1498,48 @@ func AddIndependentPropertyGeneratorsForExtendedLocation(gens map[string]gopter. gens["Type"] = gen.PtrOf(gen.AlphaString()) } +func Test_ExtendedLocation_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ExtendedLocation_STATUS to ExtendedLocation_STATUS via AssignProperties_To_ExtendedLocation_STATUS & AssignProperties_From_ExtendedLocation_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForExtendedLocation_STATUS, ExtendedLocation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForExtendedLocation_STATUS tests if a specific instance of ExtendedLocation_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForExtendedLocation_STATUS(subject ExtendedLocation_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ExtendedLocation_STATUS + err := copied.AssignProperties_To_ExtendedLocation_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ExtendedLocation_STATUS + err = actual.AssignProperties_From_ExtendedLocation_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ExtendedLocation_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1012,6 +1602,48 @@ func AddIndependentPropertyGeneratorsForExtendedLocation_STATUS(gens map[string] gens["Type"] = gen.PtrOf(gen.AlphaString()) } +func Test_GeoReplicationStats_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from GeoReplicationStats_STATUS to GeoReplicationStats_STATUS via AssignProperties_To_GeoReplicationStats_STATUS & AssignProperties_From_GeoReplicationStats_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForGeoReplicationStats_STATUS, GeoReplicationStats_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForGeoReplicationStats_STATUS tests if a specific instance of GeoReplicationStats_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForGeoReplicationStats_STATUS(subject GeoReplicationStats_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.GeoReplicationStats_STATUS + err := copied.AssignProperties_To_GeoReplicationStats_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual GeoReplicationStats_STATUS + err = actual.AssignProperties_From_GeoReplicationStats_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_GeoReplicationStats_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1075,6 +1707,48 @@ func AddIndependentPropertyGeneratorsForGeoReplicationStats_STATUS(gens map[stri gens["Status"] = gen.PtrOf(gen.AlphaString()) } +func Test_Identity_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Identity to Identity via AssignProperties_To_Identity & AssignProperties_From_Identity returns original", + prop.ForAll(RunPropertyAssignmentTestForIdentity, IdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForIdentity tests if a specific instance of Identity can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForIdentity(subject Identity) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Identity + err := copied.AssignProperties_To_Identity(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Identity + err = actual.AssignProperties_From_Identity(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_Identity_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1149,6 +1823,48 @@ func AddRelatedPropertyGeneratorsForIdentity(gens map[string]gopter.Gen) { gens["UserAssignedIdentities"] = gen.SliceOf(UserAssignedIdentityDetailsGenerator()) } +func Test_Identity_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Identity_STATUS to Identity_STATUS via AssignProperties_To_Identity_STATUS & AssignProperties_From_Identity_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForIdentity_STATUS, Identity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForIdentity_STATUS tests if a specific instance of Identity_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForIdentity_STATUS(subject Identity_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Identity_STATUS + err := copied.AssignProperties_To_Identity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Identity_STATUS + err = actual.AssignProperties_From_Identity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_Identity_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1225,6 +1941,48 @@ func AddRelatedPropertyGeneratorsForIdentity_STATUS(gens map[string]gopter.Gen) gens["UserAssignedIdentities"] = gen.MapOf(gen.AlphaString(), UserAssignedIdentity_STATUSGenerator()) } +func Test_ImmutableStorageAccount_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ImmutableStorageAccount to ImmutableStorageAccount via AssignProperties_To_ImmutableStorageAccount & AssignProperties_From_ImmutableStorageAccount returns original", + prop.ForAll(RunPropertyAssignmentTestForImmutableStorageAccount, ImmutableStorageAccountGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForImmutableStorageAccount tests if a specific instance of ImmutableStorageAccount can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForImmutableStorageAccount(subject ImmutableStorageAccount) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ImmutableStorageAccount + err := copied.AssignProperties_To_ImmutableStorageAccount(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ImmutableStorageAccount + err = actual.AssignProperties_From_ImmutableStorageAccount(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ImmutableStorageAccount_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1300,10 +2058,52 @@ func AddRelatedPropertyGeneratorsForImmutableStorageAccount(gens map[string]gopt gens["ImmutabilityPolicy"] = gen.PtrOf(AccountImmutabilityPolicyPropertiesGenerator()) } -func Test_ImmutableStorageAccount_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { +func Test_ImmutableStorageAccount_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ImmutableStorageAccount_STATUS to ImmutableStorageAccount_STATUS via AssignProperties_To_ImmutableStorageAccount_STATUS & AssignProperties_From_ImmutableStorageAccount_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForImmutableStorageAccount_STATUS, ImmutableStorageAccount_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForImmutableStorageAccount_STATUS tests if a specific instance of ImmutableStorageAccount_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForImmutableStorageAccount_STATUS(subject ImmutableStorageAccount_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ImmutableStorageAccount_STATUS + err := copied.AssignProperties_To_ImmutableStorageAccount_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ImmutableStorageAccount_STATUS + err = actual.AssignProperties_From_ImmutableStorageAccount_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ImmutableStorageAccount_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 parameters.MaxSize = 3 properties := gopter.NewProperties(parameters) properties.Property( @@ -1375,6 +2175,48 @@ func AddRelatedPropertyGeneratorsForImmutableStorageAccount_STATUS(gens map[stri gens["ImmutabilityPolicy"] = gen.PtrOf(AccountImmutabilityPolicyProperties_STATUSGenerator()) } +func Test_KeyCreationTime_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from KeyCreationTime_STATUS to KeyCreationTime_STATUS via AssignProperties_To_KeyCreationTime_STATUS & AssignProperties_From_KeyCreationTime_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForKeyCreationTime_STATUS, KeyCreationTime_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForKeyCreationTime_STATUS tests if a specific instance of KeyCreationTime_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForKeyCreationTime_STATUS(subject KeyCreationTime_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.KeyCreationTime_STATUS + err := copied.AssignProperties_To_KeyCreationTime_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual KeyCreationTime_STATUS + err = actual.AssignProperties_From_KeyCreationTime_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_KeyCreationTime_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1437,6 +2279,48 @@ func AddIndependentPropertyGeneratorsForKeyCreationTime_STATUS(gens map[string]g gens["Key2"] = gen.PtrOf(gen.AlphaString()) } +func Test_KeyPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from KeyPolicy to KeyPolicy via AssignProperties_To_KeyPolicy & AssignProperties_From_KeyPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForKeyPolicy, KeyPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForKeyPolicy tests if a specific instance of KeyPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForKeyPolicy(subject KeyPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.KeyPolicy + err := copied.AssignProperties_To_KeyPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual KeyPolicy + err = actual.AssignProperties_From_KeyPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_KeyPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1497,6 +2381,48 @@ func AddIndependentPropertyGeneratorsForKeyPolicy(gens map[string]gopter.Gen) { gens["KeyExpirationPeriodInDays"] = gen.PtrOf(gen.Int()) } +func Test_KeyPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from KeyPolicy_STATUS to KeyPolicy_STATUS via AssignProperties_To_KeyPolicy_STATUS & AssignProperties_From_KeyPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForKeyPolicy_STATUS, KeyPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForKeyPolicy_STATUS tests if a specific instance of KeyPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForKeyPolicy_STATUS(subject KeyPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.KeyPolicy_STATUS + err := copied.AssignProperties_To_KeyPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual KeyPolicy_STATUS + err = actual.AssignProperties_From_KeyPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_KeyPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1557,6 +2483,48 @@ func AddIndependentPropertyGeneratorsForKeyPolicy_STATUS(gens map[string]gopter. gens["KeyExpirationPeriodInDays"] = gen.PtrOf(gen.Int()) } +func Test_NetworkRuleSet_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from NetworkRuleSet to NetworkRuleSet via AssignProperties_To_NetworkRuleSet & AssignProperties_From_NetworkRuleSet returns original", + prop.ForAll(RunPropertyAssignmentTestForNetworkRuleSet, NetworkRuleSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForNetworkRuleSet tests if a specific instance of NetworkRuleSet can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForNetworkRuleSet(subject NetworkRuleSet) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.NetworkRuleSet + err := copied.AssignProperties_To_NetworkRuleSet(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual NetworkRuleSet + err = actual.AssignProperties_From_NetworkRuleSet(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_NetworkRuleSet_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1634,6 +2602,48 @@ func AddRelatedPropertyGeneratorsForNetworkRuleSet(gens map[string]gopter.Gen) { gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRuleGenerator()) } +func Test_NetworkRuleSet_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from NetworkRuleSet_STATUS to NetworkRuleSet_STATUS via AssignProperties_To_NetworkRuleSet_STATUS & AssignProperties_From_NetworkRuleSet_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForNetworkRuleSet_STATUS, NetworkRuleSet_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForNetworkRuleSet_STATUS tests if a specific instance of NetworkRuleSet_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForNetworkRuleSet_STATUS(subject NetworkRuleSet_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.NetworkRuleSet_STATUS + err := copied.AssignProperties_To_NetworkRuleSet_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual NetworkRuleSet_STATUS + err = actual.AssignProperties_From_NetworkRuleSet_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_NetworkRuleSet_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1712,6 +2722,48 @@ func AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS(gens map[string]gopter gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRule_STATUSGenerator()) } +func Test_PrivateEndpointConnection_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from PrivateEndpointConnection_STATUS to PrivateEndpointConnection_STATUS via AssignProperties_To_PrivateEndpointConnection_STATUS & AssignProperties_From_PrivateEndpointConnection_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForPrivateEndpointConnection_STATUS, PrivateEndpointConnection_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForPrivateEndpointConnection_STATUS tests if a specific instance of PrivateEndpointConnection_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForPrivateEndpointConnection_STATUS(subject PrivateEndpointConnection_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.PrivateEndpointConnection_STATUS + err := copied.AssignProperties_To_PrivateEndpointConnection_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual PrivateEndpointConnection_STATUS + err = actual.AssignProperties_From_PrivateEndpointConnection_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_PrivateEndpointConnection_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1773,6 +2825,48 @@ func AddIndependentPropertyGeneratorsForPrivateEndpointConnection_STATUS(gens ma gens["Id"] = gen.PtrOf(gen.AlphaString()) } +func Test_RoutingPreference_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from RoutingPreference to RoutingPreference via AssignProperties_To_RoutingPreference & AssignProperties_From_RoutingPreference returns original", + prop.ForAll(RunPropertyAssignmentTestForRoutingPreference, RoutingPreferenceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForRoutingPreference tests if a specific instance of RoutingPreference can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForRoutingPreference(subject RoutingPreference) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.RoutingPreference + err := copied.AssignProperties_To_RoutingPreference(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual RoutingPreference + err = actual.AssignProperties_From_RoutingPreference(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_RoutingPreference_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1835,6 +2929,48 @@ func AddIndependentPropertyGeneratorsForRoutingPreference(gens map[string]gopter gens["RoutingChoice"] = gen.PtrOf(gen.AlphaString()) } +func Test_RoutingPreference_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from RoutingPreference_STATUS to RoutingPreference_STATUS via AssignProperties_To_RoutingPreference_STATUS & AssignProperties_From_RoutingPreference_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForRoutingPreference_STATUS, RoutingPreference_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForRoutingPreference_STATUS tests if a specific instance of RoutingPreference_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForRoutingPreference_STATUS(subject RoutingPreference_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.RoutingPreference_STATUS + err := copied.AssignProperties_To_RoutingPreference_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual RoutingPreference_STATUS + err = actual.AssignProperties_From_RoutingPreference_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_RoutingPreference_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1898,22 +3034,64 @@ func AddIndependentPropertyGeneratorsForRoutingPreference_STATUS(gens map[string gens["RoutingChoice"] = gen.PtrOf(gen.AlphaString()) } -func Test_SasPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { +func Test_SasPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 + parameters.MaxSize = 10 properties := gopter.NewProperties(parameters) properties.Property( - "Round trip of SasPolicy via JSON returns original", - prop.ForAll(RunJSONSerializationTestForSasPolicy, SasPolicyGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) + "Round trip from SasPolicy to SasPolicy via AssignProperties_To_SasPolicy & AssignProperties_From_SasPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForSasPolicy, SasPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) } -// RunJSONSerializationTestForSasPolicy runs a test to see if a specific instance of SasPolicy round trips to JSON and back losslessly -func RunJSONSerializationTestForSasPolicy(subject SasPolicy) string { - // Serialize to JSON - bin, err := json.Marshal(subject) +// RunPropertyAssignmentTestForSasPolicy tests if a specific instance of SasPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSasPolicy(subject SasPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.SasPolicy + err := copied.AssignProperties_To_SasPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SasPolicy + err = actual.AssignProperties_From_SasPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_SasPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SasPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSasPolicy, SasPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSasPolicy runs a test to see if a specific instance of SasPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForSasPolicy(subject SasPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) if err != nil { return err.Error() } @@ -1959,6 +3137,48 @@ func AddIndependentPropertyGeneratorsForSasPolicy(gens map[string]gopter.Gen) { gens["SasExpirationPeriod"] = gen.PtrOf(gen.AlphaString()) } +func Test_SasPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SasPolicy_STATUS to SasPolicy_STATUS via AssignProperties_To_SasPolicy_STATUS & AssignProperties_From_SasPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSasPolicy_STATUS, SasPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSasPolicy_STATUS tests if a specific instance of SasPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSasPolicy_STATUS(subject SasPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.SasPolicy_STATUS + err := copied.AssignProperties_To_SasPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SasPolicy_STATUS + err = actual.AssignProperties_From_SasPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_SasPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2020,6 +3240,48 @@ func AddIndependentPropertyGeneratorsForSasPolicy_STATUS(gens map[string]gopter. gens["SasExpirationPeriod"] = gen.PtrOf(gen.AlphaString()) } +func Test_Sku_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Sku to Sku via AssignProperties_To_Sku & AssignProperties_From_Sku returns original", + prop.ForAll(RunPropertyAssignmentTestForSku, SkuGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSku tests if a specific instance of Sku can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSku(subject Sku) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Sku + err := copied.AssignProperties_To_Sku(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Sku + err = actual.AssignProperties_From_Sku(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_Sku_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2081,6 +3343,48 @@ func AddIndependentPropertyGeneratorsForSku(gens map[string]gopter.Gen) { gens["Tier"] = gen.PtrOf(gen.AlphaString()) } +func Test_Sku_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Sku_STATUS to Sku_STATUS via AssignProperties_To_Sku_STATUS & AssignProperties_From_Sku_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSku_STATUS, Sku_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSku_STATUS tests if a specific instance of Sku_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSku_STATUS(subject Sku_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Sku_STATUS + err := copied.AssignProperties_To_Sku_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Sku_STATUS + err = actual.AssignProperties_From_Sku_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_Sku_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2142,6 +3446,48 @@ func AddIndependentPropertyGeneratorsForSku_STATUS(gens map[string]gopter.Gen) { gens["Tier"] = gen.PtrOf(gen.AlphaString()) } +func Test_StorageAccountOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountOperatorSpec to StorageAccountOperatorSpec via AssignProperties_To_StorageAccountOperatorSpec & AssignProperties_From_StorageAccountOperatorSpec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountOperatorSpec, StorageAccountOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountOperatorSpec tests if a specific instance of StorageAccountOperatorSpec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountOperatorSpec(subject StorageAccountOperatorSpec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountOperatorSpec + err := copied.AssignProperties_To_StorageAccountOperatorSpec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountOperatorSpec + err = actual.AssignProperties_From_StorageAccountOperatorSpec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountOperatorSpec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2204,6 +3550,48 @@ func AddRelatedPropertyGeneratorsForStorageAccountOperatorSpec(gens map[string]g gens["Secrets"] = gen.PtrOf(StorageAccountOperatorSecretsGenerator()) } +func Test_StorageAccountSkuConversionStatus_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountSkuConversionStatus_STATUS to StorageAccountSkuConversionStatus_STATUS via AssignProperties_To_StorageAccountSkuConversionStatus_STATUS & AssignProperties_From_StorageAccountSkuConversionStatus_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountSkuConversionStatus_STATUS, StorageAccountSkuConversionStatus_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountSkuConversionStatus_STATUS tests if a specific instance of StorageAccountSkuConversionStatus_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountSkuConversionStatus_STATUS(subject StorageAccountSkuConversionStatus_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountSkuConversionStatus_STATUS + err := copied.AssignProperties_To_StorageAccountSkuConversionStatus_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountSkuConversionStatus_STATUS + err = actual.AssignProperties_From_StorageAccountSkuConversionStatus_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountSkuConversionStatus_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2268,6 +3656,48 @@ func AddIndependentPropertyGeneratorsForStorageAccountSkuConversionStatus_STATUS gens["TargetSkuName"] = gen.PtrOf(gen.AlphaString()) } +func Test_AccountImmutabilityPolicyProperties_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from AccountImmutabilityPolicyProperties to AccountImmutabilityPolicyProperties via AssignProperties_To_AccountImmutabilityPolicyProperties & AssignProperties_From_AccountImmutabilityPolicyProperties returns original", + prop.ForAll(RunPropertyAssignmentTestForAccountImmutabilityPolicyProperties, AccountImmutabilityPolicyPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForAccountImmutabilityPolicyProperties tests if a specific instance of AccountImmutabilityPolicyProperties can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForAccountImmutabilityPolicyProperties(subject AccountImmutabilityPolicyProperties) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.AccountImmutabilityPolicyProperties + err := copied.AssignProperties_To_AccountImmutabilityPolicyProperties(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual AccountImmutabilityPolicyProperties + err = actual.AssignProperties_From_AccountImmutabilityPolicyProperties(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_AccountImmutabilityPolicyProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2331,6 +3761,48 @@ func AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties(gens gens["State"] = gen.PtrOf(gen.AlphaString()) } +func Test_AccountImmutabilityPolicyProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from AccountImmutabilityPolicyProperties_STATUS to AccountImmutabilityPolicyProperties_STATUS via AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS & AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForAccountImmutabilityPolicyProperties_STATUS, AccountImmutabilityPolicyProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForAccountImmutabilityPolicyProperties_STATUS tests if a specific instance of AccountImmutabilityPolicyProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForAccountImmutabilityPolicyProperties_STATUS(subject AccountImmutabilityPolicyProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.AccountImmutabilityPolicyProperties_STATUS + err := copied.AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual AccountImmutabilityPolicyProperties_STATUS + err = actual.AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_AccountImmutabilityPolicyProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2394,6 +3866,48 @@ func AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_STAT gens["State"] = gen.PtrOf(gen.AlphaString()) } +func Test_ActiveDirectoryProperties_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ActiveDirectoryProperties to ActiveDirectoryProperties via AssignProperties_To_ActiveDirectoryProperties & AssignProperties_From_ActiveDirectoryProperties returns original", + prop.ForAll(RunPropertyAssignmentTestForActiveDirectoryProperties, ActiveDirectoryPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForActiveDirectoryProperties tests if a specific instance of ActiveDirectoryProperties can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForActiveDirectoryProperties(subject ActiveDirectoryProperties) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ActiveDirectoryProperties + err := copied.AssignProperties_To_ActiveDirectoryProperties(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ActiveDirectoryProperties + err = actual.AssignProperties_From_ActiveDirectoryProperties(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ActiveDirectoryProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2462,14 +3976,56 @@ func AddIndependentPropertyGeneratorsForActiveDirectoryProperties(gens map[strin gens["SamAccountName"] = gen.PtrOf(gen.AlphaString()) } -func Test_ActiveDirectoryProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { +func Test_ActiveDirectoryProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 + parameters.MaxSize = 10 properties := gopter.NewProperties(parameters) properties.Property( - "Round trip of ActiveDirectoryProperties_STATUS via JSON returns original", + "Round trip from ActiveDirectoryProperties_STATUS to ActiveDirectoryProperties_STATUS via AssignProperties_To_ActiveDirectoryProperties_STATUS & AssignProperties_From_ActiveDirectoryProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForActiveDirectoryProperties_STATUS, ActiveDirectoryProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForActiveDirectoryProperties_STATUS tests if a specific instance of ActiveDirectoryProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForActiveDirectoryProperties_STATUS(subject ActiveDirectoryProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ActiveDirectoryProperties_STATUS + err := copied.AssignProperties_To_ActiveDirectoryProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ActiveDirectoryProperties_STATUS + err = actual.AssignProperties_From_ActiveDirectoryProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ActiveDirectoryProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ActiveDirectoryProperties_STATUS via JSON returns original", prop.ForAll(RunJSONSerializationTestForActiveDirectoryProperties_STATUS, ActiveDirectoryProperties_STATUSGenerator())) properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) } @@ -2530,6 +4086,48 @@ func AddIndependentPropertyGeneratorsForActiveDirectoryProperties_STATUS(gens ma gens["SamAccountName"] = gen.PtrOf(gen.AlphaString()) } +func Test_BlobRestoreParameters_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from BlobRestoreParameters_STATUS to BlobRestoreParameters_STATUS via AssignProperties_To_BlobRestoreParameters_STATUS & AssignProperties_From_BlobRestoreParameters_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForBlobRestoreParameters_STATUS, BlobRestoreParameters_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForBlobRestoreParameters_STATUS tests if a specific instance of BlobRestoreParameters_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForBlobRestoreParameters_STATUS(subject BlobRestoreParameters_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.BlobRestoreParameters_STATUS + err := copied.AssignProperties_To_BlobRestoreParameters_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual BlobRestoreParameters_STATUS + err = actual.AssignProperties_From_BlobRestoreParameters_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_BlobRestoreParameters_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2605,6 +4203,48 @@ func AddRelatedPropertyGeneratorsForBlobRestoreParameters_STATUS(gens map[string gens["BlobRanges"] = gen.SliceOf(BlobRestoreRange_STATUSGenerator()) } +func Test_EncryptionIdentity_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionIdentity to EncryptionIdentity via AssignProperties_To_EncryptionIdentity & AssignProperties_From_EncryptionIdentity returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionIdentity, EncryptionIdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionIdentity tests if a specific instance of EncryptionIdentity can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryptionIdentity(subject EncryptionIdentity) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.EncryptionIdentity + err := copied.AssignProperties_To_EncryptionIdentity(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionIdentity + err = actual.AssignProperties_From_EncryptionIdentity(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_EncryptionIdentity_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2665,6 +4305,48 @@ func AddIndependentPropertyGeneratorsForEncryptionIdentity(gens map[string]gopte gens["FederatedIdentityClientId"] = gen.PtrOf(gen.AlphaString()) } +func Test_EncryptionIdentity_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionIdentity_STATUS to EncryptionIdentity_STATUS via AssignProperties_To_EncryptionIdentity_STATUS & AssignProperties_From_EncryptionIdentity_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionIdentity_STATUS, EncryptionIdentity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionIdentity_STATUS tests if a specific instance of EncryptionIdentity_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryptionIdentity_STATUS(subject EncryptionIdentity_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.EncryptionIdentity_STATUS + err := copied.AssignProperties_To_EncryptionIdentity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionIdentity_STATUS + err = actual.AssignProperties_From_EncryptionIdentity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_EncryptionIdentity_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2727,6 +4409,48 @@ func AddIndependentPropertyGeneratorsForEncryptionIdentity_STATUS(gens map[strin gens["UserAssignedIdentity"] = gen.PtrOf(gen.AlphaString()) } +func Test_EncryptionServices_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionServices to EncryptionServices via AssignProperties_To_EncryptionServices & AssignProperties_From_EncryptionServices returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionServices, EncryptionServicesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionServices tests if a specific instance of EncryptionServices can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryptionServices(subject EncryptionServices) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.EncryptionServices + err := copied.AssignProperties_To_EncryptionServices(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionServices + err = actual.AssignProperties_From_EncryptionServices(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_EncryptionServices_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2790,6 +4514,48 @@ func AddRelatedPropertyGeneratorsForEncryptionServices(gens map[string]gopter.Ge gens["Table"] = gen.PtrOf(EncryptionServiceGenerator()) } +func Test_EncryptionServices_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionServices_STATUS to EncryptionServices_STATUS via AssignProperties_To_EncryptionServices_STATUS & AssignProperties_From_EncryptionServices_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionServices_STATUS, EncryptionServices_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionServices_STATUS tests if a specific instance of EncryptionServices_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryptionServices_STATUS(subject EncryptionServices_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.EncryptionServices_STATUS + err := copied.AssignProperties_To_EncryptionServices_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionServices_STATUS + err = actual.AssignProperties_From_EncryptionServices_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_EncryptionServices_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2854,6 +4620,48 @@ func AddRelatedPropertyGeneratorsForEncryptionServices_STATUS(gens map[string]go gens["Table"] = gen.PtrOf(EncryptionService_STATUSGenerator()) } +func Test_IPRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from IPRule to IPRule via AssignProperties_To_IPRule & AssignProperties_From_IPRule returns original", + prop.ForAll(RunPropertyAssignmentTestForIPRule, IPRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForIPRule tests if a specific instance of IPRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForIPRule(subject IPRule) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.IPRule + err := copied.AssignProperties_To_IPRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual IPRule + err = actual.AssignProperties_From_IPRule(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_IPRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2915,6 +4723,48 @@ func AddIndependentPropertyGeneratorsForIPRule(gens map[string]gopter.Gen) { gens["Value"] = gen.PtrOf(gen.AlphaString()) } +func Test_IPRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from IPRule_STATUS to IPRule_STATUS via AssignProperties_To_IPRule_STATUS & AssignProperties_From_IPRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForIPRule_STATUS, IPRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForIPRule_STATUS tests if a specific instance of IPRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForIPRule_STATUS(subject IPRule_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.IPRule_STATUS + err := copied.AssignProperties_To_IPRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual IPRule_STATUS + err = actual.AssignProperties_From_IPRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_IPRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -2976,6 +4826,48 @@ func AddIndependentPropertyGeneratorsForIPRule_STATUS(gens map[string]gopter.Gen gens["Value"] = gen.PtrOf(gen.AlphaString()) } +func Test_KeyVaultProperties_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from KeyVaultProperties to KeyVaultProperties via AssignProperties_To_KeyVaultProperties & AssignProperties_From_KeyVaultProperties returns original", + prop.ForAll(RunPropertyAssignmentTestForKeyVaultProperties, KeyVaultPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForKeyVaultProperties tests if a specific instance of KeyVaultProperties can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForKeyVaultProperties(subject KeyVaultProperties) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.KeyVaultProperties + err := copied.AssignProperties_To_KeyVaultProperties(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual KeyVaultProperties + err = actual.AssignProperties_From_KeyVaultProperties(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_KeyVaultProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3038,21 +4930,63 @@ func AddIndependentPropertyGeneratorsForKeyVaultProperties(gens map[string]gopte gens["Keyversion"] = gen.PtrOf(gen.AlphaString()) } -func Test_KeyVaultProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { +func Test_KeyVaultProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 + parameters.MaxSize = 10 properties := gopter.NewProperties(parameters) properties.Property( - "Round trip of KeyVaultProperties_STATUS via JSON returns original", - prop.ForAll(RunJSONSerializationTestForKeyVaultProperties_STATUS, KeyVaultProperties_STATUSGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) + "Round trip from KeyVaultProperties_STATUS to KeyVaultProperties_STATUS via AssignProperties_To_KeyVaultProperties_STATUS & AssignProperties_From_KeyVaultProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForKeyVaultProperties_STATUS, KeyVaultProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) } -// RunJSONSerializationTestForKeyVaultProperties_STATUS runs a test to see if a specific instance of KeyVaultProperties_STATUS round trips to JSON and back losslessly -func RunJSONSerializationTestForKeyVaultProperties_STATUS(subject KeyVaultProperties_STATUS) string { - // Serialize to JSON +// RunPropertyAssignmentTestForKeyVaultProperties_STATUS tests if a specific instance of KeyVaultProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForKeyVaultProperties_STATUS(subject KeyVaultProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.KeyVaultProperties_STATUS + err := copied.AssignProperties_To_KeyVaultProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual KeyVaultProperties_STATUS + err = actual.AssignProperties_From_KeyVaultProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_KeyVaultProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyVaultProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyVaultProperties_STATUS, KeyVaultProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyVaultProperties_STATUS runs a test to see if a specific instance of KeyVaultProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyVaultProperties_STATUS(subject KeyVaultProperties_STATUS) string { + // Serialize to JSON bin, err := json.Marshal(subject) if err != nil { return err.Error() @@ -3104,6 +5038,48 @@ func AddIndependentPropertyGeneratorsForKeyVaultProperties_STATUS(gens map[strin gens["LastKeyRotationTimestamp"] = gen.PtrOf(gen.AlphaString()) } +func Test_ResourceAccessRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ResourceAccessRule to ResourceAccessRule via AssignProperties_To_ResourceAccessRule & AssignProperties_From_ResourceAccessRule returns original", + prop.ForAll(RunPropertyAssignmentTestForResourceAccessRule, ResourceAccessRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForResourceAccessRule tests if a specific instance of ResourceAccessRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForResourceAccessRule(subject ResourceAccessRule) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ResourceAccessRule + err := copied.AssignProperties_To_ResourceAccessRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ResourceAccessRule + err = actual.AssignProperties_From_ResourceAccessRule(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ResourceAccessRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3164,6 +5140,48 @@ func AddIndependentPropertyGeneratorsForResourceAccessRule(gens map[string]gopte gens["TenantId"] = gen.PtrOf(gen.AlphaString()) } +func Test_ResourceAccessRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ResourceAccessRule_STATUS to ResourceAccessRule_STATUS via AssignProperties_To_ResourceAccessRule_STATUS & AssignProperties_From_ResourceAccessRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForResourceAccessRule_STATUS, ResourceAccessRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForResourceAccessRule_STATUS tests if a specific instance of ResourceAccessRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForResourceAccessRule_STATUS(subject ResourceAccessRule_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ResourceAccessRule_STATUS + err := copied.AssignProperties_To_ResourceAccessRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ResourceAccessRule_STATUS + err = actual.AssignProperties_From_ResourceAccessRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ResourceAccessRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3226,6 +5244,48 @@ func AddIndependentPropertyGeneratorsForResourceAccessRule_STATUS(gens map[strin gens["TenantId"] = gen.PtrOf(gen.AlphaString()) } +func Test_StorageAccountInternetEndpoints_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountInternetEndpoints_STATUS to StorageAccountInternetEndpoints_STATUS via AssignProperties_To_StorageAccountInternetEndpoints_STATUS & AssignProperties_From_StorageAccountInternetEndpoints_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountInternetEndpoints_STATUS, StorageAccountInternetEndpoints_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountInternetEndpoints_STATUS tests if a specific instance of StorageAccountInternetEndpoints_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountInternetEndpoints_STATUS(subject StorageAccountInternetEndpoints_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountInternetEndpoints_STATUS + err := copied.AssignProperties_To_StorageAccountInternetEndpoints_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountInternetEndpoints_STATUS + err = actual.AssignProperties_From_StorageAccountInternetEndpoints_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountInternetEndpoints_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3290,6 +5350,48 @@ func AddIndependentPropertyGeneratorsForStorageAccountInternetEndpoints_STATUS(g gens["Web"] = gen.PtrOf(gen.AlphaString()) } +func Test_StorageAccountMicrosoftEndpoints_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountMicrosoftEndpoints_STATUS to StorageAccountMicrosoftEndpoints_STATUS via AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS & AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountMicrosoftEndpoints_STATUS, StorageAccountMicrosoftEndpoints_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountMicrosoftEndpoints_STATUS tests if a specific instance of StorageAccountMicrosoftEndpoints_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountMicrosoftEndpoints_STATUS(subject StorageAccountMicrosoftEndpoints_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountMicrosoftEndpoints_STATUS + err := copied.AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountMicrosoftEndpoints_STATUS + err = actual.AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountMicrosoftEndpoints_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3356,6 +5458,48 @@ func AddIndependentPropertyGeneratorsForStorageAccountMicrosoftEndpoints_STATUS( gens["Web"] = gen.PtrOf(gen.AlphaString()) } +func Test_StorageAccountOperatorConfigMaps_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountOperatorConfigMaps to StorageAccountOperatorConfigMaps via AssignProperties_To_StorageAccountOperatorConfigMaps & AssignProperties_From_StorageAccountOperatorConfigMaps returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountOperatorConfigMaps, StorageAccountOperatorConfigMapsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountOperatorConfigMaps tests if a specific instance of StorageAccountOperatorConfigMaps can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountOperatorConfigMaps(subject StorageAccountOperatorConfigMaps) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountOperatorConfigMaps + err := copied.AssignProperties_To_StorageAccountOperatorConfigMaps(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountOperatorConfigMaps + err = actual.AssignProperties_From_StorageAccountOperatorConfigMaps(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountOperatorConfigMaps_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3411,6 +5555,48 @@ func StorageAccountOperatorConfigMapsGenerator() gopter.Gen { return storageAccountOperatorConfigMapsGenerator } +func Test_StorageAccountOperatorSecrets_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountOperatorSecrets to StorageAccountOperatorSecrets via AssignProperties_To_StorageAccountOperatorSecrets & AssignProperties_From_StorageAccountOperatorSecrets returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountOperatorSecrets, StorageAccountOperatorSecretsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountOperatorSecrets tests if a specific instance of StorageAccountOperatorSecrets can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountOperatorSecrets(subject StorageAccountOperatorSecrets) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountOperatorSecrets + err := copied.AssignProperties_To_StorageAccountOperatorSecrets(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountOperatorSecrets + err = actual.AssignProperties_From_StorageAccountOperatorSecrets(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountOperatorSecrets_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3466,6 +5652,48 @@ func StorageAccountOperatorSecretsGenerator() gopter.Gen { return storageAccountOperatorSecretsGenerator } +func Test_UserAssignedIdentity_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from UserAssignedIdentity_STATUS to UserAssignedIdentity_STATUS via AssignProperties_To_UserAssignedIdentity_STATUS & AssignProperties_From_UserAssignedIdentity_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForUserAssignedIdentity_STATUS, UserAssignedIdentity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForUserAssignedIdentity_STATUS tests if a specific instance of UserAssignedIdentity_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForUserAssignedIdentity_STATUS(subject UserAssignedIdentity_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.UserAssignedIdentity_STATUS + err := copied.AssignProperties_To_UserAssignedIdentity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual UserAssignedIdentity_STATUS + err = actual.AssignProperties_From_UserAssignedIdentity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_UserAssignedIdentity_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3528,6 +5756,48 @@ func AddIndependentPropertyGeneratorsForUserAssignedIdentity_STATUS(gens map[str gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) } +func Test_UserAssignedIdentityDetails_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from UserAssignedIdentityDetails to UserAssignedIdentityDetails via AssignProperties_To_UserAssignedIdentityDetails & AssignProperties_From_UserAssignedIdentityDetails returns original", + prop.ForAll(RunPropertyAssignmentTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForUserAssignedIdentityDetails tests if a specific instance of UserAssignedIdentityDetails can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForUserAssignedIdentityDetails(subject UserAssignedIdentityDetails) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.UserAssignedIdentityDetails + err := copied.AssignProperties_To_UserAssignedIdentityDetails(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual UserAssignedIdentityDetails + err = actual.AssignProperties_From_UserAssignedIdentityDetails(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_UserAssignedIdentityDetails_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3583,6 +5853,48 @@ func UserAssignedIdentityDetailsGenerator() gopter.Gen { return userAssignedIdentityDetailsGenerator } +func Test_VirtualNetworkRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from VirtualNetworkRule to VirtualNetworkRule via AssignProperties_To_VirtualNetworkRule & AssignProperties_From_VirtualNetworkRule returns original", + prop.ForAll(RunPropertyAssignmentTestForVirtualNetworkRule, VirtualNetworkRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForVirtualNetworkRule tests if a specific instance of VirtualNetworkRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForVirtualNetworkRule(subject VirtualNetworkRule) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.VirtualNetworkRule + err := copied.AssignProperties_To_VirtualNetworkRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual VirtualNetworkRule + err = actual.AssignProperties_From_VirtualNetworkRule(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_VirtualNetworkRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3644,6 +5956,48 @@ func AddIndependentPropertyGeneratorsForVirtualNetworkRule(gens map[string]gopte gens["State"] = gen.PtrOf(gen.AlphaString()) } +func Test_VirtualNetworkRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from VirtualNetworkRule_STATUS to VirtualNetworkRule_STATUS via AssignProperties_To_VirtualNetworkRule_STATUS & AssignProperties_From_VirtualNetworkRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForVirtualNetworkRule_STATUS, VirtualNetworkRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForVirtualNetworkRule_STATUS tests if a specific instance of VirtualNetworkRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForVirtualNetworkRule_STATUS(subject VirtualNetworkRule_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.VirtualNetworkRule_STATUS + err := copied.AssignProperties_To_VirtualNetworkRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual VirtualNetworkRule_STATUS + err = actual.AssignProperties_From_VirtualNetworkRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_VirtualNetworkRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3707,6 +6061,48 @@ func AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS(gens map[strin gens["State"] = gen.PtrOf(gen.AlphaString()) } +func Test_BlobRestoreRange_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from BlobRestoreRange_STATUS to BlobRestoreRange_STATUS via AssignProperties_To_BlobRestoreRange_STATUS & AssignProperties_From_BlobRestoreRange_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForBlobRestoreRange_STATUS, BlobRestoreRange_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForBlobRestoreRange_STATUS tests if a specific instance of BlobRestoreRange_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForBlobRestoreRange_STATUS(subject BlobRestoreRange_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.BlobRestoreRange_STATUS + err := copied.AssignProperties_To_BlobRestoreRange_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual BlobRestoreRange_STATUS + err = actual.AssignProperties_From_BlobRestoreRange_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_BlobRestoreRange_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3769,6 +6165,48 @@ func AddIndependentPropertyGeneratorsForBlobRestoreRange_STATUS(gens map[string] gens["StartRange"] = gen.PtrOf(gen.AlphaString()) } +func Test_EncryptionService_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionService to EncryptionService via AssignProperties_To_EncryptionService & AssignProperties_From_EncryptionService returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionService, EncryptionServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionService tests if a specific instance of EncryptionService can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryptionService(subject EncryptionService) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.EncryptionService + err := copied.AssignProperties_To_EncryptionService(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionService + err = actual.AssignProperties_From_EncryptionService(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_EncryptionService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -3830,6 +6268,48 @@ func AddIndependentPropertyGeneratorsForEncryptionService(gens map[string]gopter gens["KeyType"] = gen.PtrOf(gen.AlphaString()) } +func Test_EncryptionService_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionService_STATUS to EncryptionService_STATUS via AssignProperties_To_EncryptionService_STATUS & AssignProperties_From_EncryptionService_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionService_STATUS, EncryptionService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionService_STATUS tests if a specific instance of EncryptionService_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryptionService_STATUS(subject EncryptionService_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.EncryptionService_STATUS + err := copied.AssignProperties_To_EncryptionService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionService_STATUS + err = actual.AssignProperties_From_EncryptionService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_EncryptionService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_blob_service_types_gen.go b/v2/api/storage/v1api20220901/storage/storage_accounts_blob_service_types_gen.go index 604ff9e4415..962aaa9aef5 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_blob_service_types_gen.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_blob_service_types_gen.go @@ -4,19 +4,18 @@ package storage import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" ) -// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsblobservices,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsblobservices/status,storageaccountsblobservices/finalizers},verbs=get;update;patch - // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" @@ -44,6 +43,28 @@ func (service *StorageAccountsBlobService) SetConditions(conditions conditions.C service.Status.Conditions = conditions } +var _ conversion.Convertible = &StorageAccountsBlobService{} + +// ConvertFrom populates our StorageAccountsBlobService from the provided hub StorageAccountsBlobService +func (service *StorageAccountsBlobService) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsBlobService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsBlobService but received %T instead", hub) + } + + return service.AssignProperties_From_StorageAccountsBlobService(source) +} + +// ConvertTo populates the provided hub StorageAccountsBlobService from our StorageAccountsBlobService +func (service *StorageAccountsBlobService) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsBlobService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsBlobService but received %T instead", hub) + } + + return service.AssignProperties_To_StorageAccountsBlobService(destination) +} + var _ genruntime.KubernetesResource = &StorageAccountsBlobService{} // AzureName returns the Azure name of the resource (always "default") @@ -114,8 +135,75 @@ func (service *StorageAccountsBlobService) SetStatus(status genruntime.Convertib return nil } -// Hub marks that this StorageAccountsBlobService is the hub type for conversion -func (service *StorageAccountsBlobService) Hub() {} +// AssignProperties_From_StorageAccountsBlobService populates our StorageAccountsBlobService from the provided source StorageAccountsBlobService +func (service *StorageAccountsBlobService) AssignProperties_From_StorageAccountsBlobService(source *v20230101s.StorageAccountsBlobService) error { + + // ObjectMeta + service.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_BlobService_Spec + err := spec.AssignProperties_From_StorageAccounts_BlobService_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_BlobService_Spec() to populate field Spec") + } + service.Spec = spec + + // Status + var status StorageAccounts_BlobService_STATUS + err = status.AssignProperties_From_StorageAccounts_BlobService_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_BlobService_STATUS() to populate field Status") + } + service.Status = status + + // Invoke the augmentConversionForStorageAccountsBlobService interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccountsBlobService); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsBlobService populates the provided destination StorageAccountsBlobService from our StorageAccountsBlobService +func (service *StorageAccountsBlobService) AssignProperties_To_StorageAccountsBlobService(destination *v20230101s.StorageAccountsBlobService) error { + + // ObjectMeta + destination.ObjectMeta = *service.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_BlobService_Spec + err := service.Spec.AssignProperties_To_StorageAccounts_BlobService_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_BlobService_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_BlobService_STATUS + err = service.Status.AssignProperties_To_StorageAccounts_BlobService_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_BlobService_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForStorageAccountsBlobService interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccountsBlobService); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (service *StorageAccountsBlobService) OriginalGVK() *schema.GroupVersionKind { @@ -137,6 +225,11 @@ type StorageAccountsBlobServiceList struct { Items []StorageAccountsBlobService `json:"items"` } +type augmentConversionForStorageAccountsBlobService interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountsBlobService) error + AssignPropertiesTo(dst *v20230101s.StorageAccountsBlobService) error +} + // Storage version of v1api20220901.StorageAccounts_BlobService_Spec type StorageAccounts_BlobService_Spec struct { AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` @@ -162,20 +255,304 @@ var _ genruntime.ConvertibleSpec = &StorageAccounts_BlobService_Spec{} // ConvertSpecFrom populates our StorageAccounts_BlobService_Spec from the provided source func (service *StorageAccounts_BlobService_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + src, ok := source.(*v20230101s.StorageAccounts_BlobService_Spec) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_BlobService_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_BlobService_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") } - return source.ConvertSpecTo(service) + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_BlobService_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil } // ConvertSpecTo populates the provided destination from our StorageAccounts_BlobService_Spec func (service *StorageAccounts_BlobService_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + dst, ok := destination.(*v20230101s.StorageAccounts_BlobService_Spec) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_BlobService_Spec(dst) } - return destination.ConvertSpecFrom(service) + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_BlobService_Spec{} + err := service.AssignProperties_To_StorageAccounts_BlobService_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_BlobService_Spec populates our StorageAccounts_BlobService_Spec from the provided source StorageAccounts_BlobService_Spec +func (service *StorageAccounts_BlobService_Spec) AssignProperties_From_StorageAccounts_BlobService_Spec(source *v20230101s.StorageAccounts_BlobService_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AutomaticSnapshotPolicyEnabled + if source.AutomaticSnapshotPolicyEnabled != nil { + automaticSnapshotPolicyEnabled := *source.AutomaticSnapshotPolicyEnabled + service.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled + } else { + service.AutomaticSnapshotPolicyEnabled = nil + } + + // ChangeFeed + if source.ChangeFeed != nil { + var changeFeed ChangeFeed + err := changeFeed.AssignProperties_From_ChangeFeed(source.ChangeFeed) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ChangeFeed() to populate field ChangeFeed") + } + service.ChangeFeed = &changeFeed + } else { + service.ChangeFeed = nil + } + + // ContainerDeleteRetentionPolicy + if source.ContainerDeleteRetentionPolicy != nil { + var containerDeleteRetentionPolicy DeleteRetentionPolicy + err := containerDeleteRetentionPolicy.AssignProperties_From_DeleteRetentionPolicy(source.ContainerDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DeleteRetentionPolicy() to populate field ContainerDeleteRetentionPolicy") + } + service.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy + } else { + service.ContainerDeleteRetentionPolicy = nil + } + + // Cors + if source.Cors != nil { + var cor CorsRules + err := cor.AssignProperties_From_CorsRules(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // DefaultServiceVersion + service.DefaultServiceVersion = genruntime.ClonePointerToString(source.DefaultServiceVersion) + + // DeleteRetentionPolicy + if source.DeleteRetentionPolicy != nil { + var deleteRetentionPolicy DeleteRetentionPolicy + err := deleteRetentionPolicy.AssignProperties_From_DeleteRetentionPolicy(source.DeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DeleteRetentionPolicy() to populate field DeleteRetentionPolicy") + } + service.DeleteRetentionPolicy = &deleteRetentionPolicy + } else { + service.DeleteRetentionPolicy = nil + } + + // IsVersioningEnabled + if source.IsVersioningEnabled != nil { + isVersioningEnabled := *source.IsVersioningEnabled + service.IsVersioningEnabled = &isVersioningEnabled + } else { + service.IsVersioningEnabled = nil + } + + // LastAccessTimeTrackingPolicy + if source.LastAccessTimeTrackingPolicy != nil { + var lastAccessTimeTrackingPolicy LastAccessTimeTrackingPolicy + err := lastAccessTimeTrackingPolicy.AssignProperties_From_LastAccessTimeTrackingPolicy(source.LastAccessTimeTrackingPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_LastAccessTimeTrackingPolicy() to populate field LastAccessTimeTrackingPolicy") + } + service.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy + } else { + service.LastAccessTimeTrackingPolicy = nil + } + + // OriginalVersion + service.OriginalVersion = source.OriginalVersion + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + service.Owner = &owner + } else { + service.Owner = nil + } + + // RestorePolicy + if source.RestorePolicy != nil { + var restorePolicy RestorePolicyProperties + err := restorePolicy.AssignProperties_From_RestorePolicyProperties(source.RestorePolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_RestorePolicyProperties() to populate field RestorePolicy") + } + service.RestorePolicy = &restorePolicy + } else { + service.RestorePolicy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + service.PropertyBag = propertyBag + } else { + service.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_BlobService_Spec interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_BlobService_Spec); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_BlobService_Spec populates the provided destination StorageAccounts_BlobService_Spec from our StorageAccounts_BlobService_Spec +func (service *StorageAccounts_BlobService_Spec) AssignProperties_To_StorageAccounts_BlobService_Spec(destination *v20230101s.StorageAccounts_BlobService_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(service.PropertyBag) + + // AutomaticSnapshotPolicyEnabled + if service.AutomaticSnapshotPolicyEnabled != nil { + automaticSnapshotPolicyEnabled := *service.AutomaticSnapshotPolicyEnabled + destination.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled + } else { + destination.AutomaticSnapshotPolicyEnabled = nil + } + + // ChangeFeed + if service.ChangeFeed != nil { + var changeFeed v20230101s.ChangeFeed + err := service.ChangeFeed.AssignProperties_To_ChangeFeed(&changeFeed) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ChangeFeed() to populate field ChangeFeed") + } + destination.ChangeFeed = &changeFeed + } else { + destination.ChangeFeed = nil + } + + // ContainerDeleteRetentionPolicy + if service.ContainerDeleteRetentionPolicy != nil { + var containerDeleteRetentionPolicy v20230101s.DeleteRetentionPolicy + err := service.ContainerDeleteRetentionPolicy.AssignProperties_To_DeleteRetentionPolicy(&containerDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DeleteRetentionPolicy() to populate field ContainerDeleteRetentionPolicy") + } + destination.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy + } else { + destination.ContainerDeleteRetentionPolicy = nil + } + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules + err := service.Cors.AssignProperties_To_CorsRules(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // DefaultServiceVersion + destination.DefaultServiceVersion = genruntime.ClonePointerToString(service.DefaultServiceVersion) + + // DeleteRetentionPolicy + if service.DeleteRetentionPolicy != nil { + var deleteRetentionPolicy v20230101s.DeleteRetentionPolicy + err := service.DeleteRetentionPolicy.AssignProperties_To_DeleteRetentionPolicy(&deleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DeleteRetentionPolicy() to populate field DeleteRetentionPolicy") + } + destination.DeleteRetentionPolicy = &deleteRetentionPolicy + } else { + destination.DeleteRetentionPolicy = nil + } + + // IsVersioningEnabled + if service.IsVersioningEnabled != nil { + isVersioningEnabled := *service.IsVersioningEnabled + destination.IsVersioningEnabled = &isVersioningEnabled + } else { + destination.IsVersioningEnabled = nil + } + + // LastAccessTimeTrackingPolicy + if service.LastAccessTimeTrackingPolicy != nil { + var lastAccessTimeTrackingPolicy v20230101s.LastAccessTimeTrackingPolicy + err := service.LastAccessTimeTrackingPolicy.AssignProperties_To_LastAccessTimeTrackingPolicy(&lastAccessTimeTrackingPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_LastAccessTimeTrackingPolicy() to populate field LastAccessTimeTrackingPolicy") + } + destination.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy + } else { + destination.LastAccessTimeTrackingPolicy = nil + } + + // OriginalVersion + destination.OriginalVersion = service.OriginalVersion + + // Owner + if service.Owner != nil { + owner := service.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // RestorePolicy + if service.RestorePolicy != nil { + var restorePolicy v20230101s.RestorePolicyProperties + err := service.RestorePolicy.AssignProperties_To_RestorePolicyProperties(&restorePolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_RestorePolicyProperties() to populate field RestorePolicy") + } + destination.RestorePolicy = &restorePolicy + } else { + destination.RestorePolicy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_BlobService_Spec interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_BlobService_Spec); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } // Storage version of v1api20220901.StorageAccounts_BlobService_STATUS @@ -201,20 +578,340 @@ var _ genruntime.ConvertibleStatus = &StorageAccounts_BlobService_STATUS{} // ConvertStatusFrom populates our StorageAccounts_BlobService_STATUS from the provided source func (service *StorageAccounts_BlobService_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + src, ok := source.(*v20230101s.StorageAccounts_BlobService_STATUS) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_BlobService_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_BlobService_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") } - return source.ConvertStatusTo(service) + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_BlobService_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil } // ConvertStatusTo populates the provided destination from our StorageAccounts_BlobService_STATUS func (service *StorageAccounts_BlobService_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + dst, ok := destination.(*v20230101s.StorageAccounts_BlobService_STATUS) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_BlobService_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_BlobService_STATUS{} + err := service.AssignProperties_To_StorageAccounts_BlobService_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_BlobService_STATUS populates our StorageAccounts_BlobService_STATUS from the provided source StorageAccounts_BlobService_STATUS +func (service *StorageAccounts_BlobService_STATUS) AssignProperties_From_StorageAccounts_BlobService_STATUS(source *v20230101s.StorageAccounts_BlobService_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AutomaticSnapshotPolicyEnabled + if source.AutomaticSnapshotPolicyEnabled != nil { + automaticSnapshotPolicyEnabled := *source.AutomaticSnapshotPolicyEnabled + service.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled + } else { + service.AutomaticSnapshotPolicyEnabled = nil + } + + // ChangeFeed + if source.ChangeFeed != nil { + var changeFeed ChangeFeed_STATUS + err := changeFeed.AssignProperties_From_ChangeFeed_STATUS(source.ChangeFeed) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ChangeFeed_STATUS() to populate field ChangeFeed") + } + service.ChangeFeed = &changeFeed + } else { + service.ChangeFeed = nil + } + + // Conditions + service.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // ContainerDeleteRetentionPolicy + if source.ContainerDeleteRetentionPolicy != nil { + var containerDeleteRetentionPolicy DeleteRetentionPolicy_STATUS + err := containerDeleteRetentionPolicy.AssignProperties_From_DeleteRetentionPolicy_STATUS(source.ContainerDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DeleteRetentionPolicy_STATUS() to populate field ContainerDeleteRetentionPolicy") + } + service.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy + } else { + service.ContainerDeleteRetentionPolicy = nil + } + + // Cors + if source.Cors != nil { + var cor CorsRules_STATUS + err := cor.AssignProperties_From_CorsRules_STATUS(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules_STATUS() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // DefaultServiceVersion + service.DefaultServiceVersion = genruntime.ClonePointerToString(source.DefaultServiceVersion) + + // DeleteRetentionPolicy + if source.DeleteRetentionPolicy != nil { + var deleteRetentionPolicy DeleteRetentionPolicy_STATUS + err := deleteRetentionPolicy.AssignProperties_From_DeleteRetentionPolicy_STATUS(source.DeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DeleteRetentionPolicy_STATUS() to populate field DeleteRetentionPolicy") + } + service.DeleteRetentionPolicy = &deleteRetentionPolicy + } else { + service.DeleteRetentionPolicy = nil + } + + // Id + service.Id = genruntime.ClonePointerToString(source.Id) + + // IsVersioningEnabled + if source.IsVersioningEnabled != nil { + isVersioningEnabled := *source.IsVersioningEnabled + service.IsVersioningEnabled = &isVersioningEnabled + } else { + service.IsVersioningEnabled = nil + } + + // LastAccessTimeTrackingPolicy + if source.LastAccessTimeTrackingPolicy != nil { + var lastAccessTimeTrackingPolicy LastAccessTimeTrackingPolicy_STATUS + err := lastAccessTimeTrackingPolicy.AssignProperties_From_LastAccessTimeTrackingPolicy_STATUS(source.LastAccessTimeTrackingPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_LastAccessTimeTrackingPolicy_STATUS() to populate field LastAccessTimeTrackingPolicy") + } + service.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy + } else { + service.LastAccessTimeTrackingPolicy = nil } - return destination.ConvertStatusFrom(service) + // Name + service.Name = genruntime.ClonePointerToString(source.Name) + + // RestorePolicy + if source.RestorePolicy != nil { + var restorePolicy RestorePolicyProperties_STATUS + err := restorePolicy.AssignProperties_From_RestorePolicyProperties_STATUS(source.RestorePolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_RestorePolicyProperties_STATUS() to populate field RestorePolicy") + } + service.RestorePolicy = &restorePolicy + } else { + service.RestorePolicy = nil + } + + // Sku + if source.Sku != nil { + var sku Sku_STATUS + err := sku.AssignProperties_From_Sku_STATUS(source.Sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Sku_STATUS() to populate field Sku") + } + service.Sku = &sku + } else { + service.Sku = nil + } + + // Type + service.Type = genruntime.ClonePointerToString(source.Type) + + // Update the property bag + if len(propertyBag) > 0 { + service.PropertyBag = propertyBag + } else { + service.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_BlobService_STATUS interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_BlobService_STATUS); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_BlobService_STATUS populates the provided destination StorageAccounts_BlobService_STATUS from our StorageAccounts_BlobService_STATUS +func (service *StorageAccounts_BlobService_STATUS) AssignProperties_To_StorageAccounts_BlobService_STATUS(destination *v20230101s.StorageAccounts_BlobService_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(service.PropertyBag) + + // AutomaticSnapshotPolicyEnabled + if service.AutomaticSnapshotPolicyEnabled != nil { + automaticSnapshotPolicyEnabled := *service.AutomaticSnapshotPolicyEnabled + destination.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled + } else { + destination.AutomaticSnapshotPolicyEnabled = nil + } + + // ChangeFeed + if service.ChangeFeed != nil { + var changeFeed v20230101s.ChangeFeed_STATUS + err := service.ChangeFeed.AssignProperties_To_ChangeFeed_STATUS(&changeFeed) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ChangeFeed_STATUS() to populate field ChangeFeed") + } + destination.ChangeFeed = &changeFeed + } else { + destination.ChangeFeed = nil + } + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(service.Conditions) + + // ContainerDeleteRetentionPolicy + if service.ContainerDeleteRetentionPolicy != nil { + var containerDeleteRetentionPolicy v20230101s.DeleteRetentionPolicy_STATUS + err := service.ContainerDeleteRetentionPolicy.AssignProperties_To_DeleteRetentionPolicy_STATUS(&containerDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DeleteRetentionPolicy_STATUS() to populate field ContainerDeleteRetentionPolicy") + } + destination.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy + } else { + destination.ContainerDeleteRetentionPolicy = nil + } + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules_STATUS + err := service.Cors.AssignProperties_To_CorsRules_STATUS(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules_STATUS() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // DefaultServiceVersion + destination.DefaultServiceVersion = genruntime.ClonePointerToString(service.DefaultServiceVersion) + + // DeleteRetentionPolicy + if service.DeleteRetentionPolicy != nil { + var deleteRetentionPolicy v20230101s.DeleteRetentionPolicy_STATUS + err := service.DeleteRetentionPolicy.AssignProperties_To_DeleteRetentionPolicy_STATUS(&deleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DeleteRetentionPolicy_STATUS() to populate field DeleteRetentionPolicy") + } + destination.DeleteRetentionPolicy = &deleteRetentionPolicy + } else { + destination.DeleteRetentionPolicy = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(service.Id) + + // IsVersioningEnabled + if service.IsVersioningEnabled != nil { + isVersioningEnabled := *service.IsVersioningEnabled + destination.IsVersioningEnabled = &isVersioningEnabled + } else { + destination.IsVersioningEnabled = nil + } + + // LastAccessTimeTrackingPolicy + if service.LastAccessTimeTrackingPolicy != nil { + var lastAccessTimeTrackingPolicy v20230101s.LastAccessTimeTrackingPolicy_STATUS + err := service.LastAccessTimeTrackingPolicy.AssignProperties_To_LastAccessTimeTrackingPolicy_STATUS(&lastAccessTimeTrackingPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_LastAccessTimeTrackingPolicy_STATUS() to populate field LastAccessTimeTrackingPolicy") + } + destination.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy + } else { + destination.LastAccessTimeTrackingPolicy = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(service.Name) + + // RestorePolicy + if service.RestorePolicy != nil { + var restorePolicy v20230101s.RestorePolicyProperties_STATUS + err := service.RestorePolicy.AssignProperties_To_RestorePolicyProperties_STATUS(&restorePolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_RestorePolicyProperties_STATUS() to populate field RestorePolicy") + } + destination.RestorePolicy = &restorePolicy + } else { + destination.RestorePolicy = nil + } + + // Sku + if service.Sku != nil { + var sku v20230101s.Sku_STATUS + err := service.Sku.AssignProperties_To_Sku_STATUS(&sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Sku_STATUS() to populate field Sku") + } + destination.Sku = &sku + } else { + destination.Sku = nil + } + + // Type + destination.Type = genruntime.ClonePointerToString(service.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_BlobService_STATUS interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_BlobService_STATUS); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForStorageAccounts_BlobService_Spec interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_BlobService_Spec) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_BlobService_Spec) error +} + +type augmentConversionForStorageAccounts_BlobService_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_BlobService_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_BlobService_STATUS) error } // Storage version of v1api20220901.ChangeFeed @@ -225,6 +922,78 @@ type ChangeFeed struct { RetentionInDays *int `json:"retentionInDays,omitempty"` } +// AssignProperties_From_ChangeFeed populates our ChangeFeed from the provided source ChangeFeed +func (feed *ChangeFeed) AssignProperties_From_ChangeFeed(source *v20230101s.ChangeFeed) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + feed.Enabled = &enabled + } else { + feed.Enabled = nil + } + + // RetentionInDays + feed.RetentionInDays = genruntime.ClonePointerToInt(source.RetentionInDays) + + // Update the property bag + if len(propertyBag) > 0 { + feed.PropertyBag = propertyBag + } else { + feed.PropertyBag = nil + } + + // Invoke the augmentConversionForChangeFeed interface (if implemented) to customize the conversion + var feedAsAny any = feed + if augmentedFeed, ok := feedAsAny.(augmentConversionForChangeFeed); ok { + err := augmentedFeed.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ChangeFeed populates the provided destination ChangeFeed from our ChangeFeed +func (feed *ChangeFeed) AssignProperties_To_ChangeFeed(destination *v20230101s.ChangeFeed) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(feed.PropertyBag) + + // Enabled + if feed.Enabled != nil { + enabled := *feed.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // RetentionInDays + destination.RetentionInDays = genruntime.ClonePointerToInt(feed.RetentionInDays) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForChangeFeed interface (if implemented) to customize the conversion + var feedAsAny any = feed + if augmentedFeed, ok := feedAsAny.(augmentConversionForChangeFeed); ok { + err := augmentedFeed.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ChangeFeed_STATUS // The blob service properties for change feed events. type ChangeFeed_STATUS struct { @@ -233,6 +1002,78 @@ type ChangeFeed_STATUS struct { RetentionInDays *int `json:"retentionInDays,omitempty"` } +// AssignProperties_From_ChangeFeed_STATUS populates our ChangeFeed_STATUS from the provided source ChangeFeed_STATUS +func (feed *ChangeFeed_STATUS) AssignProperties_From_ChangeFeed_STATUS(source *v20230101s.ChangeFeed_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + feed.Enabled = &enabled + } else { + feed.Enabled = nil + } + + // RetentionInDays + feed.RetentionInDays = genruntime.ClonePointerToInt(source.RetentionInDays) + + // Update the property bag + if len(propertyBag) > 0 { + feed.PropertyBag = propertyBag + } else { + feed.PropertyBag = nil + } + + // Invoke the augmentConversionForChangeFeed_STATUS interface (if implemented) to customize the conversion + var feedAsAny any = feed + if augmentedFeed, ok := feedAsAny.(augmentConversionForChangeFeed_STATUS); ok { + err := augmentedFeed.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ChangeFeed_STATUS populates the provided destination ChangeFeed_STATUS from our ChangeFeed_STATUS +func (feed *ChangeFeed_STATUS) AssignProperties_To_ChangeFeed_STATUS(destination *v20230101s.ChangeFeed_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(feed.PropertyBag) + + // Enabled + if feed.Enabled != nil { + enabled := *feed.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // RetentionInDays + destination.RetentionInDays = genruntime.ClonePointerToInt(feed.RetentionInDays) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForChangeFeed_STATUS interface (if implemented) to customize the conversion + var feedAsAny any = feed + if augmentedFeed, ok := feedAsAny.(augmentConversionForChangeFeed_STATUS); ok { + err := augmentedFeed.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.CorsRules // Sets the CORS rules. You can include up to five CorsRule elements in the request. type CorsRules struct { @@ -240,6 +1081,92 @@ type CorsRules struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_CorsRules populates our CorsRules from the provided source CorsRules +func (rules *CorsRules) AssignProperties_From_CorsRules(source *v20230101s.CorsRules) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // CorsRules + if source.CorsRules != nil { + corsRuleList := make([]CorsRule, len(source.CorsRules)) + for corsRuleIndex, corsRuleItem := range source.CorsRules { + // Shadow the loop variable to avoid aliasing + corsRuleItem := corsRuleItem + var corsRule CorsRule + err := corsRule.AssignProperties_From_CorsRule(&corsRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRule() to populate field CorsRules") + } + corsRuleList[corsRuleIndex] = corsRule + } + rules.CorsRules = corsRuleList + } else { + rules.CorsRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + rules.PropertyBag = propertyBag + } else { + rules.PropertyBag = nil + } + + // Invoke the augmentConversionForCorsRules interface (if implemented) to customize the conversion + var rulesAsAny any = rules + if augmentedRules, ok := rulesAsAny.(augmentConversionForCorsRules); ok { + err := augmentedRules.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_CorsRules populates the provided destination CorsRules from our CorsRules +func (rules *CorsRules) AssignProperties_To_CorsRules(destination *v20230101s.CorsRules) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rules.PropertyBag) + + // CorsRules + if rules.CorsRules != nil { + corsRuleList := make([]v20230101s.CorsRule, len(rules.CorsRules)) + for corsRuleIndex, corsRuleItem := range rules.CorsRules { + // Shadow the loop variable to avoid aliasing + corsRuleItem := corsRuleItem + var corsRule v20230101s.CorsRule + err := corsRuleItem.AssignProperties_To_CorsRule(&corsRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRule() to populate field CorsRules") + } + corsRuleList[corsRuleIndex] = corsRule + } + destination.CorsRules = corsRuleList + } else { + destination.CorsRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCorsRules interface (if implemented) to customize the conversion + var rulesAsAny any = rules + if augmentedRules, ok := rulesAsAny.(augmentConversionForCorsRules); ok { + err := augmentedRules.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.CorsRules_STATUS // Sets the CORS rules. You can include up to five CorsRule elements in the request. type CorsRules_STATUS struct { @@ -247,6 +1174,92 @@ type CorsRules_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_CorsRules_STATUS populates our CorsRules_STATUS from the provided source CorsRules_STATUS +func (rules *CorsRules_STATUS) AssignProperties_From_CorsRules_STATUS(source *v20230101s.CorsRules_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // CorsRules + if source.CorsRules != nil { + corsRuleList := make([]CorsRule_STATUS, len(source.CorsRules)) + for corsRuleIndex, corsRuleItem := range source.CorsRules { + // Shadow the loop variable to avoid aliasing + corsRuleItem := corsRuleItem + var corsRule CorsRule_STATUS + err := corsRule.AssignProperties_From_CorsRule_STATUS(&corsRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRule_STATUS() to populate field CorsRules") + } + corsRuleList[corsRuleIndex] = corsRule + } + rules.CorsRules = corsRuleList + } else { + rules.CorsRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + rules.PropertyBag = propertyBag + } else { + rules.PropertyBag = nil + } + + // Invoke the augmentConversionForCorsRules_STATUS interface (if implemented) to customize the conversion + var rulesAsAny any = rules + if augmentedRules, ok := rulesAsAny.(augmentConversionForCorsRules_STATUS); ok { + err := augmentedRules.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_CorsRules_STATUS populates the provided destination CorsRules_STATUS from our CorsRules_STATUS +func (rules *CorsRules_STATUS) AssignProperties_To_CorsRules_STATUS(destination *v20230101s.CorsRules_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rules.PropertyBag) + + // CorsRules + if rules.CorsRules != nil { + corsRuleList := make([]v20230101s.CorsRule_STATUS, len(rules.CorsRules)) + for corsRuleIndex, corsRuleItem := range rules.CorsRules { + // Shadow the loop variable to avoid aliasing + corsRuleItem := corsRuleItem + var corsRule v20230101s.CorsRule_STATUS + err := corsRuleItem.AssignProperties_To_CorsRule_STATUS(&corsRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRule_STATUS() to populate field CorsRules") + } + corsRuleList[corsRuleIndex] = corsRule + } + destination.CorsRules = corsRuleList + } else { + destination.CorsRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCorsRules_STATUS interface (if implemented) to customize the conversion + var rulesAsAny any = rules + if augmentedRules, ok := rulesAsAny.(augmentConversionForCorsRules_STATUS); ok { + err := augmentedRules.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.DeleteRetentionPolicy // The service properties for soft delete. type DeleteRetentionPolicy struct { @@ -256,6 +1269,94 @@ type DeleteRetentionPolicy struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_DeleteRetentionPolicy populates our DeleteRetentionPolicy from the provided source DeleteRetentionPolicy +func (policy *DeleteRetentionPolicy) AssignProperties_From_DeleteRetentionPolicy(source *v20230101s.DeleteRetentionPolicy) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllowPermanentDelete + if source.AllowPermanentDelete != nil { + allowPermanentDelete := *source.AllowPermanentDelete + policy.AllowPermanentDelete = &allowPermanentDelete + } else { + policy.AllowPermanentDelete = nil + } + + // Days + policy.Days = genruntime.ClonePointerToInt(source.Days) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + policy.Enabled = &enabled + } else { + policy.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForDeleteRetentionPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForDeleteRetentionPolicy); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_DeleteRetentionPolicy populates the provided destination DeleteRetentionPolicy from our DeleteRetentionPolicy +func (policy *DeleteRetentionPolicy) AssignProperties_To_DeleteRetentionPolicy(destination *v20230101s.DeleteRetentionPolicy) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // AllowPermanentDelete + if policy.AllowPermanentDelete != nil { + allowPermanentDelete := *policy.AllowPermanentDelete + destination.AllowPermanentDelete = &allowPermanentDelete + } else { + destination.AllowPermanentDelete = nil + } + + // Days + destination.Days = genruntime.ClonePointerToInt(policy.Days) + + // Enabled + if policy.Enabled != nil { + enabled := *policy.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForDeleteRetentionPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForDeleteRetentionPolicy); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.DeleteRetentionPolicy_STATUS // The service properties for soft delete. type DeleteRetentionPolicy_STATUS struct { @@ -265,6 +1366,94 @@ type DeleteRetentionPolicy_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_DeleteRetentionPolicy_STATUS populates our DeleteRetentionPolicy_STATUS from the provided source DeleteRetentionPolicy_STATUS +func (policy *DeleteRetentionPolicy_STATUS) AssignProperties_From_DeleteRetentionPolicy_STATUS(source *v20230101s.DeleteRetentionPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllowPermanentDelete + if source.AllowPermanentDelete != nil { + allowPermanentDelete := *source.AllowPermanentDelete + policy.AllowPermanentDelete = &allowPermanentDelete + } else { + policy.AllowPermanentDelete = nil + } + + // Days + policy.Days = genruntime.ClonePointerToInt(source.Days) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + policy.Enabled = &enabled + } else { + policy.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForDeleteRetentionPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForDeleteRetentionPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_DeleteRetentionPolicy_STATUS populates the provided destination DeleteRetentionPolicy_STATUS from our DeleteRetentionPolicy_STATUS +func (policy *DeleteRetentionPolicy_STATUS) AssignProperties_To_DeleteRetentionPolicy_STATUS(destination *v20230101s.DeleteRetentionPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // AllowPermanentDelete + if policy.AllowPermanentDelete != nil { + allowPermanentDelete := *policy.AllowPermanentDelete + destination.AllowPermanentDelete = &allowPermanentDelete + } else { + destination.AllowPermanentDelete = nil + } + + // Days + destination.Days = genruntime.ClonePointerToInt(policy.Days) + + // Enabled + if policy.Enabled != nil { + enabled := *policy.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForDeleteRetentionPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForDeleteRetentionPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.LastAccessTimeTrackingPolicy // The blob service properties for Last access time based tracking policy. type LastAccessTimeTrackingPolicy struct { @@ -275,6 +1464,90 @@ type LastAccessTimeTrackingPolicy struct { TrackingGranularityInDays *int `json:"trackingGranularityInDays,omitempty"` } +// AssignProperties_From_LastAccessTimeTrackingPolicy populates our LastAccessTimeTrackingPolicy from the provided source LastAccessTimeTrackingPolicy +func (policy *LastAccessTimeTrackingPolicy) AssignProperties_From_LastAccessTimeTrackingPolicy(source *v20230101s.LastAccessTimeTrackingPolicy) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // BlobType + policy.BlobType = genruntime.CloneSliceOfString(source.BlobType) + + // Enable + if source.Enable != nil { + enable := *source.Enable + policy.Enable = &enable + } else { + policy.Enable = nil + } + + // Name + policy.Name = genruntime.ClonePointerToString(source.Name) + + // TrackingGranularityInDays + policy.TrackingGranularityInDays = genruntime.ClonePointerToInt(source.TrackingGranularityInDays) + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForLastAccessTimeTrackingPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForLastAccessTimeTrackingPolicy); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_LastAccessTimeTrackingPolicy populates the provided destination LastAccessTimeTrackingPolicy from our LastAccessTimeTrackingPolicy +func (policy *LastAccessTimeTrackingPolicy) AssignProperties_To_LastAccessTimeTrackingPolicy(destination *v20230101s.LastAccessTimeTrackingPolicy) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // BlobType + destination.BlobType = genruntime.CloneSliceOfString(policy.BlobType) + + // Enable + if policy.Enable != nil { + enable := *policy.Enable + destination.Enable = &enable + } else { + destination.Enable = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(policy.Name) + + // TrackingGranularityInDays + destination.TrackingGranularityInDays = genruntime.ClonePointerToInt(policy.TrackingGranularityInDays) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForLastAccessTimeTrackingPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForLastAccessTimeTrackingPolicy); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.LastAccessTimeTrackingPolicy_STATUS // The blob service properties for Last access time based tracking policy. type LastAccessTimeTrackingPolicy_STATUS struct { @@ -285,6 +1558,90 @@ type LastAccessTimeTrackingPolicy_STATUS struct { TrackingGranularityInDays *int `json:"trackingGranularityInDays,omitempty"` } +// AssignProperties_From_LastAccessTimeTrackingPolicy_STATUS populates our LastAccessTimeTrackingPolicy_STATUS from the provided source LastAccessTimeTrackingPolicy_STATUS +func (policy *LastAccessTimeTrackingPolicy_STATUS) AssignProperties_From_LastAccessTimeTrackingPolicy_STATUS(source *v20230101s.LastAccessTimeTrackingPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // BlobType + policy.BlobType = genruntime.CloneSliceOfString(source.BlobType) + + // Enable + if source.Enable != nil { + enable := *source.Enable + policy.Enable = &enable + } else { + policy.Enable = nil + } + + // Name + policy.Name = genruntime.ClonePointerToString(source.Name) + + // TrackingGranularityInDays + policy.TrackingGranularityInDays = genruntime.ClonePointerToInt(source.TrackingGranularityInDays) + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForLastAccessTimeTrackingPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForLastAccessTimeTrackingPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_LastAccessTimeTrackingPolicy_STATUS populates the provided destination LastAccessTimeTrackingPolicy_STATUS from our LastAccessTimeTrackingPolicy_STATUS +func (policy *LastAccessTimeTrackingPolicy_STATUS) AssignProperties_To_LastAccessTimeTrackingPolicy_STATUS(destination *v20230101s.LastAccessTimeTrackingPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // BlobType + destination.BlobType = genruntime.CloneSliceOfString(policy.BlobType) + + // Enable + if policy.Enable != nil { + enable := *policy.Enable + destination.Enable = &enable + } else { + destination.Enable = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(policy.Name) + + // TrackingGranularityInDays + destination.TrackingGranularityInDays = genruntime.ClonePointerToInt(policy.TrackingGranularityInDays) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForLastAccessTimeTrackingPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForLastAccessTimeTrackingPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.RestorePolicyProperties // The blob service properties for blob restore policy type RestorePolicyProperties struct { @@ -293,6 +1650,78 @@ type RestorePolicyProperties struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_RestorePolicyProperties populates our RestorePolicyProperties from the provided source RestorePolicyProperties +func (properties *RestorePolicyProperties) AssignProperties_From_RestorePolicyProperties(source *v20230101s.RestorePolicyProperties) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Days + properties.Days = genruntime.ClonePointerToInt(source.Days) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + properties.Enabled = &enabled + } else { + properties.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + properties.PropertyBag = propertyBag + } else { + properties.PropertyBag = nil + } + + // Invoke the augmentConversionForRestorePolicyProperties interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForRestorePolicyProperties); ok { + err := augmentedProperties.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_RestorePolicyProperties populates the provided destination RestorePolicyProperties from our RestorePolicyProperties +func (properties *RestorePolicyProperties) AssignProperties_To_RestorePolicyProperties(destination *v20230101s.RestorePolicyProperties) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(properties.PropertyBag) + + // Days + destination.Days = genruntime.ClonePointerToInt(properties.Days) + + // Enabled + if properties.Enabled != nil { + enabled := *properties.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForRestorePolicyProperties interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForRestorePolicyProperties); ok { + err := augmentedProperties.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.RestorePolicyProperties_STATUS // The blob service properties for blob restore policy type RestorePolicyProperties_STATUS struct { @@ -303,6 +1732,140 @@ type RestorePolicyProperties_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_RestorePolicyProperties_STATUS populates our RestorePolicyProperties_STATUS from the provided source RestorePolicyProperties_STATUS +func (properties *RestorePolicyProperties_STATUS) AssignProperties_From_RestorePolicyProperties_STATUS(source *v20230101s.RestorePolicyProperties_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Days + properties.Days = genruntime.ClonePointerToInt(source.Days) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + properties.Enabled = &enabled + } else { + properties.Enabled = nil + } + + // LastEnabledTime + properties.LastEnabledTime = genruntime.ClonePointerToString(source.LastEnabledTime) + + // MinRestoreTime + properties.MinRestoreTime = genruntime.ClonePointerToString(source.MinRestoreTime) + + // Update the property bag + if len(propertyBag) > 0 { + properties.PropertyBag = propertyBag + } else { + properties.PropertyBag = nil + } + + // Invoke the augmentConversionForRestorePolicyProperties_STATUS interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForRestorePolicyProperties_STATUS); ok { + err := augmentedProperties.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_RestorePolicyProperties_STATUS populates the provided destination RestorePolicyProperties_STATUS from our RestorePolicyProperties_STATUS +func (properties *RestorePolicyProperties_STATUS) AssignProperties_To_RestorePolicyProperties_STATUS(destination *v20230101s.RestorePolicyProperties_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(properties.PropertyBag) + + // Days + destination.Days = genruntime.ClonePointerToInt(properties.Days) + + // Enabled + if properties.Enabled != nil { + enabled := *properties.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // LastEnabledTime + destination.LastEnabledTime = genruntime.ClonePointerToString(properties.LastEnabledTime) + + // MinRestoreTime + destination.MinRestoreTime = genruntime.ClonePointerToString(properties.MinRestoreTime) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForRestorePolicyProperties_STATUS interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForRestorePolicyProperties_STATUS); ok { + err := augmentedProperties.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForChangeFeed interface { + AssignPropertiesFrom(src *v20230101s.ChangeFeed) error + AssignPropertiesTo(dst *v20230101s.ChangeFeed) error +} + +type augmentConversionForChangeFeed_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ChangeFeed_STATUS) error + AssignPropertiesTo(dst *v20230101s.ChangeFeed_STATUS) error +} + +type augmentConversionForCorsRules interface { + AssignPropertiesFrom(src *v20230101s.CorsRules) error + AssignPropertiesTo(dst *v20230101s.CorsRules) error +} + +type augmentConversionForCorsRules_STATUS interface { + AssignPropertiesFrom(src *v20230101s.CorsRules_STATUS) error + AssignPropertiesTo(dst *v20230101s.CorsRules_STATUS) error +} + +type augmentConversionForDeleteRetentionPolicy interface { + AssignPropertiesFrom(src *v20230101s.DeleteRetentionPolicy) error + AssignPropertiesTo(dst *v20230101s.DeleteRetentionPolicy) error +} + +type augmentConversionForDeleteRetentionPolicy_STATUS interface { + AssignPropertiesFrom(src *v20230101s.DeleteRetentionPolicy_STATUS) error + AssignPropertiesTo(dst *v20230101s.DeleteRetentionPolicy_STATUS) error +} + +type augmentConversionForLastAccessTimeTrackingPolicy interface { + AssignPropertiesFrom(src *v20230101s.LastAccessTimeTrackingPolicy) error + AssignPropertiesTo(dst *v20230101s.LastAccessTimeTrackingPolicy) error +} + +type augmentConversionForLastAccessTimeTrackingPolicy_STATUS interface { + AssignPropertiesFrom(src *v20230101s.LastAccessTimeTrackingPolicy_STATUS) error + AssignPropertiesTo(dst *v20230101s.LastAccessTimeTrackingPolicy_STATUS) error +} + +type augmentConversionForRestorePolicyProperties interface { + AssignPropertiesFrom(src *v20230101s.RestorePolicyProperties) error + AssignPropertiesTo(dst *v20230101s.RestorePolicyProperties) error +} + +type augmentConversionForRestorePolicyProperties_STATUS interface { + AssignPropertiesFrom(src *v20230101s.RestorePolicyProperties_STATUS) error + AssignPropertiesTo(dst *v20230101s.RestorePolicyProperties_STATUS) error +} + // Storage version of v1api20220901.CorsRule // Specifies a CORS rule for the Blob service. type CorsRule struct { @@ -314,6 +1877,86 @@ type CorsRule struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_CorsRule populates our CorsRule from the provided source CorsRule +func (rule *CorsRule) AssignProperties_From_CorsRule(source *v20230101s.CorsRule) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllowedHeaders + rule.AllowedHeaders = genruntime.CloneSliceOfString(source.AllowedHeaders) + + // AllowedMethods + rule.AllowedMethods = genruntime.CloneSliceOfString(source.AllowedMethods) + + // AllowedOrigins + rule.AllowedOrigins = genruntime.CloneSliceOfString(source.AllowedOrigins) + + // ExposedHeaders + rule.ExposedHeaders = genruntime.CloneSliceOfString(source.ExposedHeaders) + + // MaxAgeInSeconds + rule.MaxAgeInSeconds = genruntime.ClonePointerToInt(source.MaxAgeInSeconds) + + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } + + // Invoke the augmentConversionForCorsRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForCorsRule); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_CorsRule populates the provided destination CorsRule from our CorsRule +func (rule *CorsRule) AssignProperties_To_CorsRule(destination *v20230101s.CorsRule) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) + + // AllowedHeaders + destination.AllowedHeaders = genruntime.CloneSliceOfString(rule.AllowedHeaders) + + // AllowedMethods + destination.AllowedMethods = genruntime.CloneSliceOfString(rule.AllowedMethods) + + // AllowedOrigins + destination.AllowedOrigins = genruntime.CloneSliceOfString(rule.AllowedOrigins) + + // ExposedHeaders + destination.ExposedHeaders = genruntime.CloneSliceOfString(rule.ExposedHeaders) + + // MaxAgeInSeconds + destination.MaxAgeInSeconds = genruntime.ClonePointerToInt(rule.MaxAgeInSeconds) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCorsRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForCorsRule); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.CorsRule_STATUS // Specifies a CORS rule for the Blob service. type CorsRule_STATUS struct { @@ -325,6 +1968,96 @@ type CorsRule_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_CorsRule_STATUS populates our CorsRule_STATUS from the provided source CorsRule_STATUS +func (rule *CorsRule_STATUS) AssignProperties_From_CorsRule_STATUS(source *v20230101s.CorsRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllowedHeaders + rule.AllowedHeaders = genruntime.CloneSliceOfString(source.AllowedHeaders) + + // AllowedMethods + rule.AllowedMethods = genruntime.CloneSliceOfString(source.AllowedMethods) + + // AllowedOrigins + rule.AllowedOrigins = genruntime.CloneSliceOfString(source.AllowedOrigins) + + // ExposedHeaders + rule.ExposedHeaders = genruntime.CloneSliceOfString(source.ExposedHeaders) + + // MaxAgeInSeconds + rule.MaxAgeInSeconds = genruntime.ClonePointerToInt(source.MaxAgeInSeconds) + + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } + + // Invoke the augmentConversionForCorsRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForCorsRule_STATUS); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_CorsRule_STATUS populates the provided destination CorsRule_STATUS from our CorsRule_STATUS +func (rule *CorsRule_STATUS) AssignProperties_To_CorsRule_STATUS(destination *v20230101s.CorsRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) + + // AllowedHeaders + destination.AllowedHeaders = genruntime.CloneSliceOfString(rule.AllowedHeaders) + + // AllowedMethods + destination.AllowedMethods = genruntime.CloneSliceOfString(rule.AllowedMethods) + + // AllowedOrigins + destination.AllowedOrigins = genruntime.CloneSliceOfString(rule.AllowedOrigins) + + // ExposedHeaders + destination.ExposedHeaders = genruntime.CloneSliceOfString(rule.ExposedHeaders) + + // MaxAgeInSeconds + destination.MaxAgeInSeconds = genruntime.ClonePointerToInt(rule.MaxAgeInSeconds) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCorsRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForCorsRule_STATUS); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForCorsRule interface { + AssignPropertiesFrom(src *v20230101s.CorsRule) error + AssignPropertiesTo(dst *v20230101s.CorsRule) error +} + +type augmentConversionForCorsRule_STATUS interface { + AssignPropertiesFrom(src *v20230101s.CorsRule_STATUS) error + AssignPropertiesTo(dst *v20230101s.CorsRule_STATUS) error +} + func init() { SchemeBuilder.Register(&StorageAccountsBlobService{}, &StorageAccountsBlobServiceList{}) } diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_blob_service_types_gen_test.go b/v2/api/storage/v1api20220901/storage/storage_accounts_blob_service_types_gen_test.go index 88c166a46ab..5baa71f59c5 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_blob_service_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_blob_service_types_gen_test.go @@ -5,6 +5,7 @@ package storage import ( "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -17,6 +18,91 @@ import ( "testing" ) +func Test_StorageAccountsBlobService_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsBlobService to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsBlobService, StorageAccountsBlobServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsBlobService tests if a specific instance of StorageAccountsBlobService round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsBlobService(subject StorageAccountsBlobService) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsBlobService + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsBlobService + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsBlobService_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsBlobService to StorageAccountsBlobService via AssignProperties_To_StorageAccountsBlobService & AssignProperties_From_StorageAccountsBlobService returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsBlobService, StorageAccountsBlobServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsBlobService tests if a specific instance of StorageAccountsBlobService can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsBlobService(subject StorageAccountsBlobService) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsBlobService + err := copied.AssignProperties_To_StorageAccountsBlobService(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsBlobService + err = actual.AssignProperties_From_StorageAccountsBlobService(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountsBlobService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -79,6 +165,48 @@ func AddRelatedPropertyGeneratorsForStorageAccountsBlobService(gens map[string]g gens["Status"] = StorageAccounts_BlobService_STATUSGenerator() } +func Test_StorageAccounts_BlobService_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_BlobService_Spec to StorageAccounts_BlobService_Spec via AssignProperties_To_StorageAccounts_BlobService_Spec & AssignProperties_From_StorageAccounts_BlobService_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_BlobService_Spec, StorageAccounts_BlobService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_BlobService_Spec tests if a specific instance of StorageAccounts_BlobService_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_BlobService_Spec(subject StorageAccounts_BlobService_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_BlobService_Spec + err := copied.AssignProperties_To_StorageAccounts_BlobService_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_BlobService_Spec + err = actual.AssignProperties_From_StorageAccounts_BlobService_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_BlobService_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -162,6 +290,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Spec(gens map[st gens["RestorePolicy"] = gen.PtrOf(RestorePolicyPropertiesGenerator()) } +func Test_StorageAccounts_BlobService_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_BlobService_STATUS to StorageAccounts_BlobService_STATUS via AssignProperties_To_StorageAccounts_BlobService_STATUS & AssignProperties_From_StorageAccounts_BlobService_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_BlobService_STATUS, StorageAccounts_BlobService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_BlobService_STATUS tests if a specific instance of StorageAccounts_BlobService_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_BlobService_STATUS(subject StorageAccounts_BlobService_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_BlobService_STATUS + err := copied.AssignProperties_To_StorageAccounts_BlobService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_BlobService_STATUS + err = actual.AssignProperties_From_StorageAccounts_BlobService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_BlobService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -248,6 +418,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_STATUS(gens map[ gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator()) } +func Test_ChangeFeed_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ChangeFeed to ChangeFeed via AssignProperties_To_ChangeFeed & AssignProperties_From_ChangeFeed returns original", + prop.ForAll(RunPropertyAssignmentTestForChangeFeed, ChangeFeedGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForChangeFeed tests if a specific instance of ChangeFeed can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForChangeFeed(subject ChangeFeed) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ChangeFeed + err := copied.AssignProperties_To_ChangeFeed(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ChangeFeed + err = actual.AssignProperties_From_ChangeFeed(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ChangeFeed_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -309,6 +521,48 @@ func AddIndependentPropertyGeneratorsForChangeFeed(gens map[string]gopter.Gen) { gens["RetentionInDays"] = gen.PtrOf(gen.Int()) } +func Test_ChangeFeed_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ChangeFeed_STATUS to ChangeFeed_STATUS via AssignProperties_To_ChangeFeed_STATUS & AssignProperties_From_ChangeFeed_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForChangeFeed_STATUS, ChangeFeed_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForChangeFeed_STATUS tests if a specific instance of ChangeFeed_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForChangeFeed_STATUS(subject ChangeFeed_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ChangeFeed_STATUS + err := copied.AssignProperties_To_ChangeFeed_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ChangeFeed_STATUS + err = actual.AssignProperties_From_ChangeFeed_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ChangeFeed_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -370,6 +624,48 @@ func AddIndependentPropertyGeneratorsForChangeFeed_STATUS(gens map[string]gopter gens["RetentionInDays"] = gen.PtrOf(gen.Int()) } +func Test_CorsRules_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from CorsRules to CorsRules via AssignProperties_To_CorsRules & AssignProperties_From_CorsRules returns original", + prop.ForAll(RunPropertyAssignmentTestForCorsRules, CorsRulesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCorsRules tests if a specific instance of CorsRules can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCorsRules(subject CorsRules) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.CorsRules + err := copied.AssignProperties_To_CorsRules(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual CorsRules + err = actual.AssignProperties_From_CorsRules(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_CorsRules_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -430,6 +726,48 @@ func AddRelatedPropertyGeneratorsForCorsRules(gens map[string]gopter.Gen) { gens["CorsRules"] = gen.SliceOf(CorsRuleGenerator()) } +func Test_CorsRules_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from CorsRules_STATUS to CorsRules_STATUS via AssignProperties_To_CorsRules_STATUS & AssignProperties_From_CorsRules_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForCorsRules_STATUS, CorsRules_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCorsRules_STATUS tests if a specific instance of CorsRules_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCorsRules_STATUS(subject CorsRules_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.CorsRules_STATUS + err := copied.AssignProperties_To_CorsRules_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual CorsRules_STATUS + err = actual.AssignProperties_From_CorsRules_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_CorsRules_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -490,6 +828,48 @@ func AddRelatedPropertyGeneratorsForCorsRules_STATUS(gens map[string]gopter.Gen) gens["CorsRules"] = gen.SliceOf(CorsRule_STATUSGenerator()) } +func Test_DeleteRetentionPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DeleteRetentionPolicy to DeleteRetentionPolicy via AssignProperties_To_DeleteRetentionPolicy & AssignProperties_From_DeleteRetentionPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForDeleteRetentionPolicy, DeleteRetentionPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDeleteRetentionPolicy tests if a specific instance of DeleteRetentionPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDeleteRetentionPolicy(subject DeleteRetentionPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.DeleteRetentionPolicy + err := copied.AssignProperties_To_DeleteRetentionPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DeleteRetentionPolicy + err = actual.AssignProperties_From_DeleteRetentionPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_DeleteRetentionPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -553,6 +933,48 @@ func AddIndependentPropertyGeneratorsForDeleteRetentionPolicy(gens map[string]go gens["Enabled"] = gen.PtrOf(gen.Bool()) } +func Test_DeleteRetentionPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DeleteRetentionPolicy_STATUS to DeleteRetentionPolicy_STATUS via AssignProperties_To_DeleteRetentionPolicy_STATUS & AssignProperties_From_DeleteRetentionPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForDeleteRetentionPolicy_STATUS, DeleteRetentionPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDeleteRetentionPolicy_STATUS tests if a specific instance of DeleteRetentionPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDeleteRetentionPolicy_STATUS(subject DeleteRetentionPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.DeleteRetentionPolicy_STATUS + err := copied.AssignProperties_To_DeleteRetentionPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DeleteRetentionPolicy_STATUS + err = actual.AssignProperties_From_DeleteRetentionPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_DeleteRetentionPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -616,6 +1038,48 @@ func AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_STATUS(gens map[st gens["Enabled"] = gen.PtrOf(gen.Bool()) } +func Test_LastAccessTimeTrackingPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from LastAccessTimeTrackingPolicy to LastAccessTimeTrackingPolicy via AssignProperties_To_LastAccessTimeTrackingPolicy & AssignProperties_From_LastAccessTimeTrackingPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForLastAccessTimeTrackingPolicy, LastAccessTimeTrackingPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForLastAccessTimeTrackingPolicy tests if a specific instance of LastAccessTimeTrackingPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForLastAccessTimeTrackingPolicy(subject LastAccessTimeTrackingPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.LastAccessTimeTrackingPolicy + err := copied.AssignProperties_To_LastAccessTimeTrackingPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual LastAccessTimeTrackingPolicy + err = actual.AssignProperties_From_LastAccessTimeTrackingPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_LastAccessTimeTrackingPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -680,6 +1144,48 @@ func AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy(gens map[st gens["TrackingGranularityInDays"] = gen.PtrOf(gen.Int()) } +func Test_LastAccessTimeTrackingPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from LastAccessTimeTrackingPolicy_STATUS to LastAccessTimeTrackingPolicy_STATUS via AssignProperties_To_LastAccessTimeTrackingPolicy_STATUS & AssignProperties_From_LastAccessTimeTrackingPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForLastAccessTimeTrackingPolicy_STATUS, LastAccessTimeTrackingPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForLastAccessTimeTrackingPolicy_STATUS tests if a specific instance of LastAccessTimeTrackingPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForLastAccessTimeTrackingPolicy_STATUS(subject LastAccessTimeTrackingPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.LastAccessTimeTrackingPolicy_STATUS + err := copied.AssignProperties_To_LastAccessTimeTrackingPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual LastAccessTimeTrackingPolicy_STATUS + err = actual.AssignProperties_From_LastAccessTimeTrackingPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_LastAccessTimeTrackingPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -744,6 +1250,48 @@ func AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_STATUS(gens gens["TrackingGranularityInDays"] = gen.PtrOf(gen.Int()) } +func Test_RestorePolicyProperties_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from RestorePolicyProperties to RestorePolicyProperties via AssignProperties_To_RestorePolicyProperties & AssignProperties_From_RestorePolicyProperties returns original", + prop.ForAll(RunPropertyAssignmentTestForRestorePolicyProperties, RestorePolicyPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForRestorePolicyProperties tests if a specific instance of RestorePolicyProperties can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForRestorePolicyProperties(subject RestorePolicyProperties) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.RestorePolicyProperties + err := copied.AssignProperties_To_RestorePolicyProperties(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual RestorePolicyProperties + err = actual.AssignProperties_From_RestorePolicyProperties(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_RestorePolicyProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -806,6 +1354,48 @@ func AddIndependentPropertyGeneratorsForRestorePolicyProperties(gens map[string] gens["Enabled"] = gen.PtrOf(gen.Bool()) } +func Test_RestorePolicyProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from RestorePolicyProperties_STATUS to RestorePolicyProperties_STATUS via AssignProperties_To_RestorePolicyProperties_STATUS & AssignProperties_From_RestorePolicyProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForRestorePolicyProperties_STATUS, RestorePolicyProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForRestorePolicyProperties_STATUS tests if a specific instance of RestorePolicyProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForRestorePolicyProperties_STATUS(subject RestorePolicyProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.RestorePolicyProperties_STATUS + err := copied.AssignProperties_To_RestorePolicyProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual RestorePolicyProperties_STATUS + err = actual.AssignProperties_From_RestorePolicyProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_RestorePolicyProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -870,6 +1460,48 @@ func AddIndependentPropertyGeneratorsForRestorePolicyProperties_STATUS(gens map[ gens["MinRestoreTime"] = gen.PtrOf(gen.AlphaString()) } +func Test_CorsRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from CorsRule to CorsRule via AssignProperties_To_CorsRule & AssignProperties_From_CorsRule returns original", + prop.ForAll(RunPropertyAssignmentTestForCorsRule, CorsRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCorsRule tests if a specific instance of CorsRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCorsRule(subject CorsRule) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.CorsRule + err := copied.AssignProperties_To_CorsRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual CorsRule + err = actual.AssignProperties_From_CorsRule(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_CorsRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -934,6 +1566,48 @@ func AddIndependentPropertyGeneratorsForCorsRule(gens map[string]gopter.Gen) { gens["MaxAgeInSeconds"] = gen.PtrOf(gen.Int()) } +func Test_CorsRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from CorsRule_STATUS to CorsRule_STATUS via AssignProperties_To_CorsRule_STATUS & AssignProperties_From_CorsRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForCorsRule_STATUS, CorsRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCorsRule_STATUS tests if a specific instance of CorsRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCorsRule_STATUS(subject CorsRule_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.CorsRule_STATUS + err := copied.AssignProperties_To_CorsRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual CorsRule_STATUS + err = actual.AssignProperties_From_CorsRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_CorsRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_blob_services_container_types_gen.go b/v2/api/storage/v1api20220901/storage/storage_accounts_blob_services_container_types_gen.go index 7bdd52f2975..b1e07da63ac 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_blob_services_container_types_gen.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_blob_services_container_types_gen.go @@ -4,19 +4,18 @@ package storage import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" ) -// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsblobservicescontainers,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsblobservicescontainers/status,storageaccountsblobservicescontainers/finalizers},verbs=get;update;patch - // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" @@ -44,6 +43,28 @@ func (container *StorageAccountsBlobServicesContainer) SetConditions(conditions container.Status.Conditions = conditions } +var _ conversion.Convertible = &StorageAccountsBlobServicesContainer{} + +// ConvertFrom populates our StorageAccountsBlobServicesContainer from the provided hub StorageAccountsBlobServicesContainer +func (container *StorageAccountsBlobServicesContainer) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsBlobServicesContainer) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsBlobServicesContainer but received %T instead", hub) + } + + return container.AssignProperties_From_StorageAccountsBlobServicesContainer(source) +} + +// ConvertTo populates the provided hub StorageAccountsBlobServicesContainer from our StorageAccountsBlobServicesContainer +func (container *StorageAccountsBlobServicesContainer) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsBlobServicesContainer) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsBlobServicesContainer but received %T instead", hub) + } + + return container.AssignProperties_To_StorageAccountsBlobServicesContainer(destination) +} + var _ genruntime.KubernetesResource = &StorageAccountsBlobServicesContainer{} // AzureName returns the Azure name of the resource @@ -115,8 +136,75 @@ func (container *StorageAccountsBlobServicesContainer) SetStatus(status genrunti return nil } -// Hub marks that this StorageAccountsBlobServicesContainer is the hub type for conversion -func (container *StorageAccountsBlobServicesContainer) Hub() {} +// AssignProperties_From_StorageAccountsBlobServicesContainer populates our StorageAccountsBlobServicesContainer from the provided source StorageAccountsBlobServicesContainer +func (container *StorageAccountsBlobServicesContainer) AssignProperties_From_StorageAccountsBlobServicesContainer(source *v20230101s.StorageAccountsBlobServicesContainer) error { + + // ObjectMeta + container.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_BlobServices_Container_Spec + err := spec.AssignProperties_From_StorageAccounts_BlobServices_Container_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_BlobServices_Container_Spec() to populate field Spec") + } + container.Spec = spec + + // Status + var status StorageAccounts_BlobServices_Container_STATUS + err = status.AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS() to populate field Status") + } + container.Status = status + + // Invoke the augmentConversionForStorageAccountsBlobServicesContainer interface (if implemented) to customize the conversion + var containerAsAny any = container + if augmentedContainer, ok := containerAsAny.(augmentConversionForStorageAccountsBlobServicesContainer); ok { + err := augmentedContainer.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsBlobServicesContainer populates the provided destination StorageAccountsBlobServicesContainer from our StorageAccountsBlobServicesContainer +func (container *StorageAccountsBlobServicesContainer) AssignProperties_To_StorageAccountsBlobServicesContainer(destination *v20230101s.StorageAccountsBlobServicesContainer) error { + + // ObjectMeta + destination.ObjectMeta = *container.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_BlobServices_Container_Spec + err := container.Spec.AssignProperties_To_StorageAccounts_BlobServices_Container_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_BlobServices_Container_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_BlobServices_Container_STATUS + err = container.Status.AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForStorageAccountsBlobServicesContainer interface (if implemented) to customize the conversion + var containerAsAny any = container + if augmentedContainer, ok := containerAsAny.(augmentConversionForStorageAccountsBlobServicesContainer); ok { + err := augmentedContainer.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (container *StorageAccountsBlobServicesContainer) OriginalGVK() *schema.GroupVersionKind { @@ -138,10 +226,13 @@ type StorageAccountsBlobServicesContainerList struct { Items []StorageAccountsBlobServicesContainer `json:"items"` } +type augmentConversionForStorageAccountsBlobServicesContainer interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountsBlobServicesContainer) error + AssignPropertiesTo(dst *v20230101s.StorageAccountsBlobServicesContainer) error +} + // Storage version of v1api20220901.StorageAccounts_BlobServices_Container_Spec type StorageAccounts_BlobServices_Container_Spec struct { - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=3 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` @@ -166,20 +257,218 @@ var _ genruntime.ConvertibleSpec = &StorageAccounts_BlobServices_Container_Spec{ // ConvertSpecFrom populates our StorageAccounts_BlobServices_Container_Spec from the provided source func (container *StorageAccounts_BlobServices_Container_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == container { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + src, ok := source.(*v20230101s.StorageAccounts_BlobServices_Container_Spec) + if ok { + // Populate our instance from source + return container.AssignProperties_From_StorageAccounts_BlobServices_Container_Spec(src) } - return source.ConvertSpecTo(container) + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_BlobServices_Container_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = container.AssignProperties_From_StorageAccounts_BlobServices_Container_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil } // ConvertSpecTo populates the provided destination from our StorageAccounts_BlobServices_Container_Spec func (container *StorageAccounts_BlobServices_Container_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == container { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + dst, ok := destination.(*v20230101s.StorageAccounts_BlobServices_Container_Spec) + if ok { + // Populate destination from our instance + return container.AssignProperties_To_StorageAccounts_BlobServices_Container_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_BlobServices_Container_Spec{} + err := container.AssignProperties_To_StorageAccounts_BlobServices_Container_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") } - return destination.ConvertSpecFrom(container) + return nil +} + +// AssignProperties_From_StorageAccounts_BlobServices_Container_Spec populates our StorageAccounts_BlobServices_Container_Spec from the provided source StorageAccounts_BlobServices_Container_Spec +func (container *StorageAccounts_BlobServices_Container_Spec) AssignProperties_From_StorageAccounts_BlobServices_Container_Spec(source *v20230101s.StorageAccounts_BlobServices_Container_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AzureName + container.AzureName = source.AzureName + + // DefaultEncryptionScope + container.DefaultEncryptionScope = genruntime.ClonePointerToString(source.DefaultEncryptionScope) + + // DenyEncryptionScopeOverride + if source.DenyEncryptionScopeOverride != nil { + denyEncryptionScopeOverride := *source.DenyEncryptionScopeOverride + container.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride + } else { + container.DenyEncryptionScopeOverride = nil + } + + // EnableNfsV3AllSquash + if source.EnableNfsV3AllSquash != nil { + enableNfsV3AllSquash := *source.EnableNfsV3AllSquash + container.EnableNfsV3AllSquash = &enableNfsV3AllSquash + } else { + container.EnableNfsV3AllSquash = nil + } + + // EnableNfsV3RootSquash + if source.EnableNfsV3RootSquash != nil { + enableNfsV3RootSquash := *source.EnableNfsV3RootSquash + container.EnableNfsV3RootSquash = &enableNfsV3RootSquash + } else { + container.EnableNfsV3RootSquash = nil + } + + // ImmutableStorageWithVersioning + if source.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning ImmutableStorageWithVersioning + err := immutableStorageWithVersioning.AssignProperties_From_ImmutableStorageWithVersioning(source.ImmutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ImmutableStorageWithVersioning() to populate field ImmutableStorageWithVersioning") + } + container.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + container.ImmutableStorageWithVersioning = nil + } + + // Metadata + container.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // OriginalVersion + container.OriginalVersion = source.OriginalVersion + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + container.Owner = &owner + } else { + container.Owner = nil + } + + // PublicAccess + container.PublicAccess = genruntime.ClonePointerToString(source.PublicAccess) + + // Update the property bag + if len(propertyBag) > 0 { + container.PropertyBag = propertyBag + } else { + container.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_BlobServices_Container_Spec interface (if implemented) to customize the conversion + var containerAsAny any = container + if augmentedContainer, ok := containerAsAny.(augmentConversionForStorageAccounts_BlobServices_Container_Spec); ok { + err := augmentedContainer.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_BlobServices_Container_Spec populates the provided destination StorageAccounts_BlobServices_Container_Spec from our StorageAccounts_BlobServices_Container_Spec +func (container *StorageAccounts_BlobServices_Container_Spec) AssignProperties_To_StorageAccounts_BlobServices_Container_Spec(destination *v20230101s.StorageAccounts_BlobServices_Container_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(container.PropertyBag) + + // AzureName + destination.AzureName = container.AzureName + + // DefaultEncryptionScope + destination.DefaultEncryptionScope = genruntime.ClonePointerToString(container.DefaultEncryptionScope) + + // DenyEncryptionScopeOverride + if container.DenyEncryptionScopeOverride != nil { + denyEncryptionScopeOverride := *container.DenyEncryptionScopeOverride + destination.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride + } else { + destination.DenyEncryptionScopeOverride = nil + } + + // EnableNfsV3AllSquash + if container.EnableNfsV3AllSquash != nil { + enableNfsV3AllSquash := *container.EnableNfsV3AllSquash + destination.EnableNfsV3AllSquash = &enableNfsV3AllSquash + } else { + destination.EnableNfsV3AllSquash = nil + } + + // EnableNfsV3RootSquash + if container.EnableNfsV3RootSquash != nil { + enableNfsV3RootSquash := *container.EnableNfsV3RootSquash + destination.EnableNfsV3RootSquash = &enableNfsV3RootSquash + } else { + destination.EnableNfsV3RootSquash = nil + } + + // ImmutableStorageWithVersioning + if container.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning v20230101s.ImmutableStorageWithVersioning + err := container.ImmutableStorageWithVersioning.AssignProperties_To_ImmutableStorageWithVersioning(&immutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ImmutableStorageWithVersioning() to populate field ImmutableStorageWithVersioning") + } + destination.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + destination.ImmutableStorageWithVersioning = nil + } + + // Metadata + destination.Metadata = genruntime.CloneMapOfStringToString(container.Metadata) + + // OriginalVersion + destination.OriginalVersion = container.OriginalVersion + + // Owner + if container.Owner != nil { + owner := container.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // PublicAccess + destination.PublicAccess = genruntime.ClonePointerToString(container.PublicAccess) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_BlobServices_Container_Spec interface (if implemented) to customize the conversion + var containerAsAny any = container + if augmentedContainer, ok := containerAsAny.(augmentConversionForStorageAccounts_BlobServices_Container_Spec); ok { + err := augmentedContainer.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } // Storage version of v1api20220901.StorageAccounts_BlobServices_Container_STATUS @@ -215,20 +504,368 @@ var _ genruntime.ConvertibleStatus = &StorageAccounts_BlobServices_Container_STA // ConvertStatusFrom populates our StorageAccounts_BlobServices_Container_STATUS from the provided source func (container *StorageAccounts_BlobServices_Container_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == container { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + src, ok := source.(*v20230101s.StorageAccounts_BlobServices_Container_STATUS) + if ok { + // Populate our instance from source + return container.AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_BlobServices_Container_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") } - return source.ConvertStatusTo(container) + // Update our instance from src + err = container.AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil } // ConvertStatusTo populates the provided destination from our StorageAccounts_BlobServices_Container_STATUS func (container *StorageAccounts_BlobServices_Container_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == container { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + dst, ok := destination.(*v20230101s.StorageAccounts_BlobServices_Container_STATUS) + if ok { + // Populate destination from our instance + return container.AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_BlobServices_Container_STATUS{} + err := container.AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS populates our StorageAccounts_BlobServices_Container_STATUS from the provided source StorageAccounts_BlobServices_Container_STATUS +func (container *StorageAccounts_BlobServices_Container_STATUS) AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS(source *v20230101s.StorageAccounts_BlobServices_Container_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Conditions + container.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // DefaultEncryptionScope + container.DefaultEncryptionScope = genruntime.ClonePointerToString(source.DefaultEncryptionScope) + + // Deleted + if source.Deleted != nil { + deleted := *source.Deleted + container.Deleted = &deleted + } else { + container.Deleted = nil + } + + // DeletedTime + container.DeletedTime = genruntime.ClonePointerToString(source.DeletedTime) + + // DenyEncryptionScopeOverride + if source.DenyEncryptionScopeOverride != nil { + denyEncryptionScopeOverride := *source.DenyEncryptionScopeOverride + container.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride + } else { + container.DenyEncryptionScopeOverride = nil + } + + // EnableNfsV3AllSquash + if source.EnableNfsV3AllSquash != nil { + enableNfsV3AllSquash := *source.EnableNfsV3AllSquash + container.EnableNfsV3AllSquash = &enableNfsV3AllSquash + } else { + container.EnableNfsV3AllSquash = nil + } + + // EnableNfsV3RootSquash + if source.EnableNfsV3RootSquash != nil { + enableNfsV3RootSquash := *source.EnableNfsV3RootSquash + container.EnableNfsV3RootSquash = &enableNfsV3RootSquash + } else { + container.EnableNfsV3RootSquash = nil + } + + // Etag + container.Etag = genruntime.ClonePointerToString(source.Etag) + + // HasImmutabilityPolicy + if source.HasImmutabilityPolicy != nil { + hasImmutabilityPolicy := *source.HasImmutabilityPolicy + container.HasImmutabilityPolicy = &hasImmutabilityPolicy + } else { + container.HasImmutabilityPolicy = nil + } + + // HasLegalHold + if source.HasLegalHold != nil { + hasLegalHold := *source.HasLegalHold + container.HasLegalHold = &hasLegalHold + } else { + container.HasLegalHold = nil + } + + // Id + container.Id = genruntime.ClonePointerToString(source.Id) + + // ImmutabilityPolicy + if source.ImmutabilityPolicy != nil { + var immutabilityPolicy ImmutabilityPolicyProperties_STATUS + err := immutabilityPolicy.AssignProperties_From_ImmutabilityPolicyProperties_STATUS(source.ImmutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ImmutabilityPolicyProperties_STATUS() to populate field ImmutabilityPolicy") + } + container.ImmutabilityPolicy = &immutabilityPolicy + } else { + container.ImmutabilityPolicy = nil + } + + // ImmutableStorageWithVersioning + if source.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning ImmutableStorageWithVersioning_STATUS + err := immutableStorageWithVersioning.AssignProperties_From_ImmutableStorageWithVersioning_STATUS(source.ImmutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ImmutableStorageWithVersioning_STATUS() to populate field ImmutableStorageWithVersioning") + } + container.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + container.ImmutableStorageWithVersioning = nil + } + + // LastModifiedTime + container.LastModifiedTime = genruntime.ClonePointerToString(source.LastModifiedTime) + + // LeaseDuration + container.LeaseDuration = genruntime.ClonePointerToString(source.LeaseDuration) + + // LeaseState + container.LeaseState = genruntime.ClonePointerToString(source.LeaseState) + + // LeaseStatus + container.LeaseStatus = genruntime.ClonePointerToString(source.LeaseStatus) + + // LegalHold + if source.LegalHold != nil { + var legalHold LegalHoldProperties_STATUS + err := legalHold.AssignProperties_From_LegalHoldProperties_STATUS(source.LegalHold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_LegalHoldProperties_STATUS() to populate field LegalHold") + } + container.LegalHold = &legalHold + } else { + container.LegalHold = nil + } + + // Metadata + container.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // Name + container.Name = genruntime.ClonePointerToString(source.Name) + + // PublicAccess + container.PublicAccess = genruntime.ClonePointerToString(source.PublicAccess) + + // RemainingRetentionDays + container.RemainingRetentionDays = genruntime.ClonePointerToInt(source.RemainingRetentionDays) + + // Type + container.Type = genruntime.ClonePointerToString(source.Type) + + // Version + container.Version = genruntime.ClonePointerToString(source.Version) + + // Update the property bag + if len(propertyBag) > 0 { + container.PropertyBag = propertyBag + } else { + container.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_BlobServices_Container_STATUS interface (if implemented) to customize the conversion + var containerAsAny any = container + if augmentedContainer, ok := containerAsAny.(augmentConversionForStorageAccounts_BlobServices_Container_STATUS); ok { + err := augmentedContainer.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } } - return destination.ConvertStatusFrom(container) + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS populates the provided destination StorageAccounts_BlobServices_Container_STATUS from our StorageAccounts_BlobServices_Container_STATUS +func (container *StorageAccounts_BlobServices_Container_STATUS) AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS(destination *v20230101s.StorageAccounts_BlobServices_Container_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(container.PropertyBag) + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(container.Conditions) + + // DefaultEncryptionScope + destination.DefaultEncryptionScope = genruntime.ClonePointerToString(container.DefaultEncryptionScope) + + // Deleted + if container.Deleted != nil { + deleted := *container.Deleted + destination.Deleted = &deleted + } else { + destination.Deleted = nil + } + + // DeletedTime + destination.DeletedTime = genruntime.ClonePointerToString(container.DeletedTime) + + // DenyEncryptionScopeOverride + if container.DenyEncryptionScopeOverride != nil { + denyEncryptionScopeOverride := *container.DenyEncryptionScopeOverride + destination.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride + } else { + destination.DenyEncryptionScopeOverride = nil + } + + // EnableNfsV3AllSquash + if container.EnableNfsV3AllSquash != nil { + enableNfsV3AllSquash := *container.EnableNfsV3AllSquash + destination.EnableNfsV3AllSquash = &enableNfsV3AllSquash + } else { + destination.EnableNfsV3AllSquash = nil + } + + // EnableNfsV3RootSquash + if container.EnableNfsV3RootSquash != nil { + enableNfsV3RootSquash := *container.EnableNfsV3RootSquash + destination.EnableNfsV3RootSquash = &enableNfsV3RootSquash + } else { + destination.EnableNfsV3RootSquash = nil + } + + // Etag + destination.Etag = genruntime.ClonePointerToString(container.Etag) + + // HasImmutabilityPolicy + if container.HasImmutabilityPolicy != nil { + hasImmutabilityPolicy := *container.HasImmutabilityPolicy + destination.HasImmutabilityPolicy = &hasImmutabilityPolicy + } else { + destination.HasImmutabilityPolicy = nil + } + + // HasLegalHold + if container.HasLegalHold != nil { + hasLegalHold := *container.HasLegalHold + destination.HasLegalHold = &hasLegalHold + } else { + destination.HasLegalHold = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(container.Id) + + // ImmutabilityPolicy + if container.ImmutabilityPolicy != nil { + var immutabilityPolicy v20230101s.ImmutabilityPolicyProperties_STATUS + err := container.ImmutabilityPolicy.AssignProperties_To_ImmutabilityPolicyProperties_STATUS(&immutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ImmutabilityPolicyProperties_STATUS() to populate field ImmutabilityPolicy") + } + destination.ImmutabilityPolicy = &immutabilityPolicy + } else { + destination.ImmutabilityPolicy = nil + } + + // ImmutableStorageWithVersioning + if container.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning v20230101s.ImmutableStorageWithVersioning_STATUS + err := container.ImmutableStorageWithVersioning.AssignProperties_To_ImmutableStorageWithVersioning_STATUS(&immutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ImmutableStorageWithVersioning_STATUS() to populate field ImmutableStorageWithVersioning") + } + destination.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + destination.ImmutableStorageWithVersioning = nil + } + + // LastModifiedTime + destination.LastModifiedTime = genruntime.ClonePointerToString(container.LastModifiedTime) + + // LeaseDuration + destination.LeaseDuration = genruntime.ClonePointerToString(container.LeaseDuration) + + // LeaseState + destination.LeaseState = genruntime.ClonePointerToString(container.LeaseState) + + // LeaseStatus + destination.LeaseStatus = genruntime.ClonePointerToString(container.LeaseStatus) + + // LegalHold + if container.LegalHold != nil { + var legalHold v20230101s.LegalHoldProperties_STATUS + err := container.LegalHold.AssignProperties_To_LegalHoldProperties_STATUS(&legalHold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_LegalHoldProperties_STATUS() to populate field LegalHold") + } + destination.LegalHold = &legalHold + } else { + destination.LegalHold = nil + } + + // Metadata + destination.Metadata = genruntime.CloneMapOfStringToString(container.Metadata) + + // Name + destination.Name = genruntime.ClonePointerToString(container.Name) + + // PublicAccess + destination.PublicAccess = genruntime.ClonePointerToString(container.PublicAccess) + + // RemainingRetentionDays + destination.RemainingRetentionDays = genruntime.ClonePointerToInt(container.RemainingRetentionDays) + + // Type + destination.Type = genruntime.ClonePointerToString(container.Type) + + // Version + destination.Version = genruntime.ClonePointerToString(container.Version) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_BlobServices_Container_STATUS interface (if implemented) to customize the conversion + var containerAsAny any = container + if augmentedContainer, ok := containerAsAny.(augmentConversionForStorageAccounts_BlobServices_Container_STATUS); ok { + err := augmentedContainer.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForStorageAccounts_BlobServices_Container_Spec interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_BlobServices_Container_Spec) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_BlobServices_Container_Spec) error +} + +type augmentConversionForStorageAccounts_BlobServices_Container_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_BlobServices_Container_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_BlobServices_Container_STATUS) error } // Storage version of v1api20220901.ImmutabilityPolicyProperties_STATUS @@ -243,6 +880,142 @@ type ImmutabilityPolicyProperties_STATUS struct { UpdateHistory []UpdateHistoryProperty_STATUS `json:"updateHistory,omitempty"` } +// AssignProperties_From_ImmutabilityPolicyProperties_STATUS populates our ImmutabilityPolicyProperties_STATUS from the provided source ImmutabilityPolicyProperties_STATUS +func (properties *ImmutabilityPolicyProperties_STATUS) AssignProperties_From_ImmutabilityPolicyProperties_STATUS(source *v20230101s.ImmutabilityPolicyProperties_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllowProtectedAppendWrites + if source.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *source.AllowProtectedAppendWrites + properties.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + properties.AllowProtectedAppendWrites = nil + } + + // AllowProtectedAppendWritesAll + if source.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *source.AllowProtectedAppendWritesAll + properties.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } else { + properties.AllowProtectedAppendWritesAll = nil + } + + // Etag + properties.Etag = genruntime.ClonePointerToString(source.Etag) + + // ImmutabilityPeriodSinceCreationInDays + properties.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(source.ImmutabilityPeriodSinceCreationInDays) + + // State + properties.State = genruntime.ClonePointerToString(source.State) + + // UpdateHistory + if source.UpdateHistory != nil { + updateHistoryList := make([]UpdateHistoryProperty_STATUS, len(source.UpdateHistory)) + for updateHistoryIndex, updateHistoryItem := range source.UpdateHistory { + // Shadow the loop variable to avoid aliasing + updateHistoryItem := updateHistoryItem + var updateHistory UpdateHistoryProperty_STATUS + err := updateHistory.AssignProperties_From_UpdateHistoryProperty_STATUS(&updateHistoryItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_UpdateHistoryProperty_STATUS() to populate field UpdateHistory") + } + updateHistoryList[updateHistoryIndex] = updateHistory + } + properties.UpdateHistory = updateHistoryList + } else { + properties.UpdateHistory = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + properties.PropertyBag = propertyBag + } else { + properties.PropertyBag = nil + } + + // Invoke the augmentConversionForImmutabilityPolicyProperties_STATUS interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForImmutabilityPolicyProperties_STATUS); ok { + err := augmentedProperties.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ImmutabilityPolicyProperties_STATUS populates the provided destination ImmutabilityPolicyProperties_STATUS from our ImmutabilityPolicyProperties_STATUS +func (properties *ImmutabilityPolicyProperties_STATUS) AssignProperties_To_ImmutabilityPolicyProperties_STATUS(destination *v20230101s.ImmutabilityPolicyProperties_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(properties.PropertyBag) + + // AllowProtectedAppendWrites + if properties.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *properties.AllowProtectedAppendWrites + destination.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + destination.AllowProtectedAppendWrites = nil + } + + // AllowProtectedAppendWritesAll + if properties.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *properties.AllowProtectedAppendWritesAll + destination.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } else { + destination.AllowProtectedAppendWritesAll = nil + } + + // Etag + destination.Etag = genruntime.ClonePointerToString(properties.Etag) + + // ImmutabilityPeriodSinceCreationInDays + destination.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(properties.ImmutabilityPeriodSinceCreationInDays) + + // State + destination.State = genruntime.ClonePointerToString(properties.State) + + // UpdateHistory + if properties.UpdateHistory != nil { + updateHistoryList := make([]v20230101s.UpdateHistoryProperty_STATUS, len(properties.UpdateHistory)) + for updateHistoryIndex, updateHistoryItem := range properties.UpdateHistory { + // Shadow the loop variable to avoid aliasing + updateHistoryItem := updateHistoryItem + var updateHistory v20230101s.UpdateHistoryProperty_STATUS + err := updateHistoryItem.AssignProperties_To_UpdateHistoryProperty_STATUS(&updateHistory) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_UpdateHistoryProperty_STATUS() to populate field UpdateHistory") + } + updateHistoryList[updateHistoryIndex] = updateHistory + } + destination.UpdateHistory = updateHistoryList + } else { + destination.UpdateHistory = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForImmutabilityPolicyProperties_STATUS interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForImmutabilityPolicyProperties_STATUS); ok { + err := augmentedProperties.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ImmutableStorageWithVersioning // Object level immutability properties of the container. type ImmutableStorageWithVersioning struct { @@ -250,6 +1023,72 @@ type ImmutableStorageWithVersioning struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_ImmutableStorageWithVersioning populates our ImmutableStorageWithVersioning from the provided source ImmutableStorageWithVersioning +func (versioning *ImmutableStorageWithVersioning) AssignProperties_From_ImmutableStorageWithVersioning(source *v20230101s.ImmutableStorageWithVersioning) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + versioning.Enabled = &enabled + } else { + versioning.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + versioning.PropertyBag = propertyBag + } else { + versioning.PropertyBag = nil + } + + // Invoke the augmentConversionForImmutableStorageWithVersioning interface (if implemented) to customize the conversion + var versioningAsAny any = versioning + if augmentedVersioning, ok := versioningAsAny.(augmentConversionForImmutableStorageWithVersioning); ok { + err := augmentedVersioning.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ImmutableStorageWithVersioning populates the provided destination ImmutableStorageWithVersioning from our ImmutableStorageWithVersioning +func (versioning *ImmutableStorageWithVersioning) AssignProperties_To_ImmutableStorageWithVersioning(destination *v20230101s.ImmutableStorageWithVersioning) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(versioning.PropertyBag) + + // Enabled + if versioning.Enabled != nil { + enabled := *versioning.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForImmutableStorageWithVersioning interface (if implemented) to customize the conversion + var versioningAsAny any = versioning + if augmentedVersioning, ok := versioningAsAny.(augmentConversionForImmutableStorageWithVersioning); ok { + err := augmentedVersioning.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ImmutableStorageWithVersioning_STATUS // Object level immutability properties of the container. type ImmutableStorageWithVersioning_STATUS struct { @@ -259,6 +1098,84 @@ type ImmutableStorageWithVersioning_STATUS struct { TimeStamp *string `json:"timeStamp,omitempty"` } +// AssignProperties_From_ImmutableStorageWithVersioning_STATUS populates our ImmutableStorageWithVersioning_STATUS from the provided source ImmutableStorageWithVersioning_STATUS +func (versioning *ImmutableStorageWithVersioning_STATUS) AssignProperties_From_ImmutableStorageWithVersioning_STATUS(source *v20230101s.ImmutableStorageWithVersioning_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + versioning.Enabled = &enabled + } else { + versioning.Enabled = nil + } + + // MigrationState + versioning.MigrationState = genruntime.ClonePointerToString(source.MigrationState) + + // TimeStamp + versioning.TimeStamp = genruntime.ClonePointerToString(source.TimeStamp) + + // Update the property bag + if len(propertyBag) > 0 { + versioning.PropertyBag = propertyBag + } else { + versioning.PropertyBag = nil + } + + // Invoke the augmentConversionForImmutableStorageWithVersioning_STATUS interface (if implemented) to customize the conversion + var versioningAsAny any = versioning + if augmentedVersioning, ok := versioningAsAny.(augmentConversionForImmutableStorageWithVersioning_STATUS); ok { + err := augmentedVersioning.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ImmutableStorageWithVersioning_STATUS populates the provided destination ImmutableStorageWithVersioning_STATUS from our ImmutableStorageWithVersioning_STATUS +func (versioning *ImmutableStorageWithVersioning_STATUS) AssignProperties_To_ImmutableStorageWithVersioning_STATUS(destination *v20230101s.ImmutableStorageWithVersioning_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(versioning.PropertyBag) + + // Enabled + if versioning.Enabled != nil { + enabled := *versioning.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // MigrationState + destination.MigrationState = genruntime.ClonePointerToString(versioning.MigrationState) + + // TimeStamp + destination.TimeStamp = genruntime.ClonePointerToString(versioning.TimeStamp) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForImmutableStorageWithVersioning_STATUS interface (if implemented) to customize the conversion + var versioningAsAny any = versioning + if augmentedVersioning, ok := versioningAsAny.(augmentConversionForImmutableStorageWithVersioning_STATUS); ok { + err := augmentedVersioning.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.LegalHoldProperties_STATUS // The LegalHold property of a blob container. type LegalHoldProperties_STATUS struct { @@ -268,6 +1185,152 @@ type LegalHoldProperties_STATUS struct { Tags []TagProperty_STATUS `json:"tags,omitempty"` } +// AssignProperties_From_LegalHoldProperties_STATUS populates our LegalHoldProperties_STATUS from the provided source LegalHoldProperties_STATUS +func (properties *LegalHoldProperties_STATUS) AssignProperties_From_LegalHoldProperties_STATUS(source *v20230101s.LegalHoldProperties_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // HasLegalHold + if source.HasLegalHold != nil { + hasLegalHold := *source.HasLegalHold + properties.HasLegalHold = &hasLegalHold + } else { + properties.HasLegalHold = nil + } + + // ProtectedAppendWritesHistory + if source.ProtectedAppendWritesHistory != nil { + var protectedAppendWritesHistory ProtectedAppendWritesHistory_STATUS + err := protectedAppendWritesHistory.AssignProperties_From_ProtectedAppendWritesHistory_STATUS(source.ProtectedAppendWritesHistory) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ProtectedAppendWritesHistory_STATUS() to populate field ProtectedAppendWritesHistory") + } + properties.ProtectedAppendWritesHistory = &protectedAppendWritesHistory + } else { + properties.ProtectedAppendWritesHistory = nil + } + + // Tags + if source.Tags != nil { + tagList := make([]TagProperty_STATUS, len(source.Tags)) + for tagIndex, tagItem := range source.Tags { + // Shadow the loop variable to avoid aliasing + tagItem := tagItem + var tag TagProperty_STATUS + err := tag.AssignProperties_From_TagProperty_STATUS(&tagItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TagProperty_STATUS() to populate field Tags") + } + tagList[tagIndex] = tag + } + properties.Tags = tagList + } else { + properties.Tags = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + properties.PropertyBag = propertyBag + } else { + properties.PropertyBag = nil + } + + // Invoke the augmentConversionForLegalHoldProperties_STATUS interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForLegalHoldProperties_STATUS); ok { + err := augmentedProperties.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_LegalHoldProperties_STATUS populates the provided destination LegalHoldProperties_STATUS from our LegalHoldProperties_STATUS +func (properties *LegalHoldProperties_STATUS) AssignProperties_To_LegalHoldProperties_STATUS(destination *v20230101s.LegalHoldProperties_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(properties.PropertyBag) + + // HasLegalHold + if properties.HasLegalHold != nil { + hasLegalHold := *properties.HasLegalHold + destination.HasLegalHold = &hasLegalHold + } else { + destination.HasLegalHold = nil + } + + // ProtectedAppendWritesHistory + if properties.ProtectedAppendWritesHistory != nil { + var protectedAppendWritesHistory v20230101s.ProtectedAppendWritesHistory_STATUS + err := properties.ProtectedAppendWritesHistory.AssignProperties_To_ProtectedAppendWritesHistory_STATUS(&protectedAppendWritesHistory) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ProtectedAppendWritesHistory_STATUS() to populate field ProtectedAppendWritesHistory") + } + destination.ProtectedAppendWritesHistory = &protectedAppendWritesHistory + } else { + destination.ProtectedAppendWritesHistory = nil + } + + // Tags + if properties.Tags != nil { + tagList := make([]v20230101s.TagProperty_STATUS, len(properties.Tags)) + for tagIndex, tagItem := range properties.Tags { + // Shadow the loop variable to avoid aliasing + tagItem := tagItem + var tag v20230101s.TagProperty_STATUS + err := tagItem.AssignProperties_To_TagProperty_STATUS(&tag) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TagProperty_STATUS() to populate field Tags") + } + tagList[tagIndex] = tag + } + destination.Tags = tagList + } else { + destination.Tags = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForLegalHoldProperties_STATUS interface (if implemented) to customize the conversion + var propertiesAsAny any = properties + if augmentedProperties, ok := propertiesAsAny.(augmentConversionForLegalHoldProperties_STATUS); ok { + err := augmentedProperties.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForImmutabilityPolicyProperties_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ImmutabilityPolicyProperties_STATUS) error + AssignPropertiesTo(dst *v20230101s.ImmutabilityPolicyProperties_STATUS) error +} + +type augmentConversionForImmutableStorageWithVersioning interface { + AssignPropertiesFrom(src *v20230101s.ImmutableStorageWithVersioning) error + AssignPropertiesTo(dst *v20230101s.ImmutableStorageWithVersioning) error +} + +type augmentConversionForImmutableStorageWithVersioning_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ImmutableStorageWithVersioning_STATUS) error + AssignPropertiesTo(dst *v20230101s.ImmutableStorageWithVersioning_STATUS) error +} + +type augmentConversionForLegalHoldProperties_STATUS interface { + AssignPropertiesFrom(src *v20230101s.LegalHoldProperties_STATUS) error + AssignPropertiesTo(dst *v20230101s.LegalHoldProperties_STATUS) error +} + // Storage version of v1api20220901.ProtectedAppendWritesHistory_STATUS // Protected append writes history setting for the blob container with Legal holds. type ProtectedAppendWritesHistory_STATUS struct { @@ -276,6 +1339,78 @@ type ProtectedAppendWritesHistory_STATUS struct { Timestamp *string `json:"timestamp,omitempty"` } +// AssignProperties_From_ProtectedAppendWritesHistory_STATUS populates our ProtectedAppendWritesHistory_STATUS from the provided source ProtectedAppendWritesHistory_STATUS +func (history *ProtectedAppendWritesHistory_STATUS) AssignProperties_From_ProtectedAppendWritesHistory_STATUS(source *v20230101s.ProtectedAppendWritesHistory_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllowProtectedAppendWritesAll + if source.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *source.AllowProtectedAppendWritesAll + history.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } else { + history.AllowProtectedAppendWritesAll = nil + } + + // Timestamp + history.Timestamp = genruntime.ClonePointerToString(source.Timestamp) + + // Update the property bag + if len(propertyBag) > 0 { + history.PropertyBag = propertyBag + } else { + history.PropertyBag = nil + } + + // Invoke the augmentConversionForProtectedAppendWritesHistory_STATUS interface (if implemented) to customize the conversion + var historyAsAny any = history + if augmentedHistory, ok := historyAsAny.(augmentConversionForProtectedAppendWritesHistory_STATUS); ok { + err := augmentedHistory.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ProtectedAppendWritesHistory_STATUS populates the provided destination ProtectedAppendWritesHistory_STATUS from our ProtectedAppendWritesHistory_STATUS +func (history *ProtectedAppendWritesHistory_STATUS) AssignProperties_To_ProtectedAppendWritesHistory_STATUS(destination *v20230101s.ProtectedAppendWritesHistory_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(history.PropertyBag) + + // AllowProtectedAppendWritesAll + if history.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *history.AllowProtectedAppendWritesAll + destination.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } else { + destination.AllowProtectedAppendWritesAll = nil + } + + // Timestamp + destination.Timestamp = genruntime.ClonePointerToString(history.Timestamp) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForProtectedAppendWritesHistory_STATUS interface (if implemented) to customize the conversion + var historyAsAny any = history + if augmentedHistory, ok := historyAsAny.(augmentConversionForProtectedAppendWritesHistory_STATUS); ok { + err := augmentedHistory.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.TagProperty_STATUS // A tag of the LegalHold of a blob container. type TagProperty_STATUS struct { @@ -287,6 +1422,86 @@ type TagProperty_STATUS struct { Upn *string `json:"upn,omitempty"` } +// AssignProperties_From_TagProperty_STATUS populates our TagProperty_STATUS from the provided source TagProperty_STATUS +func (property *TagProperty_STATUS) AssignProperties_From_TagProperty_STATUS(source *v20230101s.TagProperty_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ObjectIdentifier + property.ObjectIdentifier = genruntime.ClonePointerToString(source.ObjectIdentifier) + + // Tag + property.Tag = genruntime.ClonePointerToString(source.Tag) + + // TenantId + property.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // Timestamp + property.Timestamp = genruntime.ClonePointerToString(source.Timestamp) + + // Upn + property.Upn = genruntime.ClonePointerToString(source.Upn) + + // Update the property bag + if len(propertyBag) > 0 { + property.PropertyBag = propertyBag + } else { + property.PropertyBag = nil + } + + // Invoke the augmentConversionForTagProperty_STATUS interface (if implemented) to customize the conversion + var propertyAsAny any = property + if augmentedProperty, ok := propertyAsAny.(augmentConversionForTagProperty_STATUS); ok { + err := augmentedProperty.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_TagProperty_STATUS populates the provided destination TagProperty_STATUS from our TagProperty_STATUS +func (property *TagProperty_STATUS) AssignProperties_To_TagProperty_STATUS(destination *v20230101s.TagProperty_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(property.PropertyBag) + + // ObjectIdentifier + destination.ObjectIdentifier = genruntime.ClonePointerToString(property.ObjectIdentifier) + + // Tag + destination.Tag = genruntime.ClonePointerToString(property.Tag) + + // TenantId + destination.TenantId = genruntime.ClonePointerToString(property.TenantId) + + // Timestamp + destination.Timestamp = genruntime.ClonePointerToString(property.Timestamp) + + // Upn + destination.Upn = genruntime.ClonePointerToString(property.Upn) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForTagProperty_STATUS interface (if implemented) to customize the conversion + var propertyAsAny any = property + if augmentedProperty, ok := propertyAsAny.(augmentConversionForTagProperty_STATUS); ok { + err := augmentedProperty.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.UpdateHistoryProperty_STATUS // An update history of the ImmutabilityPolicy of a blob container. type UpdateHistoryProperty_STATUS struct { @@ -301,6 +1516,139 @@ type UpdateHistoryProperty_STATUS struct { Upn *string `json:"upn,omitempty"` } +// AssignProperties_From_UpdateHistoryProperty_STATUS populates our UpdateHistoryProperty_STATUS from the provided source UpdateHistoryProperty_STATUS +func (property *UpdateHistoryProperty_STATUS) AssignProperties_From_UpdateHistoryProperty_STATUS(source *v20230101s.UpdateHistoryProperty_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllowProtectedAppendWrites + if source.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *source.AllowProtectedAppendWrites + property.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + property.AllowProtectedAppendWrites = nil + } + + // AllowProtectedAppendWritesAll + if source.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *source.AllowProtectedAppendWritesAll + property.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } else { + property.AllowProtectedAppendWritesAll = nil + } + + // ImmutabilityPeriodSinceCreationInDays + property.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(source.ImmutabilityPeriodSinceCreationInDays) + + // ObjectIdentifier + property.ObjectIdentifier = genruntime.ClonePointerToString(source.ObjectIdentifier) + + // TenantId + property.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // Timestamp + property.Timestamp = genruntime.ClonePointerToString(source.Timestamp) + + // Update + property.Update = genruntime.ClonePointerToString(source.Update) + + // Upn + property.Upn = genruntime.ClonePointerToString(source.Upn) + + // Update the property bag + if len(propertyBag) > 0 { + property.PropertyBag = propertyBag + } else { + property.PropertyBag = nil + } + + // Invoke the augmentConversionForUpdateHistoryProperty_STATUS interface (if implemented) to customize the conversion + var propertyAsAny any = property + if augmentedProperty, ok := propertyAsAny.(augmentConversionForUpdateHistoryProperty_STATUS); ok { + err := augmentedProperty.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_UpdateHistoryProperty_STATUS populates the provided destination UpdateHistoryProperty_STATUS from our UpdateHistoryProperty_STATUS +func (property *UpdateHistoryProperty_STATUS) AssignProperties_To_UpdateHistoryProperty_STATUS(destination *v20230101s.UpdateHistoryProperty_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(property.PropertyBag) + + // AllowProtectedAppendWrites + if property.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *property.AllowProtectedAppendWrites + destination.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + destination.AllowProtectedAppendWrites = nil + } + + // AllowProtectedAppendWritesAll + if property.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *property.AllowProtectedAppendWritesAll + destination.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } else { + destination.AllowProtectedAppendWritesAll = nil + } + + // ImmutabilityPeriodSinceCreationInDays + destination.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(property.ImmutabilityPeriodSinceCreationInDays) + + // ObjectIdentifier + destination.ObjectIdentifier = genruntime.ClonePointerToString(property.ObjectIdentifier) + + // TenantId + destination.TenantId = genruntime.ClonePointerToString(property.TenantId) + + // Timestamp + destination.Timestamp = genruntime.ClonePointerToString(property.Timestamp) + + // Update + destination.Update = genruntime.ClonePointerToString(property.Update) + + // Upn + destination.Upn = genruntime.ClonePointerToString(property.Upn) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForUpdateHistoryProperty_STATUS interface (if implemented) to customize the conversion + var propertyAsAny any = property + if augmentedProperty, ok := propertyAsAny.(augmentConversionForUpdateHistoryProperty_STATUS); ok { + err := augmentedProperty.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForProtectedAppendWritesHistory_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ProtectedAppendWritesHistory_STATUS) error + AssignPropertiesTo(dst *v20230101s.ProtectedAppendWritesHistory_STATUS) error +} + +type augmentConversionForTagProperty_STATUS interface { + AssignPropertiesFrom(src *v20230101s.TagProperty_STATUS) error + AssignPropertiesTo(dst *v20230101s.TagProperty_STATUS) error +} + +type augmentConversionForUpdateHistoryProperty_STATUS interface { + AssignPropertiesFrom(src *v20230101s.UpdateHistoryProperty_STATUS) error + AssignPropertiesTo(dst *v20230101s.UpdateHistoryProperty_STATUS) error +} + func init() { SchemeBuilder.Register(&StorageAccountsBlobServicesContainer{}, &StorageAccountsBlobServicesContainerList{}) } diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_blob_services_container_types_gen_test.go b/v2/api/storage/v1api20220901/storage/storage_accounts_blob_services_container_types_gen_test.go index d1ad76598c6..6f9d743be91 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_blob_services_container_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_blob_services_container_types_gen_test.go @@ -5,6 +5,7 @@ package storage import ( "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -17,6 +18,91 @@ import ( "testing" ) +func Test_StorageAccountsBlobServicesContainer_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsBlobServicesContainer to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsBlobServicesContainer, StorageAccountsBlobServicesContainerGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsBlobServicesContainer tests if a specific instance of StorageAccountsBlobServicesContainer round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsBlobServicesContainer(subject StorageAccountsBlobServicesContainer) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsBlobServicesContainer + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsBlobServicesContainer + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsBlobServicesContainer_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsBlobServicesContainer to StorageAccountsBlobServicesContainer via AssignProperties_To_StorageAccountsBlobServicesContainer & AssignProperties_From_StorageAccountsBlobServicesContainer returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsBlobServicesContainer, StorageAccountsBlobServicesContainerGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsBlobServicesContainer tests if a specific instance of StorageAccountsBlobServicesContainer can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsBlobServicesContainer(subject StorageAccountsBlobServicesContainer) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsBlobServicesContainer + err := copied.AssignProperties_To_StorageAccountsBlobServicesContainer(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsBlobServicesContainer + err = actual.AssignProperties_From_StorageAccountsBlobServicesContainer(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountsBlobServicesContainer_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -79,6 +165,48 @@ func AddRelatedPropertyGeneratorsForStorageAccountsBlobServicesContainer(gens ma gens["Status"] = StorageAccounts_BlobServices_Container_STATUSGenerator() } +func Test_StorageAccounts_BlobServices_Container_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_BlobServices_Container_Spec to StorageAccounts_BlobServices_Container_Spec via AssignProperties_To_StorageAccounts_BlobServices_Container_Spec & AssignProperties_From_StorageAccounts_BlobServices_Container_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_BlobServices_Container_Spec, StorageAccounts_BlobServices_Container_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_BlobServices_Container_Spec tests if a specific instance of StorageAccounts_BlobServices_Container_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_BlobServices_Container_Spec(subject StorageAccounts_BlobServices_Container_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_BlobServices_Container_Spec + err := copied.AssignProperties_To_StorageAccounts_BlobServices_Container_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_BlobServices_Container_Spec + err = actual.AssignProperties_From_StorageAccounts_BlobServices_Container_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_BlobServices_Container_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -161,6 +289,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec( gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageWithVersioningGenerator()) } +func Test_StorageAccounts_BlobServices_Container_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_BlobServices_Container_STATUS to StorageAccounts_BlobServices_Container_STATUS via AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS & AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_BlobServices_Container_STATUS, StorageAccounts_BlobServices_Container_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_BlobServices_Container_STATUS tests if a specific instance of StorageAccounts_BlobServices_Container_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_BlobServices_Container_STATUS(subject StorageAccounts_BlobServices_Container_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_BlobServices_Container_STATUS + err := copied.AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_BlobServices_Container_STATUS + err = actual.AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_BlobServices_Container_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -257,6 +427,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATU gens["LegalHold"] = gen.PtrOf(LegalHoldProperties_STATUSGenerator()) } +func Test_ImmutabilityPolicyProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ImmutabilityPolicyProperties_STATUS to ImmutabilityPolicyProperties_STATUS via AssignProperties_To_ImmutabilityPolicyProperties_STATUS & AssignProperties_From_ImmutabilityPolicyProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForImmutabilityPolicyProperties_STATUS, ImmutabilityPolicyProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForImmutabilityPolicyProperties_STATUS tests if a specific instance of ImmutabilityPolicyProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForImmutabilityPolicyProperties_STATUS(subject ImmutabilityPolicyProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ImmutabilityPolicyProperties_STATUS + err := copied.AssignProperties_To_ImmutabilityPolicyProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ImmutabilityPolicyProperties_STATUS + err = actual.AssignProperties_From_ImmutabilityPolicyProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ImmutabilityPolicyProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -336,6 +548,48 @@ func AddRelatedPropertyGeneratorsForImmutabilityPolicyProperties_STATUS(gens map gens["UpdateHistory"] = gen.SliceOf(UpdateHistoryProperty_STATUSGenerator()) } +func Test_ImmutableStorageWithVersioning_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ImmutableStorageWithVersioning to ImmutableStorageWithVersioning via AssignProperties_To_ImmutableStorageWithVersioning & AssignProperties_From_ImmutableStorageWithVersioning returns original", + prop.ForAll(RunPropertyAssignmentTestForImmutableStorageWithVersioning, ImmutableStorageWithVersioningGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForImmutableStorageWithVersioning tests if a specific instance of ImmutableStorageWithVersioning can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForImmutableStorageWithVersioning(subject ImmutableStorageWithVersioning) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ImmutableStorageWithVersioning + err := copied.AssignProperties_To_ImmutableStorageWithVersioning(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ImmutableStorageWithVersioning + err = actual.AssignProperties_From_ImmutableStorageWithVersioning(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ImmutableStorageWithVersioning_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -397,6 +651,48 @@ func AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning(gens map[ gens["Enabled"] = gen.PtrOf(gen.Bool()) } +func Test_ImmutableStorageWithVersioning_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ImmutableStorageWithVersioning_STATUS to ImmutableStorageWithVersioning_STATUS via AssignProperties_To_ImmutableStorageWithVersioning_STATUS & AssignProperties_From_ImmutableStorageWithVersioning_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForImmutableStorageWithVersioning_STATUS, ImmutableStorageWithVersioning_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForImmutableStorageWithVersioning_STATUS tests if a specific instance of ImmutableStorageWithVersioning_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForImmutableStorageWithVersioning_STATUS(subject ImmutableStorageWithVersioning_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ImmutableStorageWithVersioning_STATUS + err := copied.AssignProperties_To_ImmutableStorageWithVersioning_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ImmutableStorageWithVersioning_STATUS + err = actual.AssignProperties_From_ImmutableStorageWithVersioning_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ImmutableStorageWithVersioning_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -460,6 +756,48 @@ func AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_STATUS(ge gens["TimeStamp"] = gen.PtrOf(gen.AlphaString()) } +func Test_LegalHoldProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from LegalHoldProperties_STATUS to LegalHoldProperties_STATUS via AssignProperties_To_LegalHoldProperties_STATUS & AssignProperties_From_LegalHoldProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForLegalHoldProperties_STATUS, LegalHoldProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForLegalHoldProperties_STATUS tests if a specific instance of LegalHoldProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForLegalHoldProperties_STATUS(subject LegalHoldProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.LegalHoldProperties_STATUS + err := copied.AssignProperties_To_LegalHoldProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual LegalHoldProperties_STATUS + err = actual.AssignProperties_From_LegalHoldProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_LegalHoldProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -536,6 +874,48 @@ func AddRelatedPropertyGeneratorsForLegalHoldProperties_STATUS(gens map[string]g gens["Tags"] = gen.SliceOf(TagProperty_STATUSGenerator()) } +func Test_ProtectedAppendWritesHistory_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ProtectedAppendWritesHistory_STATUS to ProtectedAppendWritesHistory_STATUS via AssignProperties_To_ProtectedAppendWritesHistory_STATUS & AssignProperties_From_ProtectedAppendWritesHistory_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForProtectedAppendWritesHistory_STATUS, ProtectedAppendWritesHistory_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForProtectedAppendWritesHistory_STATUS tests if a specific instance of ProtectedAppendWritesHistory_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForProtectedAppendWritesHistory_STATUS(subject ProtectedAppendWritesHistory_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ProtectedAppendWritesHistory_STATUS + err := copied.AssignProperties_To_ProtectedAppendWritesHistory_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ProtectedAppendWritesHistory_STATUS + err = actual.AssignProperties_From_ProtectedAppendWritesHistory_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ProtectedAppendWritesHistory_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -598,6 +978,48 @@ func AddIndependentPropertyGeneratorsForProtectedAppendWritesHistory_STATUS(gens gens["Timestamp"] = gen.PtrOf(gen.AlphaString()) } +func Test_TagProperty_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TagProperty_STATUS to TagProperty_STATUS via AssignProperties_To_TagProperty_STATUS & AssignProperties_From_TagProperty_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForTagProperty_STATUS, TagProperty_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTagProperty_STATUS tests if a specific instance of TagProperty_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTagProperty_STATUS(subject TagProperty_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TagProperty_STATUS + err := copied.AssignProperties_To_TagProperty_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TagProperty_STATUS + err = actual.AssignProperties_From_TagProperty_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_TagProperty_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -662,6 +1084,48 @@ func AddIndependentPropertyGeneratorsForTagProperty_STATUS(gens map[string]gopte gens["Upn"] = gen.PtrOf(gen.AlphaString()) } +func Test_UpdateHistoryProperty_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from UpdateHistoryProperty_STATUS to UpdateHistoryProperty_STATUS via AssignProperties_To_UpdateHistoryProperty_STATUS & AssignProperties_From_UpdateHistoryProperty_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForUpdateHistoryProperty_STATUS, UpdateHistoryProperty_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForUpdateHistoryProperty_STATUS tests if a specific instance of UpdateHistoryProperty_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForUpdateHistoryProperty_STATUS(subject UpdateHistoryProperty_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.UpdateHistoryProperty_STATUS + err := copied.AssignProperties_To_UpdateHistoryProperty_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual UpdateHistoryProperty_STATUS + err = actual.AssignProperties_From_UpdateHistoryProperty_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_UpdateHistoryProperty_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_file_service_types_gen.go b/v2/api/storage/v1api20220901/storage/storage_accounts_file_service_types_gen.go index da4b3084b68..bb2f1101de8 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_file_service_types_gen.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_file_service_types_gen.go @@ -4,19 +4,18 @@ package storage import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" ) -// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsfileservices,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsfileservices/status,storageaccountsfileservices/finalizers},verbs=get;update;patch - // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" @@ -44,6 +43,28 @@ func (service *StorageAccountsFileService) SetConditions(conditions conditions.C service.Status.Conditions = conditions } +var _ conversion.Convertible = &StorageAccountsFileService{} + +// ConvertFrom populates our StorageAccountsFileService from the provided hub StorageAccountsFileService +func (service *StorageAccountsFileService) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsFileService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsFileService but received %T instead", hub) + } + + return service.AssignProperties_From_StorageAccountsFileService(source) +} + +// ConvertTo populates the provided hub StorageAccountsFileService from our StorageAccountsFileService +func (service *StorageAccountsFileService) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsFileService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsFileService but received %T instead", hub) + } + + return service.AssignProperties_To_StorageAccountsFileService(destination) +} + var _ genruntime.KubernetesResource = &StorageAccountsFileService{} // AzureName returns the Azure name of the resource (always "default") @@ -114,8 +135,75 @@ func (service *StorageAccountsFileService) SetStatus(status genruntime.Convertib return nil } -// Hub marks that this StorageAccountsFileService is the hub type for conversion -func (service *StorageAccountsFileService) Hub() {} +// AssignProperties_From_StorageAccountsFileService populates our StorageAccountsFileService from the provided source StorageAccountsFileService +func (service *StorageAccountsFileService) AssignProperties_From_StorageAccountsFileService(source *v20230101s.StorageAccountsFileService) error { + + // ObjectMeta + service.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_FileService_Spec + err := spec.AssignProperties_From_StorageAccounts_FileService_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_FileService_Spec() to populate field Spec") + } + service.Spec = spec + + // Status + var status StorageAccounts_FileService_STATUS + err = status.AssignProperties_From_StorageAccounts_FileService_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_FileService_STATUS() to populate field Status") + } + service.Status = status + + // Invoke the augmentConversionForStorageAccountsFileService interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccountsFileService); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsFileService populates the provided destination StorageAccountsFileService from our StorageAccountsFileService +func (service *StorageAccountsFileService) AssignProperties_To_StorageAccountsFileService(destination *v20230101s.StorageAccountsFileService) error { + + // ObjectMeta + destination.ObjectMeta = *service.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_FileService_Spec + err := service.Spec.AssignProperties_To_StorageAccounts_FileService_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_FileService_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_FileService_STATUS + err = service.Status.AssignProperties_To_StorageAccounts_FileService_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_FileService_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForStorageAccountsFileService interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccountsFileService); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (service *StorageAccountsFileService) OriginalGVK() *schema.GroupVersionKind { @@ -137,6 +225,11 @@ type StorageAccountsFileServiceList struct { Items []StorageAccountsFileService `json:"items"` } +type augmentConversionForStorageAccountsFileService interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountsFileService) error + AssignPropertiesTo(dst *v20230101s.StorageAccountsFileService) error +} + // Storage version of v1api20220901.StorageAccounts_FileService_Spec type StorageAccounts_FileService_Spec struct { Cors *CorsRules `json:"cors,omitempty"` @@ -156,20 +249,194 @@ var _ genruntime.ConvertibleSpec = &StorageAccounts_FileService_Spec{} // ConvertSpecFrom populates our StorageAccounts_FileService_Spec from the provided source func (service *StorageAccounts_FileService_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + src, ok := source.(*v20230101s.StorageAccounts_FileService_Spec) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_FileService_Spec(src) } - return source.ConvertSpecTo(service) + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_FileService_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_FileService_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil } // ConvertSpecTo populates the provided destination from our StorageAccounts_FileService_Spec func (service *StorageAccounts_FileService_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + dst, ok := destination.(*v20230101s.StorageAccounts_FileService_Spec) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_FileService_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_FileService_Spec{} + err := service.AssignProperties_To_StorageAccounts_FileService_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_FileService_Spec populates our StorageAccounts_FileService_Spec from the provided source StorageAccounts_FileService_Spec +func (service *StorageAccounts_FileService_Spec) AssignProperties_From_StorageAccounts_FileService_Spec(source *v20230101s.StorageAccounts_FileService_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Cors + if source.Cors != nil { + var cor CorsRules + err := cor.AssignProperties_From_CorsRules(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // OriginalVersion + service.OriginalVersion = source.OriginalVersion + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + service.Owner = &owner + } else { + service.Owner = nil + } + + // ProtocolSettings + if source.ProtocolSettings != nil { + var protocolSetting ProtocolSettings + err := protocolSetting.AssignProperties_From_ProtocolSettings(source.ProtocolSettings) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ProtocolSettings() to populate field ProtocolSettings") + } + service.ProtocolSettings = &protocolSetting + } else { + service.ProtocolSettings = nil + } + + // ShareDeleteRetentionPolicy + if source.ShareDeleteRetentionPolicy != nil { + var shareDeleteRetentionPolicy DeleteRetentionPolicy + err := shareDeleteRetentionPolicy.AssignProperties_From_DeleteRetentionPolicy(source.ShareDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DeleteRetentionPolicy() to populate field ShareDeleteRetentionPolicy") + } + service.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy + } else { + service.ShareDeleteRetentionPolicy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + service.PropertyBag = propertyBag + } else { + service.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_FileService_Spec interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_FileService_Spec); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_FileService_Spec populates the provided destination StorageAccounts_FileService_Spec from our StorageAccounts_FileService_Spec +func (service *StorageAccounts_FileService_Spec) AssignProperties_To_StorageAccounts_FileService_Spec(destination *v20230101s.StorageAccounts_FileService_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(service.PropertyBag) + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules + err := service.Cors.AssignProperties_To_CorsRules(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil } - return destination.ConvertSpecFrom(service) + // OriginalVersion + destination.OriginalVersion = service.OriginalVersion + + // Owner + if service.Owner != nil { + owner := service.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // ProtocolSettings + if service.ProtocolSettings != nil { + var protocolSetting v20230101s.ProtocolSettings + err := service.ProtocolSettings.AssignProperties_To_ProtocolSettings(&protocolSetting) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ProtocolSettings() to populate field ProtocolSettings") + } + destination.ProtocolSettings = &protocolSetting + } else { + destination.ProtocolSettings = nil + } + + // ShareDeleteRetentionPolicy + if service.ShareDeleteRetentionPolicy != nil { + var shareDeleteRetentionPolicy v20230101s.DeleteRetentionPolicy + err := service.ShareDeleteRetentionPolicy.AssignProperties_To_DeleteRetentionPolicy(&shareDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DeleteRetentionPolicy() to populate field ShareDeleteRetentionPolicy") + } + destination.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy + } else { + destination.ShareDeleteRetentionPolicy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_FileService_Spec interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_FileService_Spec); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } // Storage version of v1api20220901.StorageAccounts_FileService_STATUS @@ -189,20 +456,230 @@ var _ genruntime.ConvertibleStatus = &StorageAccounts_FileService_STATUS{} // ConvertStatusFrom populates our StorageAccounts_FileService_STATUS from the provided source func (service *StorageAccounts_FileService_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + src, ok := source.(*v20230101s.StorageAccounts_FileService_STATUS) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_FileService_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_FileService_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") } - return source.ConvertStatusTo(service) + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_FileService_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil } // ConvertStatusTo populates the provided destination from our StorageAccounts_FileService_STATUS func (service *StorageAccounts_FileService_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + dst, ok := destination.(*v20230101s.StorageAccounts_FileService_STATUS) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_FileService_STATUS(dst) } - return destination.ConvertStatusFrom(service) + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_FileService_STATUS{} + err := service.AssignProperties_To_StorageAccounts_FileService_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_FileService_STATUS populates our StorageAccounts_FileService_STATUS from the provided source StorageAccounts_FileService_STATUS +func (service *StorageAccounts_FileService_STATUS) AssignProperties_From_StorageAccounts_FileService_STATUS(source *v20230101s.StorageAccounts_FileService_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Conditions + service.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Cors + if source.Cors != nil { + var cor CorsRules_STATUS + err := cor.AssignProperties_From_CorsRules_STATUS(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules_STATUS() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // Id + service.Id = genruntime.ClonePointerToString(source.Id) + + // Name + service.Name = genruntime.ClonePointerToString(source.Name) + + // ProtocolSettings + if source.ProtocolSettings != nil { + var protocolSetting ProtocolSettings_STATUS + err := protocolSetting.AssignProperties_From_ProtocolSettings_STATUS(source.ProtocolSettings) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ProtocolSettings_STATUS() to populate field ProtocolSettings") + } + service.ProtocolSettings = &protocolSetting + } else { + service.ProtocolSettings = nil + } + + // ShareDeleteRetentionPolicy + if source.ShareDeleteRetentionPolicy != nil { + var shareDeleteRetentionPolicy DeleteRetentionPolicy_STATUS + err := shareDeleteRetentionPolicy.AssignProperties_From_DeleteRetentionPolicy_STATUS(source.ShareDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DeleteRetentionPolicy_STATUS() to populate field ShareDeleteRetentionPolicy") + } + service.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy + } else { + service.ShareDeleteRetentionPolicy = nil + } + + // Sku + if source.Sku != nil { + var sku Sku_STATUS + err := sku.AssignProperties_From_Sku_STATUS(source.Sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Sku_STATUS() to populate field Sku") + } + service.Sku = &sku + } else { + service.Sku = nil + } + + // Type + service.Type = genruntime.ClonePointerToString(source.Type) + + // Update the property bag + if len(propertyBag) > 0 { + service.PropertyBag = propertyBag + } else { + service.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_FileService_STATUS interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_FileService_STATUS); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_FileService_STATUS populates the provided destination StorageAccounts_FileService_STATUS from our StorageAccounts_FileService_STATUS +func (service *StorageAccounts_FileService_STATUS) AssignProperties_To_StorageAccounts_FileService_STATUS(destination *v20230101s.StorageAccounts_FileService_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(service.PropertyBag) + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(service.Conditions) + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules_STATUS + err := service.Cors.AssignProperties_To_CorsRules_STATUS(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules_STATUS() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(service.Id) + + // Name + destination.Name = genruntime.ClonePointerToString(service.Name) + + // ProtocolSettings + if service.ProtocolSettings != nil { + var protocolSetting v20230101s.ProtocolSettings_STATUS + err := service.ProtocolSettings.AssignProperties_To_ProtocolSettings_STATUS(&protocolSetting) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ProtocolSettings_STATUS() to populate field ProtocolSettings") + } + destination.ProtocolSettings = &protocolSetting + } else { + destination.ProtocolSettings = nil + } + + // ShareDeleteRetentionPolicy + if service.ShareDeleteRetentionPolicy != nil { + var shareDeleteRetentionPolicy v20230101s.DeleteRetentionPolicy_STATUS + err := service.ShareDeleteRetentionPolicy.AssignProperties_To_DeleteRetentionPolicy_STATUS(&shareDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DeleteRetentionPolicy_STATUS() to populate field ShareDeleteRetentionPolicy") + } + destination.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy + } else { + destination.ShareDeleteRetentionPolicy = nil + } + + // Sku + if service.Sku != nil { + var sku v20230101s.Sku_STATUS + err := service.Sku.AssignProperties_To_Sku_STATUS(&sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Sku_STATUS() to populate field Sku") + } + destination.Sku = &sku + } else { + destination.Sku = nil + } + + // Type + destination.Type = genruntime.ClonePointerToString(service.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_FileService_STATUS interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_FileService_STATUS); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForStorageAccounts_FileService_Spec interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_FileService_Spec) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_FileService_Spec) error +} + +type augmentConversionForStorageAccounts_FileService_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_FileService_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_FileService_STATUS) error } // Storage version of v1api20220901.ProtocolSettings @@ -212,6 +689,80 @@ type ProtocolSettings struct { Smb *SmbSetting `json:"smb,omitempty"` } +// AssignProperties_From_ProtocolSettings populates our ProtocolSettings from the provided source ProtocolSettings +func (settings *ProtocolSettings) AssignProperties_From_ProtocolSettings(source *v20230101s.ProtocolSettings) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Smb + if source.Smb != nil { + var smb SmbSetting + err := smb.AssignProperties_From_SmbSetting(source.Smb) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SmbSetting() to populate field Smb") + } + settings.Smb = &smb + } else { + settings.Smb = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + settings.PropertyBag = propertyBag + } else { + settings.PropertyBag = nil + } + + // Invoke the augmentConversionForProtocolSettings interface (if implemented) to customize the conversion + var settingsAsAny any = settings + if augmentedSettings, ok := settingsAsAny.(augmentConversionForProtocolSettings); ok { + err := augmentedSettings.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ProtocolSettings populates the provided destination ProtocolSettings from our ProtocolSettings +func (settings *ProtocolSettings) AssignProperties_To_ProtocolSettings(destination *v20230101s.ProtocolSettings) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(settings.PropertyBag) + + // Smb + if settings.Smb != nil { + var smb v20230101s.SmbSetting + err := settings.Smb.AssignProperties_To_SmbSetting(&smb) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SmbSetting() to populate field Smb") + } + destination.Smb = &smb + } else { + destination.Smb = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForProtocolSettings interface (if implemented) to customize the conversion + var settingsAsAny any = settings + if augmentedSettings, ok := settingsAsAny.(augmentConversionForProtocolSettings); ok { + err := augmentedSettings.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ProtocolSettings_STATUS // Protocol settings for file service type ProtocolSettings_STATUS struct { @@ -219,6 +770,90 @@ type ProtocolSettings_STATUS struct { Smb *SmbSetting_STATUS `json:"smb,omitempty"` } +// AssignProperties_From_ProtocolSettings_STATUS populates our ProtocolSettings_STATUS from the provided source ProtocolSettings_STATUS +func (settings *ProtocolSettings_STATUS) AssignProperties_From_ProtocolSettings_STATUS(source *v20230101s.ProtocolSettings_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Smb + if source.Smb != nil { + var smb SmbSetting_STATUS + err := smb.AssignProperties_From_SmbSetting_STATUS(source.Smb) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SmbSetting_STATUS() to populate field Smb") + } + settings.Smb = &smb + } else { + settings.Smb = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + settings.PropertyBag = propertyBag + } else { + settings.PropertyBag = nil + } + + // Invoke the augmentConversionForProtocolSettings_STATUS interface (if implemented) to customize the conversion + var settingsAsAny any = settings + if augmentedSettings, ok := settingsAsAny.(augmentConversionForProtocolSettings_STATUS); ok { + err := augmentedSettings.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ProtocolSettings_STATUS populates the provided destination ProtocolSettings_STATUS from our ProtocolSettings_STATUS +func (settings *ProtocolSettings_STATUS) AssignProperties_To_ProtocolSettings_STATUS(destination *v20230101s.ProtocolSettings_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(settings.PropertyBag) + + // Smb + if settings.Smb != nil { + var smb v20230101s.SmbSetting_STATUS + err := settings.Smb.AssignProperties_To_SmbSetting_STATUS(&smb) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SmbSetting_STATUS() to populate field Smb") + } + destination.Smb = &smb + } else { + destination.Smb = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForProtocolSettings_STATUS interface (if implemented) to customize the conversion + var settingsAsAny any = settings + if augmentedSettings, ok := settingsAsAny.(augmentConversionForProtocolSettings_STATUS); ok { + err := augmentedSettings.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForProtocolSettings interface { + AssignPropertiesFrom(src *v20230101s.ProtocolSettings) error + AssignPropertiesTo(dst *v20230101s.ProtocolSettings) error +} + +type augmentConversionForProtocolSettings_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ProtocolSettings_STATUS) error + AssignPropertiesTo(dst *v20230101s.ProtocolSettings_STATUS) error +} + // Storage version of v1api20220901.SmbSetting // Setting for SMB protocol type SmbSetting struct { @@ -230,6 +865,104 @@ type SmbSetting struct { Versions *string `json:"versions,omitempty"` } +// AssignProperties_From_SmbSetting populates our SmbSetting from the provided source SmbSetting +func (setting *SmbSetting) AssignProperties_From_SmbSetting(source *v20230101s.SmbSetting) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AuthenticationMethods + setting.AuthenticationMethods = genruntime.ClonePointerToString(source.AuthenticationMethods) + + // ChannelEncryption + setting.ChannelEncryption = genruntime.ClonePointerToString(source.ChannelEncryption) + + // KerberosTicketEncryption + setting.KerberosTicketEncryption = genruntime.ClonePointerToString(source.KerberosTicketEncryption) + + // Multichannel + if source.Multichannel != nil { + var multichannel Multichannel + err := multichannel.AssignProperties_From_Multichannel(source.Multichannel) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Multichannel() to populate field Multichannel") + } + setting.Multichannel = &multichannel + } else { + setting.Multichannel = nil + } + + // Versions + setting.Versions = genruntime.ClonePointerToString(source.Versions) + + // Update the property bag + if len(propertyBag) > 0 { + setting.PropertyBag = propertyBag + } else { + setting.PropertyBag = nil + } + + // Invoke the augmentConversionForSmbSetting interface (if implemented) to customize the conversion + var settingAsAny any = setting + if augmentedSetting, ok := settingAsAny.(augmentConversionForSmbSetting); ok { + err := augmentedSetting.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_SmbSetting populates the provided destination SmbSetting from our SmbSetting +func (setting *SmbSetting) AssignProperties_To_SmbSetting(destination *v20230101s.SmbSetting) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(setting.PropertyBag) + + // AuthenticationMethods + destination.AuthenticationMethods = genruntime.ClonePointerToString(setting.AuthenticationMethods) + + // ChannelEncryption + destination.ChannelEncryption = genruntime.ClonePointerToString(setting.ChannelEncryption) + + // KerberosTicketEncryption + destination.KerberosTicketEncryption = genruntime.ClonePointerToString(setting.KerberosTicketEncryption) + + // Multichannel + if setting.Multichannel != nil { + var multichannel v20230101s.Multichannel + err := setting.Multichannel.AssignProperties_To_Multichannel(&multichannel) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Multichannel() to populate field Multichannel") + } + destination.Multichannel = &multichannel + } else { + destination.Multichannel = nil + } + + // Versions + destination.Versions = genruntime.ClonePointerToString(setting.Versions) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSmbSetting interface (if implemented) to customize the conversion + var settingAsAny any = setting + if augmentedSetting, ok := settingAsAny.(augmentConversionForSmbSetting); ok { + err := augmentedSetting.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.SmbSetting_STATUS // Setting for SMB protocol type SmbSetting_STATUS struct { @@ -241,6 +974,114 @@ type SmbSetting_STATUS struct { Versions *string `json:"versions,omitempty"` } +// AssignProperties_From_SmbSetting_STATUS populates our SmbSetting_STATUS from the provided source SmbSetting_STATUS +func (setting *SmbSetting_STATUS) AssignProperties_From_SmbSetting_STATUS(source *v20230101s.SmbSetting_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AuthenticationMethods + setting.AuthenticationMethods = genruntime.ClonePointerToString(source.AuthenticationMethods) + + // ChannelEncryption + setting.ChannelEncryption = genruntime.ClonePointerToString(source.ChannelEncryption) + + // KerberosTicketEncryption + setting.KerberosTicketEncryption = genruntime.ClonePointerToString(source.KerberosTicketEncryption) + + // Multichannel + if source.Multichannel != nil { + var multichannel Multichannel_STATUS + err := multichannel.AssignProperties_From_Multichannel_STATUS(source.Multichannel) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Multichannel_STATUS() to populate field Multichannel") + } + setting.Multichannel = &multichannel + } else { + setting.Multichannel = nil + } + + // Versions + setting.Versions = genruntime.ClonePointerToString(source.Versions) + + // Update the property bag + if len(propertyBag) > 0 { + setting.PropertyBag = propertyBag + } else { + setting.PropertyBag = nil + } + + // Invoke the augmentConversionForSmbSetting_STATUS interface (if implemented) to customize the conversion + var settingAsAny any = setting + if augmentedSetting, ok := settingAsAny.(augmentConversionForSmbSetting_STATUS); ok { + err := augmentedSetting.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_SmbSetting_STATUS populates the provided destination SmbSetting_STATUS from our SmbSetting_STATUS +func (setting *SmbSetting_STATUS) AssignProperties_To_SmbSetting_STATUS(destination *v20230101s.SmbSetting_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(setting.PropertyBag) + + // AuthenticationMethods + destination.AuthenticationMethods = genruntime.ClonePointerToString(setting.AuthenticationMethods) + + // ChannelEncryption + destination.ChannelEncryption = genruntime.ClonePointerToString(setting.ChannelEncryption) + + // KerberosTicketEncryption + destination.KerberosTicketEncryption = genruntime.ClonePointerToString(setting.KerberosTicketEncryption) + + // Multichannel + if setting.Multichannel != nil { + var multichannel v20230101s.Multichannel_STATUS + err := setting.Multichannel.AssignProperties_To_Multichannel_STATUS(&multichannel) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Multichannel_STATUS() to populate field Multichannel") + } + destination.Multichannel = &multichannel + } else { + destination.Multichannel = nil + } + + // Versions + destination.Versions = genruntime.ClonePointerToString(setting.Versions) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSmbSetting_STATUS interface (if implemented) to customize the conversion + var settingAsAny any = setting + if augmentedSetting, ok := settingAsAny.(augmentConversionForSmbSetting_STATUS); ok { + err := augmentedSetting.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForSmbSetting interface { + AssignPropertiesFrom(src *v20230101s.SmbSetting) error + AssignPropertiesTo(dst *v20230101s.SmbSetting) error +} + +type augmentConversionForSmbSetting_STATUS interface { + AssignPropertiesFrom(src *v20230101s.SmbSetting_STATUS) error + AssignPropertiesTo(dst *v20230101s.SmbSetting_STATUS) error +} + // Storage version of v1api20220901.Multichannel // Multichannel setting. Applies to Premium FileStorage only. type Multichannel struct { @@ -248,6 +1089,72 @@ type Multichannel struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_Multichannel populates our Multichannel from the provided source Multichannel +func (multichannel *Multichannel) AssignProperties_From_Multichannel(source *v20230101s.Multichannel) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + multichannel.Enabled = &enabled + } else { + multichannel.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + multichannel.PropertyBag = propertyBag + } else { + multichannel.PropertyBag = nil + } + + // Invoke the augmentConversionForMultichannel interface (if implemented) to customize the conversion + var multichannelAsAny any = multichannel + if augmentedMultichannel, ok := multichannelAsAny.(augmentConversionForMultichannel); ok { + err := augmentedMultichannel.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Multichannel populates the provided destination Multichannel from our Multichannel +func (multichannel *Multichannel) AssignProperties_To_Multichannel(destination *v20230101s.Multichannel) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(multichannel.PropertyBag) + + // Enabled + if multichannel.Enabled != nil { + enabled := *multichannel.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForMultichannel interface (if implemented) to customize the conversion + var multichannelAsAny any = multichannel + if augmentedMultichannel, ok := multichannelAsAny.(augmentConversionForMultichannel); ok { + err := augmentedMultichannel.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.Multichannel_STATUS // Multichannel setting. Applies to Premium FileStorage only. type Multichannel_STATUS struct { @@ -255,6 +1162,82 @@ type Multichannel_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_Multichannel_STATUS populates our Multichannel_STATUS from the provided source Multichannel_STATUS +func (multichannel *Multichannel_STATUS) AssignProperties_From_Multichannel_STATUS(source *v20230101s.Multichannel_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + multichannel.Enabled = &enabled + } else { + multichannel.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + multichannel.PropertyBag = propertyBag + } else { + multichannel.PropertyBag = nil + } + + // Invoke the augmentConversionForMultichannel_STATUS interface (if implemented) to customize the conversion + var multichannelAsAny any = multichannel + if augmentedMultichannel, ok := multichannelAsAny.(augmentConversionForMultichannel_STATUS); ok { + err := augmentedMultichannel.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Multichannel_STATUS populates the provided destination Multichannel_STATUS from our Multichannel_STATUS +func (multichannel *Multichannel_STATUS) AssignProperties_To_Multichannel_STATUS(destination *v20230101s.Multichannel_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(multichannel.PropertyBag) + + // Enabled + if multichannel.Enabled != nil { + enabled := *multichannel.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForMultichannel_STATUS interface (if implemented) to customize the conversion + var multichannelAsAny any = multichannel + if augmentedMultichannel, ok := multichannelAsAny.(augmentConversionForMultichannel_STATUS); ok { + err := augmentedMultichannel.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForMultichannel interface { + AssignPropertiesFrom(src *v20230101s.Multichannel) error + AssignPropertiesTo(dst *v20230101s.Multichannel) error +} + +type augmentConversionForMultichannel_STATUS interface { + AssignPropertiesFrom(src *v20230101s.Multichannel_STATUS) error + AssignPropertiesTo(dst *v20230101s.Multichannel_STATUS) error +} + func init() { SchemeBuilder.Register(&StorageAccountsFileService{}, &StorageAccountsFileServiceList{}) } diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_file_service_types_gen_test.go b/v2/api/storage/v1api20220901/storage/storage_accounts_file_service_types_gen_test.go index 5034b561ec1..798ec5d323d 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_file_service_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_file_service_types_gen_test.go @@ -5,6 +5,7 @@ package storage import ( "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -17,6 +18,91 @@ import ( "testing" ) +func Test_StorageAccountsFileService_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsFileService to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsFileService, StorageAccountsFileServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsFileService tests if a specific instance of StorageAccountsFileService round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsFileService(subject StorageAccountsFileService) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsFileService + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsFileService + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsFileService_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsFileService to StorageAccountsFileService via AssignProperties_To_StorageAccountsFileService & AssignProperties_From_StorageAccountsFileService returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsFileService, StorageAccountsFileServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsFileService tests if a specific instance of StorageAccountsFileService can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsFileService(subject StorageAccountsFileService) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsFileService + err := copied.AssignProperties_To_StorageAccountsFileService(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsFileService + err = actual.AssignProperties_From_StorageAccountsFileService(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountsFileService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -79,6 +165,48 @@ func AddRelatedPropertyGeneratorsForStorageAccountsFileService(gens map[string]g gens["Status"] = StorageAccounts_FileService_STATUSGenerator() } +func Test_StorageAccounts_FileService_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_FileService_Spec to StorageAccounts_FileService_Spec via AssignProperties_To_StorageAccounts_FileService_Spec & AssignProperties_From_StorageAccounts_FileService_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_FileService_Spec, StorageAccounts_FileService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_FileService_Spec tests if a specific instance of StorageAccounts_FileService_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_FileService_Spec(subject StorageAccounts_FileService_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_FileService_Spec + err := copied.AssignProperties_To_StorageAccounts_FileService_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_FileService_Spec + err = actual.AssignProperties_From_StorageAccounts_FileService_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_FileService_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -156,6 +284,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Spec(gens map[st gens["ShareDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicyGenerator()) } +func Test_StorageAccounts_FileService_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_FileService_STATUS to StorageAccounts_FileService_STATUS via AssignProperties_To_StorageAccounts_FileService_STATUS & AssignProperties_From_StorageAccounts_FileService_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_FileService_STATUS, StorageAccounts_FileService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_FileService_STATUS tests if a specific instance of StorageAccounts_FileService_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_FileService_STATUS(subject StorageAccounts_FileService_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_FileService_STATUS + err := copied.AssignProperties_To_StorageAccounts_FileService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_FileService_STATUS + err = actual.AssignProperties_From_StorageAccounts_FileService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_FileService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -236,6 +406,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_FileService_STATUS(gens map[ gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator()) } +func Test_ProtocolSettings_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ProtocolSettings to ProtocolSettings via AssignProperties_To_ProtocolSettings & AssignProperties_From_ProtocolSettings returns original", + prop.ForAll(RunPropertyAssignmentTestForProtocolSettings, ProtocolSettingsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForProtocolSettings tests if a specific instance of ProtocolSettings can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForProtocolSettings(subject ProtocolSettings) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ProtocolSettings + err := copied.AssignProperties_To_ProtocolSettings(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ProtocolSettings + err = actual.AssignProperties_From_ProtocolSettings(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ProtocolSettings_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -296,6 +508,48 @@ func AddRelatedPropertyGeneratorsForProtocolSettings(gens map[string]gopter.Gen) gens["Smb"] = gen.PtrOf(SmbSettingGenerator()) } +func Test_ProtocolSettings_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ProtocolSettings_STATUS to ProtocolSettings_STATUS via AssignProperties_To_ProtocolSettings_STATUS & AssignProperties_From_ProtocolSettings_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForProtocolSettings_STATUS, ProtocolSettings_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForProtocolSettings_STATUS tests if a specific instance of ProtocolSettings_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForProtocolSettings_STATUS(subject ProtocolSettings_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ProtocolSettings_STATUS + err := copied.AssignProperties_To_ProtocolSettings_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ProtocolSettings_STATUS + err = actual.AssignProperties_From_ProtocolSettings_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ProtocolSettings_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -357,6 +611,48 @@ func AddRelatedPropertyGeneratorsForProtocolSettings_STATUS(gens map[string]gopt gens["Smb"] = gen.PtrOf(SmbSetting_STATUSGenerator()) } +func Test_SmbSetting_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SmbSetting to SmbSetting via AssignProperties_To_SmbSetting & AssignProperties_From_SmbSetting returns original", + prop.ForAll(RunPropertyAssignmentTestForSmbSetting, SmbSettingGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSmbSetting tests if a specific instance of SmbSetting can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSmbSetting(subject SmbSetting) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.SmbSetting + err := copied.AssignProperties_To_SmbSetting(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SmbSetting + err = actual.AssignProperties_From_SmbSetting(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_SmbSetting_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -434,6 +730,48 @@ func AddRelatedPropertyGeneratorsForSmbSetting(gens map[string]gopter.Gen) { gens["Multichannel"] = gen.PtrOf(MultichannelGenerator()) } +func Test_SmbSetting_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SmbSetting_STATUS to SmbSetting_STATUS via AssignProperties_To_SmbSetting_STATUS & AssignProperties_From_SmbSetting_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSmbSetting_STATUS, SmbSetting_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSmbSetting_STATUS tests if a specific instance of SmbSetting_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSmbSetting_STATUS(subject SmbSetting_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.SmbSetting_STATUS + err := copied.AssignProperties_To_SmbSetting_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SmbSetting_STATUS + err = actual.AssignProperties_From_SmbSetting_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_SmbSetting_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -511,6 +849,48 @@ func AddRelatedPropertyGeneratorsForSmbSetting_STATUS(gens map[string]gopter.Gen gens["Multichannel"] = gen.PtrOf(Multichannel_STATUSGenerator()) } +func Test_Multichannel_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Multichannel to Multichannel via AssignProperties_To_Multichannel & AssignProperties_From_Multichannel returns original", + prop.ForAll(RunPropertyAssignmentTestForMultichannel, MultichannelGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForMultichannel tests if a specific instance of Multichannel can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForMultichannel(subject Multichannel) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Multichannel + err := copied.AssignProperties_To_Multichannel(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Multichannel + err = actual.AssignProperties_From_Multichannel(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_Multichannel_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -571,6 +951,48 @@ func AddIndependentPropertyGeneratorsForMultichannel(gens map[string]gopter.Gen) gens["Enabled"] = gen.PtrOf(gen.Bool()) } +func Test_Multichannel_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Multichannel_STATUS to Multichannel_STATUS via AssignProperties_To_Multichannel_STATUS & AssignProperties_From_Multichannel_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForMultichannel_STATUS, Multichannel_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForMultichannel_STATUS tests if a specific instance of Multichannel_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForMultichannel_STATUS(subject Multichannel_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Multichannel_STATUS + err := copied.AssignProperties_To_Multichannel_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Multichannel_STATUS + err = actual.AssignProperties_From_Multichannel_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_Multichannel_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_file_services_share_types_gen.go b/v2/api/storage/v1api20220901/storage/storage_accounts_file_services_share_types_gen.go index b9b3955ee23..c9751dc4b37 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_file_services_share_types_gen.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_file_services_share_types_gen.go @@ -4,19 +4,18 @@ package storage import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" ) -// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsfileservicesshares,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsfileservicesshares/status,storageaccountsfileservicesshares/finalizers},verbs=get;update;patch - // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" @@ -44,6 +43,28 @@ func (share *StorageAccountsFileServicesShare) SetConditions(conditions conditio share.Status.Conditions = conditions } +var _ conversion.Convertible = &StorageAccountsFileServicesShare{} + +// ConvertFrom populates our StorageAccountsFileServicesShare from the provided hub StorageAccountsFileServicesShare +func (share *StorageAccountsFileServicesShare) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsFileServicesShare) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsFileServicesShare but received %T instead", hub) + } + + return share.AssignProperties_From_StorageAccountsFileServicesShare(source) +} + +// ConvertTo populates the provided hub StorageAccountsFileServicesShare from our StorageAccountsFileServicesShare +func (share *StorageAccountsFileServicesShare) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsFileServicesShare) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsFileServicesShare but received %T instead", hub) + } + + return share.AssignProperties_To_StorageAccountsFileServicesShare(destination) +} + var _ genruntime.KubernetesResource = &StorageAccountsFileServicesShare{} // AzureName returns the Azure name of the resource @@ -115,8 +136,75 @@ func (share *StorageAccountsFileServicesShare) SetStatus(status genruntime.Conve return nil } -// Hub marks that this StorageAccountsFileServicesShare is the hub type for conversion -func (share *StorageAccountsFileServicesShare) Hub() {} +// AssignProperties_From_StorageAccountsFileServicesShare populates our StorageAccountsFileServicesShare from the provided source StorageAccountsFileServicesShare +func (share *StorageAccountsFileServicesShare) AssignProperties_From_StorageAccountsFileServicesShare(source *v20230101s.StorageAccountsFileServicesShare) error { + + // ObjectMeta + share.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_FileServices_Share_Spec + err := spec.AssignProperties_From_StorageAccounts_FileServices_Share_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_FileServices_Share_Spec() to populate field Spec") + } + share.Spec = spec + + // Status + var status StorageAccounts_FileServices_Share_STATUS + err = status.AssignProperties_From_StorageAccounts_FileServices_Share_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_FileServices_Share_STATUS() to populate field Status") + } + share.Status = status + + // Invoke the augmentConversionForStorageAccountsFileServicesShare interface (if implemented) to customize the conversion + var shareAsAny any = share + if augmentedShare, ok := shareAsAny.(augmentConversionForStorageAccountsFileServicesShare); ok { + err := augmentedShare.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsFileServicesShare populates the provided destination StorageAccountsFileServicesShare from our StorageAccountsFileServicesShare +func (share *StorageAccountsFileServicesShare) AssignProperties_To_StorageAccountsFileServicesShare(destination *v20230101s.StorageAccountsFileServicesShare) error { + + // ObjectMeta + destination.ObjectMeta = *share.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_FileServices_Share_Spec + err := share.Spec.AssignProperties_To_StorageAccounts_FileServices_Share_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_FileServices_Share_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_FileServices_Share_STATUS + err = share.Status.AssignProperties_To_StorageAccounts_FileServices_Share_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_FileServices_Share_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForStorageAccountsFileServicesShare interface (if implemented) to customize the conversion + var shareAsAny any = share + if augmentedShare, ok := shareAsAny.(augmentConversionForStorageAccountsFileServicesShare); ok { + err := augmentedShare.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (share *StorageAccountsFileServicesShare) OriginalGVK() *schema.GroupVersionKind { @@ -138,12 +226,15 @@ type StorageAccountsFileServicesShareList struct { Items []StorageAccountsFileServicesShare `json:"items"` } +type augmentConversionForStorageAccountsFileServicesShare interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountsFileServicesShare) error + AssignPropertiesTo(dst *v20230101s.StorageAccountsFileServicesShare) error +} + // Storage version of v1api20220901.StorageAccounts_FileServices_Share_Spec type StorageAccounts_FileServices_Share_Spec struct { AccessTier *string `json:"accessTier,omitempty"` - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=3 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` @@ -166,20 +257,194 @@ var _ genruntime.ConvertibleSpec = &StorageAccounts_FileServices_Share_Spec{} // ConvertSpecFrom populates our StorageAccounts_FileServices_Share_Spec from the provided source func (share *StorageAccounts_FileServices_Share_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == share { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + src, ok := source.(*v20230101s.StorageAccounts_FileServices_Share_Spec) + if ok { + // Populate our instance from source + return share.AssignProperties_From_StorageAccounts_FileServices_Share_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_FileServices_Share_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = share.AssignProperties_From_StorageAccounts_FileServices_Share_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") } - return source.ConvertSpecTo(share) + return nil } // ConvertSpecTo populates the provided destination from our StorageAccounts_FileServices_Share_Spec func (share *StorageAccounts_FileServices_Share_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == share { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + dst, ok := destination.(*v20230101s.StorageAccounts_FileServices_Share_Spec) + if ok { + // Populate destination from our instance + return share.AssignProperties_To_StorageAccounts_FileServices_Share_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_FileServices_Share_Spec{} + err := share.AssignProperties_To_StorageAccounts_FileServices_Share_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_FileServices_Share_Spec populates our StorageAccounts_FileServices_Share_Spec from the provided source StorageAccounts_FileServices_Share_Spec +func (share *StorageAccounts_FileServices_Share_Spec) AssignProperties_From_StorageAccounts_FileServices_Share_Spec(source *v20230101s.StorageAccounts_FileServices_Share_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AccessTier + share.AccessTier = genruntime.ClonePointerToString(source.AccessTier) + + // AzureName + share.AzureName = source.AzureName + + // EnabledProtocols + share.EnabledProtocols = genruntime.ClonePointerToString(source.EnabledProtocols) + + // Metadata + share.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // OriginalVersion + share.OriginalVersion = source.OriginalVersion + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + share.Owner = &owner + } else { + share.Owner = nil + } + + // RootSquash + share.RootSquash = genruntime.ClonePointerToString(source.RootSquash) + + // ShareQuota + share.ShareQuota = genruntime.ClonePointerToInt(source.ShareQuota) + + // SignedIdentifiers + if source.SignedIdentifiers != nil { + signedIdentifierList := make([]SignedIdentifier, len(source.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range source.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier SignedIdentifier + err := signedIdentifier.AssignProperties_From_SignedIdentifier(&signedIdentifierItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SignedIdentifier() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + share.SignedIdentifiers = signedIdentifierList + } else { + share.SignedIdentifiers = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + share.PropertyBag = propertyBag + } else { + share.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_FileServices_Share_Spec interface (if implemented) to customize the conversion + var shareAsAny any = share + if augmentedShare, ok := shareAsAny.(augmentConversionForStorageAccounts_FileServices_Share_Spec); ok { + err := augmentedShare.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_FileServices_Share_Spec populates the provided destination StorageAccounts_FileServices_Share_Spec from our StorageAccounts_FileServices_Share_Spec +func (share *StorageAccounts_FileServices_Share_Spec) AssignProperties_To_StorageAccounts_FileServices_Share_Spec(destination *v20230101s.StorageAccounts_FileServices_Share_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(share.PropertyBag) + + // AccessTier + destination.AccessTier = genruntime.ClonePointerToString(share.AccessTier) + + // AzureName + destination.AzureName = share.AzureName + + // EnabledProtocols + destination.EnabledProtocols = genruntime.ClonePointerToString(share.EnabledProtocols) + + // Metadata + destination.Metadata = genruntime.CloneMapOfStringToString(share.Metadata) + + // OriginalVersion + destination.OriginalVersion = share.OriginalVersion + + // Owner + if share.Owner != nil { + owner := share.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // RootSquash + destination.RootSquash = genruntime.ClonePointerToString(share.RootSquash) + + // ShareQuota + destination.ShareQuota = genruntime.ClonePointerToInt(share.ShareQuota) + + // SignedIdentifiers + if share.SignedIdentifiers != nil { + signedIdentifierList := make([]v20230101s.SignedIdentifier, len(share.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range share.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier v20230101s.SignedIdentifier + err := signedIdentifierItem.AssignProperties_To_SignedIdentifier(&signedIdentifier) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SignedIdentifier() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + destination.SignedIdentifiers = signedIdentifierList + } else { + destination.SignedIdentifiers = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_FileServices_Share_Spec interface (if implemented) to customize the conversion + var shareAsAny any = share + if augmentedShare, ok := shareAsAny.(augmentConversionForStorageAccounts_FileServices_Share_Spec); ok { + err := augmentedShare.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } } - return destination.ConvertSpecFrom(share) + // No error + return nil } // Storage version of v1api20220901.StorageAccounts_FileServices_Share_STATUS @@ -214,20 +479,288 @@ var _ genruntime.ConvertibleStatus = &StorageAccounts_FileServices_Share_STATUS{ // ConvertStatusFrom populates our StorageAccounts_FileServices_Share_STATUS from the provided source func (share *StorageAccounts_FileServices_Share_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == share { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + src, ok := source.(*v20230101s.StorageAccounts_FileServices_Share_STATUS) + if ok { + // Populate our instance from source + return share.AssignProperties_From_StorageAccounts_FileServices_Share_STATUS(src) } - return source.ConvertStatusTo(share) + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_FileServices_Share_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = share.AssignProperties_From_StorageAccounts_FileServices_Share_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil } // ConvertStatusTo populates the provided destination from our StorageAccounts_FileServices_Share_STATUS func (share *StorageAccounts_FileServices_Share_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == share { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + dst, ok := destination.(*v20230101s.StorageAccounts_FileServices_Share_STATUS) + if ok { + // Populate destination from our instance + return share.AssignProperties_To_StorageAccounts_FileServices_Share_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_FileServices_Share_STATUS{} + err := share.AssignProperties_To_StorageAccounts_FileServices_Share_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") } - return destination.ConvertStatusFrom(share) + return nil +} + +// AssignProperties_From_StorageAccounts_FileServices_Share_STATUS populates our StorageAccounts_FileServices_Share_STATUS from the provided source StorageAccounts_FileServices_Share_STATUS +func (share *StorageAccounts_FileServices_Share_STATUS) AssignProperties_From_StorageAccounts_FileServices_Share_STATUS(source *v20230101s.StorageAccounts_FileServices_Share_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AccessTier + share.AccessTier = genruntime.ClonePointerToString(source.AccessTier) + + // AccessTierChangeTime + share.AccessTierChangeTime = genruntime.ClonePointerToString(source.AccessTierChangeTime) + + // AccessTierStatus + share.AccessTierStatus = genruntime.ClonePointerToString(source.AccessTierStatus) + + // Conditions + share.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Deleted + if source.Deleted != nil { + deleted := *source.Deleted + share.Deleted = &deleted + } else { + share.Deleted = nil + } + + // DeletedTime + share.DeletedTime = genruntime.ClonePointerToString(source.DeletedTime) + + // EnabledProtocols + share.EnabledProtocols = genruntime.ClonePointerToString(source.EnabledProtocols) + + // Etag + share.Etag = genruntime.ClonePointerToString(source.Etag) + + // Id + share.Id = genruntime.ClonePointerToString(source.Id) + + // LastModifiedTime + share.LastModifiedTime = genruntime.ClonePointerToString(source.LastModifiedTime) + + // LeaseDuration + share.LeaseDuration = genruntime.ClonePointerToString(source.LeaseDuration) + + // LeaseState + share.LeaseState = genruntime.ClonePointerToString(source.LeaseState) + + // LeaseStatus + share.LeaseStatus = genruntime.ClonePointerToString(source.LeaseStatus) + + // Metadata + share.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // Name + share.Name = genruntime.ClonePointerToString(source.Name) + + // RemainingRetentionDays + share.RemainingRetentionDays = genruntime.ClonePointerToInt(source.RemainingRetentionDays) + + // RootSquash + share.RootSquash = genruntime.ClonePointerToString(source.RootSquash) + + // ShareQuota + share.ShareQuota = genruntime.ClonePointerToInt(source.ShareQuota) + + // ShareUsageBytes + share.ShareUsageBytes = genruntime.ClonePointerToInt(source.ShareUsageBytes) + + // SignedIdentifiers + if source.SignedIdentifiers != nil { + signedIdentifierList := make([]SignedIdentifier_STATUS, len(source.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range source.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier SignedIdentifier_STATUS + err := signedIdentifier.AssignProperties_From_SignedIdentifier_STATUS(&signedIdentifierItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SignedIdentifier_STATUS() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + share.SignedIdentifiers = signedIdentifierList + } else { + share.SignedIdentifiers = nil + } + + // SnapshotTime + share.SnapshotTime = genruntime.ClonePointerToString(source.SnapshotTime) + + // Type + share.Type = genruntime.ClonePointerToString(source.Type) + + // Version + share.Version = genruntime.ClonePointerToString(source.Version) + + // Update the property bag + if len(propertyBag) > 0 { + share.PropertyBag = propertyBag + } else { + share.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_FileServices_Share_STATUS interface (if implemented) to customize the conversion + var shareAsAny any = share + if augmentedShare, ok := shareAsAny.(augmentConversionForStorageAccounts_FileServices_Share_STATUS); ok { + err := augmentedShare.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_FileServices_Share_STATUS populates the provided destination StorageAccounts_FileServices_Share_STATUS from our StorageAccounts_FileServices_Share_STATUS +func (share *StorageAccounts_FileServices_Share_STATUS) AssignProperties_To_StorageAccounts_FileServices_Share_STATUS(destination *v20230101s.StorageAccounts_FileServices_Share_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(share.PropertyBag) + + // AccessTier + destination.AccessTier = genruntime.ClonePointerToString(share.AccessTier) + + // AccessTierChangeTime + destination.AccessTierChangeTime = genruntime.ClonePointerToString(share.AccessTierChangeTime) + + // AccessTierStatus + destination.AccessTierStatus = genruntime.ClonePointerToString(share.AccessTierStatus) + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(share.Conditions) + + // Deleted + if share.Deleted != nil { + deleted := *share.Deleted + destination.Deleted = &deleted + } else { + destination.Deleted = nil + } + + // DeletedTime + destination.DeletedTime = genruntime.ClonePointerToString(share.DeletedTime) + + // EnabledProtocols + destination.EnabledProtocols = genruntime.ClonePointerToString(share.EnabledProtocols) + + // Etag + destination.Etag = genruntime.ClonePointerToString(share.Etag) + + // Id + destination.Id = genruntime.ClonePointerToString(share.Id) + + // LastModifiedTime + destination.LastModifiedTime = genruntime.ClonePointerToString(share.LastModifiedTime) + + // LeaseDuration + destination.LeaseDuration = genruntime.ClonePointerToString(share.LeaseDuration) + + // LeaseState + destination.LeaseState = genruntime.ClonePointerToString(share.LeaseState) + + // LeaseStatus + destination.LeaseStatus = genruntime.ClonePointerToString(share.LeaseStatus) + + // Metadata + destination.Metadata = genruntime.CloneMapOfStringToString(share.Metadata) + + // Name + destination.Name = genruntime.ClonePointerToString(share.Name) + + // RemainingRetentionDays + destination.RemainingRetentionDays = genruntime.ClonePointerToInt(share.RemainingRetentionDays) + + // RootSquash + destination.RootSquash = genruntime.ClonePointerToString(share.RootSquash) + + // ShareQuota + destination.ShareQuota = genruntime.ClonePointerToInt(share.ShareQuota) + + // ShareUsageBytes + destination.ShareUsageBytes = genruntime.ClonePointerToInt(share.ShareUsageBytes) + + // SignedIdentifiers + if share.SignedIdentifiers != nil { + signedIdentifierList := make([]v20230101s.SignedIdentifier_STATUS, len(share.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range share.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier v20230101s.SignedIdentifier_STATUS + err := signedIdentifierItem.AssignProperties_To_SignedIdentifier_STATUS(&signedIdentifier) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SignedIdentifier_STATUS() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + destination.SignedIdentifiers = signedIdentifierList + } else { + destination.SignedIdentifiers = nil + } + + // SnapshotTime + destination.SnapshotTime = genruntime.ClonePointerToString(share.SnapshotTime) + + // Type + destination.Type = genruntime.ClonePointerToString(share.Type) + + // Version + destination.Version = genruntime.ClonePointerToString(share.Version) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_FileServices_Share_STATUS interface (if implemented) to customize the conversion + var shareAsAny any = share + if augmentedShare, ok := shareAsAny.(augmentConversionForStorageAccounts_FileServices_Share_STATUS); ok { + err := augmentedShare.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForStorageAccounts_FileServices_Share_Spec interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_FileServices_Share_Spec) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_FileServices_Share_Spec) error +} + +type augmentConversionForStorageAccounts_FileServices_Share_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_FileServices_Share_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_FileServices_Share_STATUS) error } // Storage version of v1api20220901.SignedIdentifier @@ -239,6 +772,96 @@ type SignedIdentifier struct { Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` } +// AssignProperties_From_SignedIdentifier populates our SignedIdentifier from the provided source SignedIdentifier +func (identifier *SignedIdentifier) AssignProperties_From_SignedIdentifier(source *v20230101s.SignedIdentifier) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AccessPolicy + if source.AccessPolicy != nil { + var accessPolicy AccessPolicy + err := accessPolicy.AssignProperties_From_AccessPolicy(source.AccessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AccessPolicy() to populate field AccessPolicy") + } + identifier.AccessPolicy = &accessPolicy + } else { + identifier.AccessPolicy = nil + } + + // Reference + if source.Reference != nil { + reference := source.Reference.Copy() + identifier.Reference = &reference + } else { + identifier.Reference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + identifier.PropertyBag = propertyBag + } else { + identifier.PropertyBag = nil + } + + // Invoke the augmentConversionForSignedIdentifier interface (if implemented) to customize the conversion + var identifierAsAny any = identifier + if augmentedIdentifier, ok := identifierAsAny.(augmentConversionForSignedIdentifier); ok { + err := augmentedIdentifier.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_SignedIdentifier populates the provided destination SignedIdentifier from our SignedIdentifier +func (identifier *SignedIdentifier) AssignProperties_To_SignedIdentifier(destination *v20230101s.SignedIdentifier) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(identifier.PropertyBag) + + // AccessPolicy + if identifier.AccessPolicy != nil { + var accessPolicy v20230101s.AccessPolicy + err := identifier.AccessPolicy.AssignProperties_To_AccessPolicy(&accessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AccessPolicy() to populate field AccessPolicy") + } + destination.AccessPolicy = &accessPolicy + } else { + destination.AccessPolicy = nil + } + + // Reference + if identifier.Reference != nil { + reference := identifier.Reference.Copy() + destination.Reference = &reference + } else { + destination.Reference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSignedIdentifier interface (if implemented) to customize the conversion + var identifierAsAny any = identifier + if augmentedIdentifier, ok := identifierAsAny.(augmentConversionForSignedIdentifier); ok { + err := augmentedIdentifier.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.SignedIdentifier_STATUS type SignedIdentifier_STATUS struct { AccessPolicy *AccessPolicy_STATUS `json:"accessPolicy,omitempty"` @@ -246,6 +869,86 @@ type SignedIdentifier_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_SignedIdentifier_STATUS populates our SignedIdentifier_STATUS from the provided source SignedIdentifier_STATUS +func (identifier *SignedIdentifier_STATUS) AssignProperties_From_SignedIdentifier_STATUS(source *v20230101s.SignedIdentifier_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AccessPolicy + if source.AccessPolicy != nil { + var accessPolicy AccessPolicy_STATUS + err := accessPolicy.AssignProperties_From_AccessPolicy_STATUS(source.AccessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AccessPolicy_STATUS() to populate field AccessPolicy") + } + identifier.AccessPolicy = &accessPolicy + } else { + identifier.AccessPolicy = nil + } + + // Id + identifier.Id = genruntime.ClonePointerToString(source.Id) + + // Update the property bag + if len(propertyBag) > 0 { + identifier.PropertyBag = propertyBag + } else { + identifier.PropertyBag = nil + } + + // Invoke the augmentConversionForSignedIdentifier_STATUS interface (if implemented) to customize the conversion + var identifierAsAny any = identifier + if augmentedIdentifier, ok := identifierAsAny.(augmentConversionForSignedIdentifier_STATUS); ok { + err := augmentedIdentifier.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_SignedIdentifier_STATUS populates the provided destination SignedIdentifier_STATUS from our SignedIdentifier_STATUS +func (identifier *SignedIdentifier_STATUS) AssignProperties_To_SignedIdentifier_STATUS(destination *v20230101s.SignedIdentifier_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(identifier.PropertyBag) + + // AccessPolicy + if identifier.AccessPolicy != nil { + var accessPolicy v20230101s.AccessPolicy_STATUS + err := identifier.AccessPolicy.AssignProperties_To_AccessPolicy_STATUS(&accessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AccessPolicy_STATUS() to populate field AccessPolicy") + } + destination.AccessPolicy = &accessPolicy + } else { + destination.AccessPolicy = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(identifier.Id) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSignedIdentifier_STATUS interface (if implemented) to customize the conversion + var identifierAsAny any = identifier + if augmentedIdentifier, ok := identifierAsAny.(augmentConversionForSignedIdentifier_STATUS); ok { + err := augmentedIdentifier.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.AccessPolicy type AccessPolicy struct { ExpiryTime *string `json:"expiryTime,omitempty"` @@ -254,6 +957,74 @@ type AccessPolicy struct { StartTime *string `json:"startTime,omitempty"` } +// AssignProperties_From_AccessPolicy populates our AccessPolicy from the provided source AccessPolicy +func (policy *AccessPolicy) AssignProperties_From_AccessPolicy(source *v20230101s.AccessPolicy) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ExpiryTime + policy.ExpiryTime = genruntime.ClonePointerToString(source.ExpiryTime) + + // Permission + policy.Permission = genruntime.ClonePointerToString(source.Permission) + + // StartTime + policy.StartTime = genruntime.ClonePointerToString(source.StartTime) + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForAccessPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForAccessPolicy); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_AccessPolicy populates the provided destination AccessPolicy from our AccessPolicy +func (policy *AccessPolicy) AssignProperties_To_AccessPolicy(destination *v20230101s.AccessPolicy) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // ExpiryTime + destination.ExpiryTime = genruntime.ClonePointerToString(policy.ExpiryTime) + + // Permission + destination.Permission = genruntime.ClonePointerToString(policy.Permission) + + // StartTime + destination.StartTime = genruntime.ClonePointerToString(policy.StartTime) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForAccessPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForAccessPolicy); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.AccessPolicy_STATUS type AccessPolicy_STATUS struct { ExpiryTime *string `json:"expiryTime,omitempty"` @@ -262,6 +1033,94 @@ type AccessPolicy_STATUS struct { StartTime *string `json:"startTime,omitempty"` } +// AssignProperties_From_AccessPolicy_STATUS populates our AccessPolicy_STATUS from the provided source AccessPolicy_STATUS +func (policy *AccessPolicy_STATUS) AssignProperties_From_AccessPolicy_STATUS(source *v20230101s.AccessPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ExpiryTime + policy.ExpiryTime = genruntime.ClonePointerToString(source.ExpiryTime) + + // Permission + policy.Permission = genruntime.ClonePointerToString(source.Permission) + + // StartTime + policy.StartTime = genruntime.ClonePointerToString(source.StartTime) + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForAccessPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForAccessPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_AccessPolicy_STATUS populates the provided destination AccessPolicy_STATUS from our AccessPolicy_STATUS +func (policy *AccessPolicy_STATUS) AssignProperties_To_AccessPolicy_STATUS(destination *v20230101s.AccessPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // ExpiryTime + destination.ExpiryTime = genruntime.ClonePointerToString(policy.ExpiryTime) + + // Permission + destination.Permission = genruntime.ClonePointerToString(policy.Permission) + + // StartTime + destination.StartTime = genruntime.ClonePointerToString(policy.StartTime) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForAccessPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForAccessPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForSignedIdentifier interface { + AssignPropertiesFrom(src *v20230101s.SignedIdentifier) error + AssignPropertiesTo(dst *v20230101s.SignedIdentifier) error +} + +type augmentConversionForSignedIdentifier_STATUS interface { + AssignPropertiesFrom(src *v20230101s.SignedIdentifier_STATUS) error + AssignPropertiesTo(dst *v20230101s.SignedIdentifier_STATUS) error +} + +type augmentConversionForAccessPolicy interface { + AssignPropertiesFrom(src *v20230101s.AccessPolicy) error + AssignPropertiesTo(dst *v20230101s.AccessPolicy) error +} + +type augmentConversionForAccessPolicy_STATUS interface { + AssignPropertiesFrom(src *v20230101s.AccessPolicy_STATUS) error + AssignPropertiesTo(dst *v20230101s.AccessPolicy_STATUS) error +} + func init() { SchemeBuilder.Register(&StorageAccountsFileServicesShare{}, &StorageAccountsFileServicesShareList{}) } diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_file_services_share_types_gen_test.go b/v2/api/storage/v1api20220901/storage/storage_accounts_file_services_share_types_gen_test.go index 3d41e41c791..5e57cbd5160 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_file_services_share_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_file_services_share_types_gen_test.go @@ -5,6 +5,7 @@ package storage import ( "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -17,6 +18,91 @@ import ( "testing" ) +func Test_StorageAccountsFileServicesShare_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsFileServicesShare to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsFileServicesShare, StorageAccountsFileServicesShareGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsFileServicesShare tests if a specific instance of StorageAccountsFileServicesShare round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsFileServicesShare(subject StorageAccountsFileServicesShare) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsFileServicesShare + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsFileServicesShare + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsFileServicesShare_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsFileServicesShare to StorageAccountsFileServicesShare via AssignProperties_To_StorageAccountsFileServicesShare & AssignProperties_From_StorageAccountsFileServicesShare returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsFileServicesShare, StorageAccountsFileServicesShareGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsFileServicesShare tests if a specific instance of StorageAccountsFileServicesShare can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsFileServicesShare(subject StorageAccountsFileServicesShare) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsFileServicesShare + err := copied.AssignProperties_To_StorageAccountsFileServicesShare(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsFileServicesShare + err = actual.AssignProperties_From_StorageAccountsFileServicesShare(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountsFileServicesShare_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -79,6 +165,48 @@ func AddRelatedPropertyGeneratorsForStorageAccountsFileServicesShare(gens map[st gens["Status"] = StorageAccounts_FileServices_Share_STATUSGenerator() } +func Test_StorageAccounts_FileServices_Share_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_FileServices_Share_Spec to StorageAccounts_FileServices_Share_Spec via AssignProperties_To_StorageAccounts_FileServices_Share_Spec & AssignProperties_From_StorageAccounts_FileServices_Share_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_FileServices_Share_Spec, StorageAccounts_FileServices_Share_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_FileServices_Share_Spec tests if a specific instance of StorageAccounts_FileServices_Share_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_FileServices_Share_Spec(subject StorageAccounts_FileServices_Share_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_FileServices_Share_Spec + err := copied.AssignProperties_To_StorageAccounts_FileServices_Share_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_FileServices_Share_Spec + err = actual.AssignProperties_From_StorageAccounts_FileServices_Share_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_FileServices_Share_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -160,6 +288,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec(gens gens["SignedIdentifiers"] = gen.SliceOf(SignedIdentifierGenerator()) } +func Test_StorageAccounts_FileServices_Share_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_FileServices_Share_STATUS to StorageAccounts_FileServices_Share_STATUS via AssignProperties_To_StorageAccounts_FileServices_Share_STATUS & AssignProperties_From_StorageAccounts_FileServices_Share_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_FileServices_Share_STATUS, StorageAccounts_FileServices_Share_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_FileServices_Share_STATUS tests if a specific instance of StorageAccounts_FileServices_Share_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_FileServices_Share_STATUS(subject StorageAccounts_FileServices_Share_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_FileServices_Share_STATUS + err := copied.AssignProperties_To_StorageAccounts_FileServices_Share_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_FileServices_Share_STATUS + err = actual.AssignProperties_From_StorageAccounts_FileServices_Share_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_FileServices_Share_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -255,6 +425,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS(ge gens["SignedIdentifiers"] = gen.SliceOf(SignedIdentifier_STATUSGenerator()) } +func Test_SignedIdentifier_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SignedIdentifier to SignedIdentifier via AssignProperties_To_SignedIdentifier & AssignProperties_From_SignedIdentifier returns original", + prop.ForAll(RunPropertyAssignmentTestForSignedIdentifier, SignedIdentifierGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSignedIdentifier tests if a specific instance of SignedIdentifier can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSignedIdentifier(subject SignedIdentifier) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.SignedIdentifier + err := copied.AssignProperties_To_SignedIdentifier(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SignedIdentifier + err = actual.AssignProperties_From_SignedIdentifier(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_SignedIdentifier_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -315,6 +527,48 @@ func AddRelatedPropertyGeneratorsForSignedIdentifier(gens map[string]gopter.Gen) gens["AccessPolicy"] = gen.PtrOf(AccessPolicyGenerator()) } +func Test_SignedIdentifier_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SignedIdentifier_STATUS to SignedIdentifier_STATUS via AssignProperties_To_SignedIdentifier_STATUS & AssignProperties_From_SignedIdentifier_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSignedIdentifier_STATUS, SignedIdentifier_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSignedIdentifier_STATUS tests if a specific instance of SignedIdentifier_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSignedIdentifier_STATUS(subject SignedIdentifier_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.SignedIdentifier_STATUS + err := copied.AssignProperties_To_SignedIdentifier_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SignedIdentifier_STATUS + err = actual.AssignProperties_From_SignedIdentifier_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_SignedIdentifier_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -390,6 +644,48 @@ func AddRelatedPropertyGeneratorsForSignedIdentifier_STATUS(gens map[string]gopt gens["AccessPolicy"] = gen.PtrOf(AccessPolicy_STATUSGenerator()) } +func Test_AccessPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from AccessPolicy to AccessPolicy via AssignProperties_To_AccessPolicy & AssignProperties_From_AccessPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForAccessPolicy, AccessPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForAccessPolicy tests if a specific instance of AccessPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForAccessPolicy(subject AccessPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.AccessPolicy + err := copied.AssignProperties_To_AccessPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual AccessPolicy + err = actual.AssignProperties_From_AccessPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_AccessPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -452,6 +748,48 @@ func AddIndependentPropertyGeneratorsForAccessPolicy(gens map[string]gopter.Gen) gens["StartTime"] = gen.PtrOf(gen.AlphaString()) } +func Test_AccessPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from AccessPolicy_STATUS to AccessPolicy_STATUS via AssignProperties_To_AccessPolicy_STATUS & AssignProperties_From_AccessPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForAccessPolicy_STATUS, AccessPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForAccessPolicy_STATUS tests if a specific instance of AccessPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForAccessPolicy_STATUS(subject AccessPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.AccessPolicy_STATUS + err := copied.AssignProperties_To_AccessPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual AccessPolicy_STATUS + err = actual.AssignProperties_From_AccessPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_AccessPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_management_policy_types_gen.go b/v2/api/storage/v1api20220901/storage/storage_accounts_management_policy_types_gen.go index 0307b01d2e3..f065f1bc3b8 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_management_policy_types_gen.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_management_policy_types_gen.go @@ -4,19 +4,18 @@ package storage import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" ) -// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsmanagementpolicies,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsmanagementpolicies/status,storageaccountsmanagementpolicies/finalizers},verbs=get;update;patch - // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" @@ -44,6 +43,28 @@ func (policy *StorageAccountsManagementPolicy) SetConditions(conditions conditio policy.Status.Conditions = conditions } +var _ conversion.Convertible = &StorageAccountsManagementPolicy{} + +// ConvertFrom populates our StorageAccountsManagementPolicy from the provided hub StorageAccountsManagementPolicy +func (policy *StorageAccountsManagementPolicy) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsManagementPolicy) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsManagementPolicy but received %T instead", hub) + } + + return policy.AssignProperties_From_StorageAccountsManagementPolicy(source) +} + +// ConvertTo populates the provided hub StorageAccountsManagementPolicy from our StorageAccountsManagementPolicy +func (policy *StorageAccountsManagementPolicy) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsManagementPolicy) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsManagementPolicy but received %T instead", hub) + } + + return policy.AssignProperties_To_StorageAccountsManagementPolicy(destination) +} + var _ genruntime.KubernetesResource = &StorageAccountsManagementPolicy{} // AzureName returns the Azure name of the resource (always "default") @@ -115,8 +136,75 @@ func (policy *StorageAccountsManagementPolicy) SetStatus(status genruntime.Conve return nil } -// Hub marks that this StorageAccountsManagementPolicy is the hub type for conversion -func (policy *StorageAccountsManagementPolicy) Hub() {} +// AssignProperties_From_StorageAccountsManagementPolicy populates our StorageAccountsManagementPolicy from the provided source StorageAccountsManagementPolicy +func (policy *StorageAccountsManagementPolicy) AssignProperties_From_StorageAccountsManagementPolicy(source *v20230101s.StorageAccountsManagementPolicy) error { + + // ObjectMeta + policy.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_ManagementPolicy_Spec + err := spec.AssignProperties_From_StorageAccounts_ManagementPolicy_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_ManagementPolicy_Spec() to populate field Spec") + } + policy.Spec = spec + + // Status + var status StorageAccounts_ManagementPolicy_STATUS + err = status.AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS() to populate field Status") + } + policy.Status = status + + // Invoke the augmentConversionForStorageAccountsManagementPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForStorageAccountsManagementPolicy); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsManagementPolicy populates the provided destination StorageAccountsManagementPolicy from our StorageAccountsManagementPolicy +func (policy *StorageAccountsManagementPolicy) AssignProperties_To_StorageAccountsManagementPolicy(destination *v20230101s.StorageAccountsManagementPolicy) error { + + // ObjectMeta + destination.ObjectMeta = *policy.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_ManagementPolicy_Spec + err := policy.Spec.AssignProperties_To_StorageAccounts_ManagementPolicy_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_ManagementPolicy_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_ManagementPolicy_STATUS + err = policy.Status.AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForStorageAccountsManagementPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForStorageAccountsManagementPolicy); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (policy *StorageAccountsManagementPolicy) OriginalGVK() *schema.GroupVersionKind { @@ -138,6 +226,11 @@ type StorageAccountsManagementPolicyList struct { Items []StorageAccountsManagementPolicy `json:"items"` } +type augmentConversionForStorageAccountsManagementPolicy interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountsManagementPolicy) error + AssignPropertiesTo(dst *v20230101s.StorageAccountsManagementPolicy) error +} + // Storage version of v1api20220901.StorageAccounts_ManagementPolicy_Spec type StorageAccounts_ManagementPolicy_Spec struct { OriginalVersion string `json:"originalVersion,omitempty"` @@ -155,20 +248,146 @@ var _ genruntime.ConvertibleSpec = &StorageAccounts_ManagementPolicy_Spec{} // ConvertSpecFrom populates our StorageAccounts_ManagementPolicy_Spec from the provided source func (policy *StorageAccounts_ManagementPolicy_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == policy { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + src, ok := source.(*v20230101s.StorageAccounts_ManagementPolicy_Spec) + if ok { + // Populate our instance from source + return policy.AssignProperties_From_StorageAccounts_ManagementPolicy_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_ManagementPolicy_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") } - return source.ConvertSpecTo(policy) + // Update our instance from src + err = policy.AssignProperties_From_StorageAccounts_ManagementPolicy_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil } // ConvertSpecTo populates the provided destination from our StorageAccounts_ManagementPolicy_Spec func (policy *StorageAccounts_ManagementPolicy_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == policy { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + dst, ok := destination.(*v20230101s.StorageAccounts_ManagementPolicy_Spec) + if ok { + // Populate destination from our instance + return policy.AssignProperties_To_StorageAccounts_ManagementPolicy_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_ManagementPolicy_Spec{} + err := policy.AssignProperties_To_StorageAccounts_ManagementPolicy_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_ManagementPolicy_Spec populates our StorageAccounts_ManagementPolicy_Spec from the provided source StorageAccounts_ManagementPolicy_Spec +func (policy *StorageAccounts_ManagementPolicy_Spec) AssignProperties_From_StorageAccounts_ManagementPolicy_Spec(source *v20230101s.StorageAccounts_ManagementPolicy_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // OriginalVersion + policy.OriginalVersion = source.OriginalVersion + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + policy.Owner = &owner + } else { + policy.Owner = nil + } + + // Policy + if source.Policy != nil { + var policyLocal ManagementPolicySchema + err := policyLocal.AssignProperties_From_ManagementPolicySchema(source.Policy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicySchema() to populate field Policy") + } + policy.Policy = &policyLocal + } else { + policy.Policy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_ManagementPolicy_Spec interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForStorageAccounts_ManagementPolicy_Spec); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_ManagementPolicy_Spec populates the provided destination StorageAccounts_ManagementPolicy_Spec from our StorageAccounts_ManagementPolicy_Spec +func (policy *StorageAccounts_ManagementPolicy_Spec) AssignProperties_To_StorageAccounts_ManagementPolicy_Spec(destination *v20230101s.StorageAccounts_ManagementPolicy_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // OriginalVersion + destination.OriginalVersion = policy.OriginalVersion + + // Owner + if policy.Owner != nil { + owner := policy.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Policy + if policy.Policy != nil { + var policyLocal v20230101s.ManagementPolicySchema + err := policy.Policy.AssignProperties_To_ManagementPolicySchema(&policyLocal) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicySchema() to populate field Policy") + } + destination.Policy = &policyLocal + } else { + destination.Policy = nil } - return destination.ConvertSpecFrom(policy) + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_ManagementPolicy_Spec interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForStorageAccounts_ManagementPolicy_Spec); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } // Storage version of v1api20220901.StorageAccounts_ManagementPolicy_STATUS @@ -186,20 +405,164 @@ var _ genruntime.ConvertibleStatus = &StorageAccounts_ManagementPolicy_STATUS{} // ConvertStatusFrom populates our StorageAccounts_ManagementPolicy_STATUS from the provided source func (policy *StorageAccounts_ManagementPolicy_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == policy { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + src, ok := source.(*v20230101s.StorageAccounts_ManagementPolicy_STATUS) + if ok { + // Populate our instance from source + return policy.AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_ManagementPolicy_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") } - return source.ConvertStatusTo(policy) + // Update our instance from src + err = policy.AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil } // ConvertStatusTo populates the provided destination from our StorageAccounts_ManagementPolicy_STATUS func (policy *StorageAccounts_ManagementPolicy_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == policy { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + dst, ok := destination.(*v20230101s.StorageAccounts_ManagementPolicy_STATUS) + if ok { + // Populate destination from our instance + return policy.AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_ManagementPolicy_STATUS{} + err := policy.AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS populates our StorageAccounts_ManagementPolicy_STATUS from the provided source StorageAccounts_ManagementPolicy_STATUS +func (policy *StorageAccounts_ManagementPolicy_STATUS) AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS(source *v20230101s.StorageAccounts_ManagementPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Conditions + policy.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Id + policy.Id = genruntime.ClonePointerToString(source.Id) + + // LastModifiedTime + policy.LastModifiedTime = genruntime.ClonePointerToString(source.LastModifiedTime) + + // Name + policy.Name = genruntime.ClonePointerToString(source.Name) + + // Policy + if source.Policy != nil { + var policyLocal ManagementPolicySchema_STATUS + err := policyLocal.AssignProperties_From_ManagementPolicySchema_STATUS(source.Policy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicySchema_STATUS() to populate field Policy") + } + policy.Policy = &policyLocal + } else { + policy.Policy = nil + } + + // Type + policy.Type = genruntime.ClonePointerToString(source.Type) + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_ManagementPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForStorageAccounts_ManagementPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS populates the provided destination StorageAccounts_ManagementPolicy_STATUS from our StorageAccounts_ManagementPolicy_STATUS +func (policy *StorageAccounts_ManagementPolicy_STATUS) AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS(destination *v20230101s.StorageAccounts_ManagementPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(policy.Conditions) + + // Id + destination.Id = genruntime.ClonePointerToString(policy.Id) + + // LastModifiedTime + destination.LastModifiedTime = genruntime.ClonePointerToString(policy.LastModifiedTime) + + // Name + destination.Name = genruntime.ClonePointerToString(policy.Name) + + // Policy + if policy.Policy != nil { + var policyLocal v20230101s.ManagementPolicySchema_STATUS + err := policy.Policy.AssignProperties_To_ManagementPolicySchema_STATUS(&policyLocal) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicySchema_STATUS() to populate field Policy") + } + destination.Policy = &policyLocal + } else { + destination.Policy = nil + } + + // Type + destination.Type = genruntime.ClonePointerToString(policy.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_ManagementPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForStorageAccounts_ManagementPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } } - return destination.ConvertStatusFrom(policy) + // No error + return nil +} + +type augmentConversionForStorageAccounts_ManagementPolicy_Spec interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_ManagementPolicy_Spec) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_ManagementPolicy_Spec) error +} + +type augmentConversionForStorageAccounts_ManagementPolicy_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_ManagementPolicy_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_ManagementPolicy_STATUS) error } // Storage version of v1api20220901.ManagementPolicySchema @@ -210,6 +573,92 @@ type ManagementPolicySchema struct { Rules []ManagementPolicyRule `json:"rules,omitempty"` } +// AssignProperties_From_ManagementPolicySchema populates our ManagementPolicySchema from the provided source ManagementPolicySchema +func (schema *ManagementPolicySchema) AssignProperties_From_ManagementPolicySchema(source *v20230101s.ManagementPolicySchema) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Rules + if source.Rules != nil { + ruleList := make([]ManagementPolicyRule, len(source.Rules)) + for ruleIndex, ruleItem := range source.Rules { + // Shadow the loop variable to avoid aliasing + ruleItem := ruleItem + var rule ManagementPolicyRule + err := rule.AssignProperties_From_ManagementPolicyRule(&ruleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyRule() to populate field Rules") + } + ruleList[ruleIndex] = rule + } + schema.Rules = ruleList + } else { + schema.Rules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + schema.PropertyBag = propertyBag + } else { + schema.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicySchema interface (if implemented) to customize the conversion + var schemaAsAny any = schema + if augmentedSchema, ok := schemaAsAny.(augmentConversionForManagementPolicySchema); ok { + err := augmentedSchema.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicySchema populates the provided destination ManagementPolicySchema from our ManagementPolicySchema +func (schema *ManagementPolicySchema) AssignProperties_To_ManagementPolicySchema(destination *v20230101s.ManagementPolicySchema) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(schema.PropertyBag) + + // Rules + if schema.Rules != nil { + ruleList := make([]v20230101s.ManagementPolicyRule, len(schema.Rules)) + for ruleIndex, ruleItem := range schema.Rules { + // Shadow the loop variable to avoid aliasing + ruleItem := ruleItem + var rule v20230101s.ManagementPolicyRule + err := ruleItem.AssignProperties_To_ManagementPolicyRule(&rule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyRule() to populate field Rules") + } + ruleList[ruleIndex] = rule + } + destination.Rules = ruleList + } else { + destination.Rules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicySchema interface (if implemented) to customize the conversion + var schemaAsAny any = schema + if augmentedSchema, ok := schemaAsAny.(augmentConversionForManagementPolicySchema); ok { + err := augmentedSchema.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ManagementPolicySchema_STATUS // The Storage Account ManagementPolicies Rules. See more details in: // https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. @@ -218,6 +667,102 @@ type ManagementPolicySchema_STATUS struct { Rules []ManagementPolicyRule_STATUS `json:"rules,omitempty"` } +// AssignProperties_From_ManagementPolicySchema_STATUS populates our ManagementPolicySchema_STATUS from the provided source ManagementPolicySchema_STATUS +func (schema *ManagementPolicySchema_STATUS) AssignProperties_From_ManagementPolicySchema_STATUS(source *v20230101s.ManagementPolicySchema_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Rules + if source.Rules != nil { + ruleList := make([]ManagementPolicyRule_STATUS, len(source.Rules)) + for ruleIndex, ruleItem := range source.Rules { + // Shadow the loop variable to avoid aliasing + ruleItem := ruleItem + var rule ManagementPolicyRule_STATUS + err := rule.AssignProperties_From_ManagementPolicyRule_STATUS(&ruleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyRule_STATUS() to populate field Rules") + } + ruleList[ruleIndex] = rule + } + schema.Rules = ruleList + } else { + schema.Rules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + schema.PropertyBag = propertyBag + } else { + schema.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicySchema_STATUS interface (if implemented) to customize the conversion + var schemaAsAny any = schema + if augmentedSchema, ok := schemaAsAny.(augmentConversionForManagementPolicySchema_STATUS); ok { + err := augmentedSchema.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicySchema_STATUS populates the provided destination ManagementPolicySchema_STATUS from our ManagementPolicySchema_STATUS +func (schema *ManagementPolicySchema_STATUS) AssignProperties_To_ManagementPolicySchema_STATUS(destination *v20230101s.ManagementPolicySchema_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(schema.PropertyBag) + + // Rules + if schema.Rules != nil { + ruleList := make([]v20230101s.ManagementPolicyRule_STATUS, len(schema.Rules)) + for ruleIndex, ruleItem := range schema.Rules { + // Shadow the loop variable to avoid aliasing + ruleItem := ruleItem + var rule v20230101s.ManagementPolicyRule_STATUS + err := ruleItem.AssignProperties_To_ManagementPolicyRule_STATUS(&rule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyRule_STATUS() to populate field Rules") + } + ruleList[ruleIndex] = rule + } + destination.Rules = ruleList + } else { + destination.Rules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicySchema_STATUS interface (if implemented) to customize the conversion + var schemaAsAny any = schema + if augmentedSchema, ok := schemaAsAny.(augmentConversionForManagementPolicySchema_STATUS); ok { + err := augmentedSchema.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForManagementPolicySchema interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicySchema) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicySchema) error +} + +type augmentConversionForManagementPolicySchema_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicySchema_STATUS) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicySchema_STATUS) error +} + // Storage version of v1api20220901.ManagementPolicyRule // An object that wraps the Lifecycle rule. Each rule is uniquely defined by name. type ManagementPolicyRule struct { @@ -228,6 +773,108 @@ type ManagementPolicyRule struct { Type *string `json:"type,omitempty"` } +// AssignProperties_From_ManagementPolicyRule populates our ManagementPolicyRule from the provided source ManagementPolicyRule +func (rule *ManagementPolicyRule) AssignProperties_From_ManagementPolicyRule(source *v20230101s.ManagementPolicyRule) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Definition + if source.Definition != nil { + var definition ManagementPolicyDefinition + err := definition.AssignProperties_From_ManagementPolicyDefinition(source.Definition) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyDefinition() to populate field Definition") + } + rule.Definition = &definition + } else { + rule.Definition = nil + } + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } + + // Name + rule.Name = genruntime.ClonePointerToString(source.Name) + + // Type + rule.Type = genruntime.ClonePointerToString(source.Type) + + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForManagementPolicyRule); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyRule populates the provided destination ManagementPolicyRule from our ManagementPolicyRule +func (rule *ManagementPolicyRule) AssignProperties_To_ManagementPolicyRule(destination *v20230101s.ManagementPolicyRule) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) + + // Definition + if rule.Definition != nil { + var definition v20230101s.ManagementPolicyDefinition + err := rule.Definition.AssignProperties_To_ManagementPolicyDefinition(&definition) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyDefinition() to populate field Definition") + } + destination.Definition = &definition + } else { + destination.Definition = nil + } + + // Enabled + if rule.Enabled != nil { + enabled := *rule.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(rule.Name) + + // Type + destination.Type = genruntime.ClonePointerToString(rule.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForManagementPolicyRule); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ManagementPolicyRule_STATUS // An object that wraps the Lifecycle rule. Each rule is uniquely defined by name. type ManagementPolicyRule_STATUS struct { @@ -238,6 +885,118 @@ type ManagementPolicyRule_STATUS struct { Type *string `json:"type,omitempty"` } +// AssignProperties_From_ManagementPolicyRule_STATUS populates our ManagementPolicyRule_STATUS from the provided source ManagementPolicyRule_STATUS +func (rule *ManagementPolicyRule_STATUS) AssignProperties_From_ManagementPolicyRule_STATUS(source *v20230101s.ManagementPolicyRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Definition + if source.Definition != nil { + var definition ManagementPolicyDefinition_STATUS + err := definition.AssignProperties_From_ManagementPolicyDefinition_STATUS(source.Definition) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyDefinition_STATUS() to populate field Definition") + } + rule.Definition = &definition + } else { + rule.Definition = nil + } + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } + + // Name + rule.Name = genruntime.ClonePointerToString(source.Name) + + // Type + rule.Type = genruntime.ClonePointerToString(source.Type) + + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForManagementPolicyRule_STATUS); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyRule_STATUS populates the provided destination ManagementPolicyRule_STATUS from our ManagementPolicyRule_STATUS +func (rule *ManagementPolicyRule_STATUS) AssignProperties_To_ManagementPolicyRule_STATUS(destination *v20230101s.ManagementPolicyRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) + + // Definition + if rule.Definition != nil { + var definition v20230101s.ManagementPolicyDefinition_STATUS + err := rule.Definition.AssignProperties_To_ManagementPolicyDefinition_STATUS(&definition) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyDefinition_STATUS() to populate field Definition") + } + destination.Definition = &definition + } else { + destination.Definition = nil + } + + // Enabled + if rule.Enabled != nil { + enabled := *rule.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(rule.Name) + + // Type + destination.Type = genruntime.ClonePointerToString(rule.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForManagementPolicyRule_STATUS); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForManagementPolicyRule interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicyRule) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicyRule) error +} + +type augmentConversionForManagementPolicyRule_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicyRule_STATUS) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicyRule_STATUS) error +} + // Storage version of v1api20220901.ManagementPolicyDefinition // An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set. type ManagementPolicyDefinition struct { @@ -246,6 +1005,104 @@ type ManagementPolicyDefinition struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_ManagementPolicyDefinition populates our ManagementPolicyDefinition from the provided source ManagementPolicyDefinition +func (definition *ManagementPolicyDefinition) AssignProperties_From_ManagementPolicyDefinition(source *v20230101s.ManagementPolicyDefinition) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Actions + if source.Actions != nil { + var action ManagementPolicyAction + err := action.AssignProperties_From_ManagementPolicyAction(source.Actions) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyAction() to populate field Actions") + } + definition.Actions = &action + } else { + definition.Actions = nil + } + + // Filters + if source.Filters != nil { + var filter ManagementPolicyFilter + err := filter.AssignProperties_From_ManagementPolicyFilter(source.Filters) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyFilter() to populate field Filters") + } + definition.Filters = &filter + } else { + definition.Filters = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + definition.PropertyBag = propertyBag + } else { + definition.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyDefinition interface (if implemented) to customize the conversion + var definitionAsAny any = definition + if augmentedDefinition, ok := definitionAsAny.(augmentConversionForManagementPolicyDefinition); ok { + err := augmentedDefinition.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyDefinition populates the provided destination ManagementPolicyDefinition from our ManagementPolicyDefinition +func (definition *ManagementPolicyDefinition) AssignProperties_To_ManagementPolicyDefinition(destination *v20230101s.ManagementPolicyDefinition) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(definition.PropertyBag) + + // Actions + if definition.Actions != nil { + var action v20230101s.ManagementPolicyAction + err := definition.Actions.AssignProperties_To_ManagementPolicyAction(&action) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyAction() to populate field Actions") + } + destination.Actions = &action + } else { + destination.Actions = nil + } + + // Filters + if definition.Filters != nil { + var filter v20230101s.ManagementPolicyFilter + err := definition.Filters.AssignProperties_To_ManagementPolicyFilter(&filter) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyFilter() to populate field Filters") + } + destination.Filters = &filter + } else { + destination.Filters = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyDefinition interface (if implemented) to customize the conversion + var definitionAsAny any = definition + if augmentedDefinition, ok := definitionAsAny.(augmentConversionForManagementPolicyDefinition); ok { + err := augmentedDefinition.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ManagementPolicyDefinition_STATUS // An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set. type ManagementPolicyDefinition_STATUS struct { @@ -254,15 +1111,245 @@ type ManagementPolicyDefinition_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } -// Storage version of v1api20220901.ManagementPolicyAction -// Actions are applied to the filtered blobs when the execution condition is met. -type ManagementPolicyAction struct { +// AssignProperties_From_ManagementPolicyDefinition_STATUS populates our ManagementPolicyDefinition_STATUS from the provided source ManagementPolicyDefinition_STATUS +func (definition *ManagementPolicyDefinition_STATUS) AssignProperties_From_ManagementPolicyDefinition_STATUS(source *v20230101s.ManagementPolicyDefinition_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Actions + if source.Actions != nil { + var action ManagementPolicyAction_STATUS + err := action.AssignProperties_From_ManagementPolicyAction_STATUS(source.Actions) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyAction_STATUS() to populate field Actions") + } + definition.Actions = &action + } else { + definition.Actions = nil + } + + // Filters + if source.Filters != nil { + var filter ManagementPolicyFilter_STATUS + err := filter.AssignProperties_From_ManagementPolicyFilter_STATUS(source.Filters) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyFilter_STATUS() to populate field Filters") + } + definition.Filters = &filter + } else { + definition.Filters = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + definition.PropertyBag = propertyBag + } else { + definition.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyDefinition_STATUS interface (if implemented) to customize the conversion + var definitionAsAny any = definition + if augmentedDefinition, ok := definitionAsAny.(augmentConversionForManagementPolicyDefinition_STATUS); ok { + err := augmentedDefinition.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyDefinition_STATUS populates the provided destination ManagementPolicyDefinition_STATUS from our ManagementPolicyDefinition_STATUS +func (definition *ManagementPolicyDefinition_STATUS) AssignProperties_To_ManagementPolicyDefinition_STATUS(destination *v20230101s.ManagementPolicyDefinition_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(definition.PropertyBag) + + // Actions + if definition.Actions != nil { + var action v20230101s.ManagementPolicyAction_STATUS + err := definition.Actions.AssignProperties_To_ManagementPolicyAction_STATUS(&action) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyAction_STATUS() to populate field Actions") + } + destination.Actions = &action + } else { + destination.Actions = nil + } + + // Filters + if definition.Filters != nil { + var filter v20230101s.ManagementPolicyFilter_STATUS + err := definition.Filters.AssignProperties_To_ManagementPolicyFilter_STATUS(&filter) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyFilter_STATUS() to populate field Filters") + } + destination.Filters = &filter + } else { + destination.Filters = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyDefinition_STATUS interface (if implemented) to customize the conversion + var definitionAsAny any = definition + if augmentedDefinition, ok := definitionAsAny.(augmentConversionForManagementPolicyDefinition_STATUS); ok { + err := augmentedDefinition.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForManagementPolicyDefinition interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicyDefinition) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicyDefinition) error +} + +type augmentConversionForManagementPolicyDefinition_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicyDefinition_STATUS) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicyDefinition_STATUS) error +} + +// Storage version of v1api20220901.ManagementPolicyAction +// Actions are applied to the filtered blobs when the execution condition is met. +type ManagementPolicyAction struct { BaseBlob *ManagementPolicyBaseBlob `json:"baseBlob,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` Snapshot *ManagementPolicySnapShot `json:"snapshot,omitempty"` Version *ManagementPolicyVersion `json:"version,omitempty"` } +// AssignProperties_From_ManagementPolicyAction populates our ManagementPolicyAction from the provided source ManagementPolicyAction +func (action *ManagementPolicyAction) AssignProperties_From_ManagementPolicyAction(source *v20230101s.ManagementPolicyAction) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // BaseBlob + if source.BaseBlob != nil { + var baseBlob ManagementPolicyBaseBlob + err := baseBlob.AssignProperties_From_ManagementPolicyBaseBlob(source.BaseBlob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyBaseBlob() to populate field BaseBlob") + } + action.BaseBlob = &baseBlob + } else { + action.BaseBlob = nil + } + + // Snapshot + if source.Snapshot != nil { + var snapshot ManagementPolicySnapShot + err := snapshot.AssignProperties_From_ManagementPolicySnapShot(source.Snapshot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicySnapShot() to populate field Snapshot") + } + action.Snapshot = &snapshot + } else { + action.Snapshot = nil + } + + // Version + if source.Version != nil { + var version ManagementPolicyVersion + err := version.AssignProperties_From_ManagementPolicyVersion(source.Version) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyVersion() to populate field Version") + } + action.Version = &version + } else { + action.Version = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + action.PropertyBag = propertyBag + } else { + action.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyAction interface (if implemented) to customize the conversion + var actionAsAny any = action + if augmentedAction, ok := actionAsAny.(augmentConversionForManagementPolicyAction); ok { + err := augmentedAction.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyAction populates the provided destination ManagementPolicyAction from our ManagementPolicyAction +func (action *ManagementPolicyAction) AssignProperties_To_ManagementPolicyAction(destination *v20230101s.ManagementPolicyAction) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(action.PropertyBag) + + // BaseBlob + if action.BaseBlob != nil { + var baseBlob v20230101s.ManagementPolicyBaseBlob + err := action.BaseBlob.AssignProperties_To_ManagementPolicyBaseBlob(&baseBlob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyBaseBlob() to populate field BaseBlob") + } + destination.BaseBlob = &baseBlob + } else { + destination.BaseBlob = nil + } + + // Snapshot + if action.Snapshot != nil { + var snapshot v20230101s.ManagementPolicySnapShot + err := action.Snapshot.AssignProperties_To_ManagementPolicySnapShot(&snapshot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicySnapShot() to populate field Snapshot") + } + destination.Snapshot = &snapshot + } else { + destination.Snapshot = nil + } + + // Version + if action.Version != nil { + var version v20230101s.ManagementPolicyVersion + err := action.Version.AssignProperties_To_ManagementPolicyVersion(&version) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyVersion() to populate field Version") + } + destination.Version = &version + } else { + destination.Version = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyAction interface (if implemented) to customize the conversion + var actionAsAny any = action + if augmentedAction, ok := actionAsAny.(augmentConversionForManagementPolicyAction); ok { + err := augmentedAction.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ManagementPolicyAction_STATUS // Actions are applied to the filtered blobs when the execution condition is met. type ManagementPolicyAction_STATUS struct { @@ -272,6 +1359,128 @@ type ManagementPolicyAction_STATUS struct { Version *ManagementPolicyVersion_STATUS `json:"version,omitempty"` } +// AssignProperties_From_ManagementPolicyAction_STATUS populates our ManagementPolicyAction_STATUS from the provided source ManagementPolicyAction_STATUS +func (action *ManagementPolicyAction_STATUS) AssignProperties_From_ManagementPolicyAction_STATUS(source *v20230101s.ManagementPolicyAction_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // BaseBlob + if source.BaseBlob != nil { + var baseBlob ManagementPolicyBaseBlob_STATUS + err := baseBlob.AssignProperties_From_ManagementPolicyBaseBlob_STATUS(source.BaseBlob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyBaseBlob_STATUS() to populate field BaseBlob") + } + action.BaseBlob = &baseBlob + } else { + action.BaseBlob = nil + } + + // Snapshot + if source.Snapshot != nil { + var snapshot ManagementPolicySnapShot_STATUS + err := snapshot.AssignProperties_From_ManagementPolicySnapShot_STATUS(source.Snapshot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicySnapShot_STATUS() to populate field Snapshot") + } + action.Snapshot = &snapshot + } else { + action.Snapshot = nil + } + + // Version + if source.Version != nil { + var version ManagementPolicyVersion_STATUS + err := version.AssignProperties_From_ManagementPolicyVersion_STATUS(source.Version) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyVersion_STATUS() to populate field Version") + } + action.Version = &version + } else { + action.Version = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + action.PropertyBag = propertyBag + } else { + action.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyAction_STATUS interface (if implemented) to customize the conversion + var actionAsAny any = action + if augmentedAction, ok := actionAsAny.(augmentConversionForManagementPolicyAction_STATUS); ok { + err := augmentedAction.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyAction_STATUS populates the provided destination ManagementPolicyAction_STATUS from our ManagementPolicyAction_STATUS +func (action *ManagementPolicyAction_STATUS) AssignProperties_To_ManagementPolicyAction_STATUS(destination *v20230101s.ManagementPolicyAction_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(action.PropertyBag) + + // BaseBlob + if action.BaseBlob != nil { + var baseBlob v20230101s.ManagementPolicyBaseBlob_STATUS + err := action.BaseBlob.AssignProperties_To_ManagementPolicyBaseBlob_STATUS(&baseBlob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyBaseBlob_STATUS() to populate field BaseBlob") + } + destination.BaseBlob = &baseBlob + } else { + destination.BaseBlob = nil + } + + // Snapshot + if action.Snapshot != nil { + var snapshot v20230101s.ManagementPolicySnapShot_STATUS + err := action.Snapshot.AssignProperties_To_ManagementPolicySnapShot_STATUS(&snapshot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicySnapShot_STATUS() to populate field Snapshot") + } + destination.Snapshot = &snapshot + } else { + destination.Snapshot = nil + } + + // Version + if action.Version != nil { + var version v20230101s.ManagementPolicyVersion_STATUS + err := action.Version.AssignProperties_To_ManagementPolicyVersion_STATUS(&version) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyVersion_STATUS() to populate field Version") + } + destination.Version = &version + } else { + destination.Version = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyAction_STATUS interface (if implemented) to customize the conversion + var actionAsAny any = action + if augmentedAction, ok := actionAsAny.(augmentConversionForManagementPolicyAction_STATUS); ok { + err := augmentedAction.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ManagementPolicyFilter // Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical // AND is performed on all filters. @@ -282,6 +1491,104 @@ type ManagementPolicyFilter struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_ManagementPolicyFilter populates our ManagementPolicyFilter from the provided source ManagementPolicyFilter +func (filter *ManagementPolicyFilter) AssignProperties_From_ManagementPolicyFilter(source *v20230101s.ManagementPolicyFilter) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // BlobIndexMatch + if source.BlobIndexMatch != nil { + blobIndexMatchList := make([]TagFilter, len(source.BlobIndexMatch)) + for blobIndexMatchIndex, blobIndexMatchItem := range source.BlobIndexMatch { + // Shadow the loop variable to avoid aliasing + blobIndexMatchItem := blobIndexMatchItem + var blobIndexMatch TagFilter + err := blobIndexMatch.AssignProperties_From_TagFilter(&blobIndexMatchItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TagFilter() to populate field BlobIndexMatch") + } + blobIndexMatchList[blobIndexMatchIndex] = blobIndexMatch + } + filter.BlobIndexMatch = blobIndexMatchList + } else { + filter.BlobIndexMatch = nil + } + + // BlobTypes + filter.BlobTypes = genruntime.CloneSliceOfString(source.BlobTypes) + + // PrefixMatch + filter.PrefixMatch = genruntime.CloneSliceOfString(source.PrefixMatch) + + // Update the property bag + if len(propertyBag) > 0 { + filter.PropertyBag = propertyBag + } else { + filter.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyFilter interface (if implemented) to customize the conversion + var filterAsAny any = filter + if augmentedFilter, ok := filterAsAny.(augmentConversionForManagementPolicyFilter); ok { + err := augmentedFilter.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyFilter populates the provided destination ManagementPolicyFilter from our ManagementPolicyFilter +func (filter *ManagementPolicyFilter) AssignProperties_To_ManagementPolicyFilter(destination *v20230101s.ManagementPolicyFilter) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(filter.PropertyBag) + + // BlobIndexMatch + if filter.BlobIndexMatch != nil { + blobIndexMatchList := make([]v20230101s.TagFilter, len(filter.BlobIndexMatch)) + for blobIndexMatchIndex, blobIndexMatchItem := range filter.BlobIndexMatch { + // Shadow the loop variable to avoid aliasing + blobIndexMatchItem := blobIndexMatchItem + var blobIndexMatch v20230101s.TagFilter + err := blobIndexMatchItem.AssignProperties_To_TagFilter(&blobIndexMatch) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TagFilter() to populate field BlobIndexMatch") + } + blobIndexMatchList[blobIndexMatchIndex] = blobIndexMatch + } + destination.BlobIndexMatch = blobIndexMatchList + } else { + destination.BlobIndexMatch = nil + } + + // BlobTypes + destination.BlobTypes = genruntime.CloneSliceOfString(filter.BlobTypes) + + // PrefixMatch + destination.PrefixMatch = genruntime.CloneSliceOfString(filter.PrefixMatch) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyFilter interface (if implemented) to customize the conversion + var filterAsAny any = filter + if augmentedFilter, ok := filterAsAny.(augmentConversionForManagementPolicyFilter); ok { + err := augmentedFilter.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ManagementPolicyFilter_STATUS // Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical // AND is performed on all filters. @@ -292,6 +1599,124 @@ type ManagementPolicyFilter_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_ManagementPolicyFilter_STATUS populates our ManagementPolicyFilter_STATUS from the provided source ManagementPolicyFilter_STATUS +func (filter *ManagementPolicyFilter_STATUS) AssignProperties_From_ManagementPolicyFilter_STATUS(source *v20230101s.ManagementPolicyFilter_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // BlobIndexMatch + if source.BlobIndexMatch != nil { + blobIndexMatchList := make([]TagFilter_STATUS, len(source.BlobIndexMatch)) + for blobIndexMatchIndex, blobIndexMatchItem := range source.BlobIndexMatch { + // Shadow the loop variable to avoid aliasing + blobIndexMatchItem := blobIndexMatchItem + var blobIndexMatch TagFilter_STATUS + err := blobIndexMatch.AssignProperties_From_TagFilter_STATUS(&blobIndexMatchItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TagFilter_STATUS() to populate field BlobIndexMatch") + } + blobIndexMatchList[blobIndexMatchIndex] = blobIndexMatch + } + filter.BlobIndexMatch = blobIndexMatchList + } else { + filter.BlobIndexMatch = nil + } + + // BlobTypes + filter.BlobTypes = genruntime.CloneSliceOfString(source.BlobTypes) + + // PrefixMatch + filter.PrefixMatch = genruntime.CloneSliceOfString(source.PrefixMatch) + + // Update the property bag + if len(propertyBag) > 0 { + filter.PropertyBag = propertyBag + } else { + filter.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyFilter_STATUS interface (if implemented) to customize the conversion + var filterAsAny any = filter + if augmentedFilter, ok := filterAsAny.(augmentConversionForManagementPolicyFilter_STATUS); ok { + err := augmentedFilter.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyFilter_STATUS populates the provided destination ManagementPolicyFilter_STATUS from our ManagementPolicyFilter_STATUS +func (filter *ManagementPolicyFilter_STATUS) AssignProperties_To_ManagementPolicyFilter_STATUS(destination *v20230101s.ManagementPolicyFilter_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(filter.PropertyBag) + + // BlobIndexMatch + if filter.BlobIndexMatch != nil { + blobIndexMatchList := make([]v20230101s.TagFilter_STATUS, len(filter.BlobIndexMatch)) + for blobIndexMatchIndex, blobIndexMatchItem := range filter.BlobIndexMatch { + // Shadow the loop variable to avoid aliasing + blobIndexMatchItem := blobIndexMatchItem + var blobIndexMatch v20230101s.TagFilter_STATUS + err := blobIndexMatchItem.AssignProperties_To_TagFilter_STATUS(&blobIndexMatch) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TagFilter_STATUS() to populate field BlobIndexMatch") + } + blobIndexMatchList[blobIndexMatchIndex] = blobIndexMatch + } + destination.BlobIndexMatch = blobIndexMatchList + } else { + destination.BlobIndexMatch = nil + } + + // BlobTypes + destination.BlobTypes = genruntime.CloneSliceOfString(filter.BlobTypes) + + // PrefixMatch + destination.PrefixMatch = genruntime.CloneSliceOfString(filter.PrefixMatch) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyFilter_STATUS interface (if implemented) to customize the conversion + var filterAsAny any = filter + if augmentedFilter, ok := filterAsAny.(augmentConversionForManagementPolicyFilter_STATUS); ok { + err := augmentedFilter.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForManagementPolicyAction interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicyAction) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicyAction) error +} + +type augmentConversionForManagementPolicyAction_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicyAction_STATUS) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicyAction_STATUS) error +} + +type augmentConversionForManagementPolicyFilter interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicyFilter) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicyFilter) error +} + +type augmentConversionForManagementPolicyFilter_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicyFilter_STATUS) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicyFilter_STATUS) error +} + // Storage version of v1api20220901.ManagementPolicyBaseBlob // Management policy action for base blob. type ManagementPolicyBaseBlob struct { @@ -304,6 +1729,192 @@ type ManagementPolicyBaseBlob struct { TierToHot *DateAfterModification `json:"tierToHot,omitempty"` } +// AssignProperties_From_ManagementPolicyBaseBlob populates our ManagementPolicyBaseBlob from the provided source ManagementPolicyBaseBlob +func (blob *ManagementPolicyBaseBlob) AssignProperties_From_ManagementPolicyBaseBlob(source *v20230101s.ManagementPolicyBaseBlob) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Delete + if source.Delete != nil { + var delete DateAfterModification + err := delete.AssignProperties_From_DateAfterModification(source.Delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification() to populate field Delete") + } + blob.Delete = &delete + } else { + blob.Delete = nil + } + + // EnableAutoTierToHotFromCool + if source.EnableAutoTierToHotFromCool != nil { + enableAutoTierToHotFromCool := *source.EnableAutoTierToHotFromCool + blob.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool + } else { + blob.EnableAutoTierToHotFromCool = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterModification + err := tierToArchive.AssignProperties_From_DateAfterModification(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification() to populate field TierToArchive") + } + blob.TierToArchive = &tierToArchive + } else { + blob.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterModification + err := tierToCold.AssignProperties_From_DateAfterModification(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification() to populate field TierToCold") + } + blob.TierToCold = &tierToCold + } else { + blob.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterModification + err := tierToCool.AssignProperties_From_DateAfterModification(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification() to populate field TierToCool") + } + blob.TierToCool = &tierToCool + } else { + blob.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterModification + err := tierToHot.AssignProperties_From_DateAfterModification(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification() to populate field TierToHot") + } + blob.TierToHot = &tierToHot + } else { + blob.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + blob.PropertyBag = propertyBag + } else { + blob.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyBaseBlob interface (if implemented) to customize the conversion + var blobAsAny any = blob + if augmentedBlob, ok := blobAsAny.(augmentConversionForManagementPolicyBaseBlob); ok { + err := augmentedBlob.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyBaseBlob populates the provided destination ManagementPolicyBaseBlob from our ManagementPolicyBaseBlob +func (blob *ManagementPolicyBaseBlob) AssignProperties_To_ManagementPolicyBaseBlob(destination *v20230101s.ManagementPolicyBaseBlob) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(blob.PropertyBag) + + // Delete + if blob.Delete != nil { + var delete v20230101s.DateAfterModification + err := blob.Delete.AssignProperties_To_DateAfterModification(&delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification() to populate field Delete") + } + destination.Delete = &delete + } else { + destination.Delete = nil + } + + // EnableAutoTierToHotFromCool + if blob.EnableAutoTierToHotFromCool != nil { + enableAutoTierToHotFromCool := *blob.EnableAutoTierToHotFromCool + destination.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool + } else { + destination.EnableAutoTierToHotFromCool = nil + } + + // TierToArchive + if blob.TierToArchive != nil { + var tierToArchive v20230101s.DateAfterModification + err := blob.TierToArchive.AssignProperties_To_DateAfterModification(&tierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification() to populate field TierToArchive") + } + destination.TierToArchive = &tierToArchive + } else { + destination.TierToArchive = nil + } + + // TierToCold + if blob.TierToCold != nil { + var tierToCold v20230101s.DateAfterModification + err := blob.TierToCold.AssignProperties_To_DateAfterModification(&tierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification() to populate field TierToCold") + } + destination.TierToCold = &tierToCold + } else { + destination.TierToCold = nil + } + + // TierToCool + if blob.TierToCool != nil { + var tierToCool v20230101s.DateAfterModification + err := blob.TierToCool.AssignProperties_To_DateAfterModification(&tierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification() to populate field TierToCool") + } + destination.TierToCool = &tierToCool + } else { + destination.TierToCool = nil + } + + // TierToHot + if blob.TierToHot != nil { + var tierToHot v20230101s.DateAfterModification + err := blob.TierToHot.AssignProperties_To_DateAfterModification(&tierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification() to populate field TierToHot") + } + destination.TierToHot = &tierToHot + } else { + destination.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyBaseBlob interface (if implemented) to customize the conversion + var blobAsAny any = blob + if augmentedBlob, ok := blobAsAny.(augmentConversionForManagementPolicyBaseBlob); ok { + err := augmentedBlob.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ManagementPolicyBaseBlob_STATUS // Management policy action for base blob. type ManagementPolicyBaseBlob_STATUS struct { @@ -316,6 +1927,192 @@ type ManagementPolicyBaseBlob_STATUS struct { TierToHot *DateAfterModification_STATUS `json:"tierToHot,omitempty"` } +// AssignProperties_From_ManagementPolicyBaseBlob_STATUS populates our ManagementPolicyBaseBlob_STATUS from the provided source ManagementPolicyBaseBlob_STATUS +func (blob *ManagementPolicyBaseBlob_STATUS) AssignProperties_From_ManagementPolicyBaseBlob_STATUS(source *v20230101s.ManagementPolicyBaseBlob_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Delete + if source.Delete != nil { + var delete DateAfterModification_STATUS + err := delete.AssignProperties_From_DateAfterModification_STATUS(source.Delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification_STATUS() to populate field Delete") + } + blob.Delete = &delete + } else { + blob.Delete = nil + } + + // EnableAutoTierToHotFromCool + if source.EnableAutoTierToHotFromCool != nil { + enableAutoTierToHotFromCool := *source.EnableAutoTierToHotFromCool + blob.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool + } else { + blob.EnableAutoTierToHotFromCool = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterModification_STATUS + err := tierToArchive.AssignProperties_From_DateAfterModification_STATUS(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification_STATUS() to populate field TierToArchive") + } + blob.TierToArchive = &tierToArchive + } else { + blob.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterModification_STATUS + err := tierToCold.AssignProperties_From_DateAfterModification_STATUS(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification_STATUS() to populate field TierToCold") + } + blob.TierToCold = &tierToCold + } else { + blob.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterModification_STATUS + err := tierToCool.AssignProperties_From_DateAfterModification_STATUS(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification_STATUS() to populate field TierToCool") + } + blob.TierToCool = &tierToCool + } else { + blob.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterModification_STATUS + err := tierToHot.AssignProperties_From_DateAfterModification_STATUS(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification_STATUS() to populate field TierToHot") + } + blob.TierToHot = &tierToHot + } else { + blob.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + blob.PropertyBag = propertyBag + } else { + blob.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyBaseBlob_STATUS interface (if implemented) to customize the conversion + var blobAsAny any = blob + if augmentedBlob, ok := blobAsAny.(augmentConversionForManagementPolicyBaseBlob_STATUS); ok { + err := augmentedBlob.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyBaseBlob_STATUS populates the provided destination ManagementPolicyBaseBlob_STATUS from our ManagementPolicyBaseBlob_STATUS +func (blob *ManagementPolicyBaseBlob_STATUS) AssignProperties_To_ManagementPolicyBaseBlob_STATUS(destination *v20230101s.ManagementPolicyBaseBlob_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(blob.PropertyBag) + + // Delete + if blob.Delete != nil { + var delete v20230101s.DateAfterModification_STATUS + err := blob.Delete.AssignProperties_To_DateAfterModification_STATUS(&delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification_STATUS() to populate field Delete") + } + destination.Delete = &delete + } else { + destination.Delete = nil + } + + // EnableAutoTierToHotFromCool + if blob.EnableAutoTierToHotFromCool != nil { + enableAutoTierToHotFromCool := *blob.EnableAutoTierToHotFromCool + destination.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool + } else { + destination.EnableAutoTierToHotFromCool = nil + } + + // TierToArchive + if blob.TierToArchive != nil { + var tierToArchive v20230101s.DateAfterModification_STATUS + err := blob.TierToArchive.AssignProperties_To_DateAfterModification_STATUS(&tierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification_STATUS() to populate field TierToArchive") + } + destination.TierToArchive = &tierToArchive + } else { + destination.TierToArchive = nil + } + + // TierToCold + if blob.TierToCold != nil { + var tierToCold v20230101s.DateAfterModification_STATUS + err := blob.TierToCold.AssignProperties_To_DateAfterModification_STATUS(&tierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification_STATUS() to populate field TierToCold") + } + destination.TierToCold = &tierToCold + } else { + destination.TierToCold = nil + } + + // TierToCool + if blob.TierToCool != nil { + var tierToCool v20230101s.DateAfterModification_STATUS + err := blob.TierToCool.AssignProperties_To_DateAfterModification_STATUS(&tierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification_STATUS() to populate field TierToCool") + } + destination.TierToCool = &tierToCool + } else { + destination.TierToCool = nil + } + + // TierToHot + if blob.TierToHot != nil { + var tierToHot v20230101s.DateAfterModification_STATUS + err := blob.TierToHot.AssignProperties_To_DateAfterModification_STATUS(&tierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification_STATUS() to populate field TierToHot") + } + destination.TierToHot = &tierToHot + } else { + destination.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyBaseBlob_STATUS interface (if implemented) to customize the conversion + var blobAsAny any = blob + if augmentedBlob, ok := blobAsAny.(augmentConversionForManagementPolicyBaseBlob_STATUS); ok { + err := augmentedBlob.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ManagementPolicySnapShot // Management policy action for snapshot. type ManagementPolicySnapShot struct { @@ -327,15 +2124,355 @@ type ManagementPolicySnapShot struct { TierToHot *DateAfterCreation `json:"tierToHot,omitempty"` } -// Storage version of v1api20220901.ManagementPolicySnapShot_STATUS -// Management policy action for snapshot. -type ManagementPolicySnapShot_STATUS struct { - Delete *DateAfterCreation_STATUS `json:"delete,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - TierToArchive *DateAfterCreation_STATUS `json:"tierToArchive,omitempty"` - TierToCold *DateAfterCreation_STATUS `json:"tierToCold,omitempty"` - TierToCool *DateAfterCreation_STATUS `json:"tierToCool,omitempty"` - TierToHot *DateAfterCreation_STATUS `json:"tierToHot,omitempty"` +// AssignProperties_From_ManagementPolicySnapShot populates our ManagementPolicySnapShot from the provided source ManagementPolicySnapShot +func (shot *ManagementPolicySnapShot) AssignProperties_From_ManagementPolicySnapShot(source *v20230101s.ManagementPolicySnapShot) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Delete + if source.Delete != nil { + var delete DateAfterCreation + err := delete.AssignProperties_From_DateAfterCreation(source.Delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field Delete") + } + shot.Delete = &delete + } else { + shot.Delete = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterCreation + err := tierToArchive.AssignProperties_From_DateAfterCreation(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToArchive") + } + shot.TierToArchive = &tierToArchive + } else { + shot.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterCreation + err := tierToCold.AssignProperties_From_DateAfterCreation(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToCold") + } + shot.TierToCold = &tierToCold + } else { + shot.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterCreation + err := tierToCool.AssignProperties_From_DateAfterCreation(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToCool") + } + shot.TierToCool = &tierToCool + } else { + shot.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterCreation + err := tierToHot.AssignProperties_From_DateAfterCreation(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToHot") + } + shot.TierToHot = &tierToHot + } else { + shot.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + shot.PropertyBag = propertyBag + } else { + shot.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicySnapShot interface (if implemented) to customize the conversion + var shotAsAny any = shot + if augmentedShot, ok := shotAsAny.(augmentConversionForManagementPolicySnapShot); ok { + err := augmentedShot.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicySnapShot populates the provided destination ManagementPolicySnapShot from our ManagementPolicySnapShot +func (shot *ManagementPolicySnapShot) AssignProperties_To_ManagementPolicySnapShot(destination *v20230101s.ManagementPolicySnapShot) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(shot.PropertyBag) + + // Delete + if shot.Delete != nil { + var delete v20230101s.DateAfterCreation + err := shot.Delete.AssignProperties_To_DateAfterCreation(&delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field Delete") + } + destination.Delete = &delete + } else { + destination.Delete = nil + } + + // TierToArchive + if shot.TierToArchive != nil { + var tierToArchive v20230101s.DateAfterCreation + err := shot.TierToArchive.AssignProperties_To_DateAfterCreation(&tierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToArchive") + } + destination.TierToArchive = &tierToArchive + } else { + destination.TierToArchive = nil + } + + // TierToCold + if shot.TierToCold != nil { + var tierToCold v20230101s.DateAfterCreation + err := shot.TierToCold.AssignProperties_To_DateAfterCreation(&tierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToCold") + } + destination.TierToCold = &tierToCold + } else { + destination.TierToCold = nil + } + + // TierToCool + if shot.TierToCool != nil { + var tierToCool v20230101s.DateAfterCreation + err := shot.TierToCool.AssignProperties_To_DateAfterCreation(&tierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToCool") + } + destination.TierToCool = &tierToCool + } else { + destination.TierToCool = nil + } + + // TierToHot + if shot.TierToHot != nil { + var tierToHot v20230101s.DateAfterCreation + err := shot.TierToHot.AssignProperties_To_DateAfterCreation(&tierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToHot") + } + destination.TierToHot = &tierToHot + } else { + destination.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicySnapShot interface (if implemented) to customize the conversion + var shotAsAny any = shot + if augmentedShot, ok := shotAsAny.(augmentConversionForManagementPolicySnapShot); ok { + err := augmentedShot.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220901.ManagementPolicySnapShot_STATUS +// Management policy action for snapshot. +type ManagementPolicySnapShot_STATUS struct { + Delete *DateAfterCreation_STATUS `json:"delete,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TierToArchive *DateAfterCreation_STATUS `json:"tierToArchive,omitempty"` + TierToCold *DateAfterCreation_STATUS `json:"tierToCold,omitempty"` + TierToCool *DateAfterCreation_STATUS `json:"tierToCool,omitempty"` + TierToHot *DateAfterCreation_STATUS `json:"tierToHot,omitempty"` +} + +// AssignProperties_From_ManagementPolicySnapShot_STATUS populates our ManagementPolicySnapShot_STATUS from the provided source ManagementPolicySnapShot_STATUS +func (shot *ManagementPolicySnapShot_STATUS) AssignProperties_From_ManagementPolicySnapShot_STATUS(source *v20230101s.ManagementPolicySnapShot_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Delete + if source.Delete != nil { + var delete DateAfterCreation_STATUS + err := delete.AssignProperties_From_DateAfterCreation_STATUS(source.Delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field Delete") + } + shot.Delete = &delete + } else { + shot.Delete = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterCreation_STATUS + err := tierToArchive.AssignProperties_From_DateAfterCreation_STATUS(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToArchive") + } + shot.TierToArchive = &tierToArchive + } else { + shot.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterCreation_STATUS + err := tierToCold.AssignProperties_From_DateAfterCreation_STATUS(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToCold") + } + shot.TierToCold = &tierToCold + } else { + shot.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterCreation_STATUS + err := tierToCool.AssignProperties_From_DateAfterCreation_STATUS(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToCool") + } + shot.TierToCool = &tierToCool + } else { + shot.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterCreation_STATUS + err := tierToHot.AssignProperties_From_DateAfterCreation_STATUS(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToHot") + } + shot.TierToHot = &tierToHot + } else { + shot.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + shot.PropertyBag = propertyBag + } else { + shot.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicySnapShot_STATUS interface (if implemented) to customize the conversion + var shotAsAny any = shot + if augmentedShot, ok := shotAsAny.(augmentConversionForManagementPolicySnapShot_STATUS); ok { + err := augmentedShot.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicySnapShot_STATUS populates the provided destination ManagementPolicySnapShot_STATUS from our ManagementPolicySnapShot_STATUS +func (shot *ManagementPolicySnapShot_STATUS) AssignProperties_To_ManagementPolicySnapShot_STATUS(destination *v20230101s.ManagementPolicySnapShot_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(shot.PropertyBag) + + // Delete + if shot.Delete != nil { + var delete v20230101s.DateAfterCreation_STATUS + err := shot.Delete.AssignProperties_To_DateAfterCreation_STATUS(&delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field Delete") + } + destination.Delete = &delete + } else { + destination.Delete = nil + } + + // TierToArchive + if shot.TierToArchive != nil { + var tierToArchive v20230101s.DateAfterCreation_STATUS + err := shot.TierToArchive.AssignProperties_To_DateAfterCreation_STATUS(&tierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToArchive") + } + destination.TierToArchive = &tierToArchive + } else { + destination.TierToArchive = nil + } + + // TierToCold + if shot.TierToCold != nil { + var tierToCold v20230101s.DateAfterCreation_STATUS + err := shot.TierToCold.AssignProperties_To_DateAfterCreation_STATUS(&tierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToCold") + } + destination.TierToCold = &tierToCold + } else { + destination.TierToCold = nil + } + + // TierToCool + if shot.TierToCool != nil { + var tierToCool v20230101s.DateAfterCreation_STATUS + err := shot.TierToCool.AssignProperties_To_DateAfterCreation_STATUS(&tierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToCool") + } + destination.TierToCool = &tierToCool + } else { + destination.TierToCool = nil + } + + // TierToHot + if shot.TierToHot != nil { + var tierToHot v20230101s.DateAfterCreation_STATUS + err := shot.TierToHot.AssignProperties_To_DateAfterCreation_STATUS(&tierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToHot") + } + destination.TierToHot = &tierToHot + } else { + destination.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicySnapShot_STATUS interface (if implemented) to customize the conversion + var shotAsAny any = shot + if augmentedShot, ok := shotAsAny.(augmentConversionForManagementPolicySnapShot_STATUS); ok { + err := augmentedShot.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } // Storage version of v1api20220901.ManagementPolicyVersion @@ -349,6 +2486,176 @@ type ManagementPolicyVersion struct { TierToHot *DateAfterCreation `json:"tierToHot,omitempty"` } +// AssignProperties_From_ManagementPolicyVersion populates our ManagementPolicyVersion from the provided source ManagementPolicyVersion +func (version *ManagementPolicyVersion) AssignProperties_From_ManagementPolicyVersion(source *v20230101s.ManagementPolicyVersion) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Delete + if source.Delete != nil { + var delete DateAfterCreation + err := delete.AssignProperties_From_DateAfterCreation(source.Delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field Delete") + } + version.Delete = &delete + } else { + version.Delete = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterCreation + err := tierToArchive.AssignProperties_From_DateAfterCreation(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToArchive") + } + version.TierToArchive = &tierToArchive + } else { + version.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterCreation + err := tierToCold.AssignProperties_From_DateAfterCreation(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToCold") + } + version.TierToCold = &tierToCold + } else { + version.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterCreation + err := tierToCool.AssignProperties_From_DateAfterCreation(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToCool") + } + version.TierToCool = &tierToCool + } else { + version.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterCreation + err := tierToHot.AssignProperties_From_DateAfterCreation(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToHot") + } + version.TierToHot = &tierToHot + } else { + version.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + version.PropertyBag = propertyBag + } else { + version.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyVersion interface (if implemented) to customize the conversion + var versionAsAny any = version + if augmentedVersion, ok := versionAsAny.(augmentConversionForManagementPolicyVersion); ok { + err := augmentedVersion.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyVersion populates the provided destination ManagementPolicyVersion from our ManagementPolicyVersion +func (version *ManagementPolicyVersion) AssignProperties_To_ManagementPolicyVersion(destination *v20230101s.ManagementPolicyVersion) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(version.PropertyBag) + + // Delete + if version.Delete != nil { + var delete v20230101s.DateAfterCreation + err := version.Delete.AssignProperties_To_DateAfterCreation(&delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field Delete") + } + destination.Delete = &delete + } else { + destination.Delete = nil + } + + // TierToArchive + if version.TierToArchive != nil { + var tierToArchive v20230101s.DateAfterCreation + err := version.TierToArchive.AssignProperties_To_DateAfterCreation(&tierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToArchive") + } + destination.TierToArchive = &tierToArchive + } else { + destination.TierToArchive = nil + } + + // TierToCold + if version.TierToCold != nil { + var tierToCold v20230101s.DateAfterCreation + err := version.TierToCold.AssignProperties_To_DateAfterCreation(&tierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToCold") + } + destination.TierToCold = &tierToCold + } else { + destination.TierToCold = nil + } + + // TierToCool + if version.TierToCool != nil { + var tierToCool v20230101s.DateAfterCreation + err := version.TierToCool.AssignProperties_To_DateAfterCreation(&tierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToCool") + } + destination.TierToCool = &tierToCool + } else { + destination.TierToCool = nil + } + + // TierToHot + if version.TierToHot != nil { + var tierToHot v20230101s.DateAfterCreation + err := version.TierToHot.AssignProperties_To_DateAfterCreation(&tierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToHot") + } + destination.TierToHot = &tierToHot + } else { + destination.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyVersion interface (if implemented) to customize the conversion + var versionAsAny any = version + if augmentedVersion, ok := versionAsAny.(augmentConversionForManagementPolicyVersion); ok { + err := augmentedVersion.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.ManagementPolicyVersion_STATUS // Management policy action for blob version. type ManagementPolicyVersion_STATUS struct { @@ -360,6 +2667,176 @@ type ManagementPolicyVersion_STATUS struct { TierToHot *DateAfterCreation_STATUS `json:"tierToHot,omitempty"` } +// AssignProperties_From_ManagementPolicyVersion_STATUS populates our ManagementPolicyVersion_STATUS from the provided source ManagementPolicyVersion_STATUS +func (version *ManagementPolicyVersion_STATUS) AssignProperties_From_ManagementPolicyVersion_STATUS(source *v20230101s.ManagementPolicyVersion_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Delete + if source.Delete != nil { + var delete DateAfterCreation_STATUS + err := delete.AssignProperties_From_DateAfterCreation_STATUS(source.Delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field Delete") + } + version.Delete = &delete + } else { + version.Delete = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterCreation_STATUS + err := tierToArchive.AssignProperties_From_DateAfterCreation_STATUS(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToArchive") + } + version.TierToArchive = &tierToArchive + } else { + version.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterCreation_STATUS + err := tierToCold.AssignProperties_From_DateAfterCreation_STATUS(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToCold") + } + version.TierToCold = &tierToCold + } else { + version.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterCreation_STATUS + err := tierToCool.AssignProperties_From_DateAfterCreation_STATUS(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToCool") + } + version.TierToCool = &tierToCool + } else { + version.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterCreation_STATUS + err := tierToHot.AssignProperties_From_DateAfterCreation_STATUS(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToHot") + } + version.TierToHot = &tierToHot + } else { + version.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + version.PropertyBag = propertyBag + } else { + version.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyVersion_STATUS interface (if implemented) to customize the conversion + var versionAsAny any = version + if augmentedVersion, ok := versionAsAny.(augmentConversionForManagementPolicyVersion_STATUS); ok { + err := augmentedVersion.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyVersion_STATUS populates the provided destination ManagementPolicyVersion_STATUS from our ManagementPolicyVersion_STATUS +func (version *ManagementPolicyVersion_STATUS) AssignProperties_To_ManagementPolicyVersion_STATUS(destination *v20230101s.ManagementPolicyVersion_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(version.PropertyBag) + + // Delete + if version.Delete != nil { + var delete v20230101s.DateAfterCreation_STATUS + err := version.Delete.AssignProperties_To_DateAfterCreation_STATUS(&delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field Delete") + } + destination.Delete = &delete + } else { + destination.Delete = nil + } + + // TierToArchive + if version.TierToArchive != nil { + var tierToArchive v20230101s.DateAfterCreation_STATUS + err := version.TierToArchive.AssignProperties_To_DateAfterCreation_STATUS(&tierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToArchive") + } + destination.TierToArchive = &tierToArchive + } else { + destination.TierToArchive = nil + } + + // TierToCold + if version.TierToCold != nil { + var tierToCold v20230101s.DateAfterCreation_STATUS + err := version.TierToCold.AssignProperties_To_DateAfterCreation_STATUS(&tierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToCold") + } + destination.TierToCold = &tierToCold + } else { + destination.TierToCold = nil + } + + // TierToCool + if version.TierToCool != nil { + var tierToCool v20230101s.DateAfterCreation_STATUS + err := version.TierToCool.AssignProperties_To_DateAfterCreation_STATUS(&tierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToCool") + } + destination.TierToCool = &tierToCool + } else { + destination.TierToCool = nil + } + + // TierToHot + if version.TierToHot != nil { + var tierToHot v20230101s.DateAfterCreation_STATUS + err := version.TierToHot.AssignProperties_To_DateAfterCreation_STATUS(&tierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToHot") + } + destination.TierToHot = &tierToHot + } else { + destination.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagementPolicyVersion_STATUS interface (if implemented) to customize the conversion + var versionAsAny any = version + if augmentedVersion, ok := versionAsAny.(augmentConversionForManagementPolicyVersion_STATUS); ok { + err := augmentedVersion.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.TagFilter // Blob index tag based filtering for blob objects type TagFilter struct { @@ -369,6 +2846,74 @@ type TagFilter struct { Value *string `json:"value,omitempty"` } +// AssignProperties_From_TagFilter populates our TagFilter from the provided source TagFilter +func (filter *TagFilter) AssignProperties_From_TagFilter(source *v20230101s.TagFilter) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Name + filter.Name = genruntime.ClonePointerToString(source.Name) + + // Op + filter.Op = genruntime.ClonePointerToString(source.Op) + + // Value + filter.Value = genruntime.ClonePointerToString(source.Value) + + // Update the property bag + if len(propertyBag) > 0 { + filter.PropertyBag = propertyBag + } else { + filter.PropertyBag = nil + } + + // Invoke the augmentConversionForTagFilter interface (if implemented) to customize the conversion + var filterAsAny any = filter + if augmentedFilter, ok := filterAsAny.(augmentConversionForTagFilter); ok { + err := augmentedFilter.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_TagFilter populates the provided destination TagFilter from our TagFilter +func (filter *TagFilter) AssignProperties_To_TagFilter(destination *v20230101s.TagFilter) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(filter.PropertyBag) + + // Name + destination.Name = genruntime.ClonePointerToString(filter.Name) + + // Op + destination.Op = genruntime.ClonePointerToString(filter.Op) + + // Value + destination.Value = genruntime.ClonePointerToString(filter.Value) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForTagFilter interface (if implemented) to customize the conversion + var filterAsAny any = filter + if augmentedFilter, ok := filterAsAny.(augmentConversionForTagFilter); ok { + err := augmentedFilter.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.TagFilter_STATUS // Blob index tag based filtering for blob objects type TagFilter_STATUS struct { @@ -378,6 +2923,114 @@ type TagFilter_STATUS struct { Value *string `json:"value,omitempty"` } +// AssignProperties_From_TagFilter_STATUS populates our TagFilter_STATUS from the provided source TagFilter_STATUS +func (filter *TagFilter_STATUS) AssignProperties_From_TagFilter_STATUS(source *v20230101s.TagFilter_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Name + filter.Name = genruntime.ClonePointerToString(source.Name) + + // Op + filter.Op = genruntime.ClonePointerToString(source.Op) + + // Value + filter.Value = genruntime.ClonePointerToString(source.Value) + + // Update the property bag + if len(propertyBag) > 0 { + filter.PropertyBag = propertyBag + } else { + filter.PropertyBag = nil + } + + // Invoke the augmentConversionForTagFilter_STATUS interface (if implemented) to customize the conversion + var filterAsAny any = filter + if augmentedFilter, ok := filterAsAny.(augmentConversionForTagFilter_STATUS); ok { + err := augmentedFilter.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_TagFilter_STATUS populates the provided destination TagFilter_STATUS from our TagFilter_STATUS +func (filter *TagFilter_STATUS) AssignProperties_To_TagFilter_STATUS(destination *v20230101s.TagFilter_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(filter.PropertyBag) + + // Name + destination.Name = genruntime.ClonePointerToString(filter.Name) + + // Op + destination.Op = genruntime.ClonePointerToString(filter.Op) + + // Value + destination.Value = genruntime.ClonePointerToString(filter.Value) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForTagFilter_STATUS interface (if implemented) to customize the conversion + var filterAsAny any = filter + if augmentedFilter, ok := filterAsAny.(augmentConversionForTagFilter_STATUS); ok { + err := augmentedFilter.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForManagementPolicyBaseBlob interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicyBaseBlob) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicyBaseBlob) error +} + +type augmentConversionForManagementPolicyBaseBlob_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicyBaseBlob_STATUS) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicyBaseBlob_STATUS) error +} + +type augmentConversionForManagementPolicySnapShot interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicySnapShot) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicySnapShot) error +} + +type augmentConversionForManagementPolicySnapShot_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicySnapShot_STATUS) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicySnapShot_STATUS) error +} + +type augmentConversionForManagementPolicyVersion interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicyVersion) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicyVersion) error +} + +type augmentConversionForManagementPolicyVersion_STATUS interface { + AssignPropertiesFrom(src *v20230101s.ManagementPolicyVersion_STATUS) error + AssignPropertiesTo(dst *v20230101s.ManagementPolicyVersion_STATUS) error +} + +type augmentConversionForTagFilter interface { + AssignPropertiesFrom(src *v20230101s.TagFilter) error + AssignPropertiesTo(dst *v20230101s.TagFilter) error +} + +type augmentConversionForTagFilter_STATUS interface { + AssignPropertiesFrom(src *v20230101s.TagFilter_STATUS) error + AssignPropertiesTo(dst *v20230101s.TagFilter_STATUS) error +} + // Storage version of v1api20220901.DateAfterCreation // Object to define snapshot and version action conditions. type DateAfterCreation struct { @@ -386,6 +3039,68 @@ type DateAfterCreation struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_DateAfterCreation populates our DateAfterCreation from the provided source DateAfterCreation +func (creation *DateAfterCreation) AssignProperties_From_DateAfterCreation(source *v20230101s.DateAfterCreation) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // DaysAfterCreationGreaterThan + creation.DaysAfterCreationGreaterThan = genruntime.ClonePointerToInt(source.DaysAfterCreationGreaterThan) + + // DaysAfterLastTierChangeGreaterThan + creation.DaysAfterLastTierChangeGreaterThan = genruntime.ClonePointerToInt(source.DaysAfterLastTierChangeGreaterThan) + + // Update the property bag + if len(propertyBag) > 0 { + creation.PropertyBag = propertyBag + } else { + creation.PropertyBag = nil + } + + // Invoke the augmentConversionForDateAfterCreation interface (if implemented) to customize the conversion + var creationAsAny any = creation + if augmentedCreation, ok := creationAsAny.(augmentConversionForDateAfterCreation); ok { + err := augmentedCreation.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_DateAfterCreation populates the provided destination DateAfterCreation from our DateAfterCreation +func (creation *DateAfterCreation) AssignProperties_To_DateAfterCreation(destination *v20230101s.DateAfterCreation) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(creation.PropertyBag) + + // DaysAfterCreationGreaterThan + destination.DaysAfterCreationGreaterThan = genruntime.ClonePointerToInt(creation.DaysAfterCreationGreaterThan) + + // DaysAfterLastTierChangeGreaterThan + destination.DaysAfterLastTierChangeGreaterThan = genruntime.ClonePointerToInt(creation.DaysAfterLastTierChangeGreaterThan) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForDateAfterCreation interface (if implemented) to customize the conversion + var creationAsAny any = creation + if augmentedCreation, ok := creationAsAny.(augmentConversionForDateAfterCreation); ok { + err := augmentedCreation.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.DateAfterCreation_STATUS // Object to define snapshot and version action conditions. type DateAfterCreation_STATUS struct { @@ -394,6 +3109,88 @@ type DateAfterCreation_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_DateAfterCreation_STATUS populates our DateAfterCreation_STATUS from the provided source DateAfterCreation_STATUS +func (creation *DateAfterCreation_STATUS) AssignProperties_From_DateAfterCreation_STATUS(source *v20230101s.DateAfterCreation_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // DaysAfterCreationGreaterThan + if source.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *source.DaysAfterCreationGreaterThan + creation.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + creation.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if source.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *source.DaysAfterLastTierChangeGreaterThan + creation.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + creation.DaysAfterLastTierChangeGreaterThan = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + creation.PropertyBag = propertyBag + } else { + creation.PropertyBag = nil + } + + // Invoke the augmentConversionForDateAfterCreation_STATUS interface (if implemented) to customize the conversion + var creationAsAny any = creation + if augmentedCreation, ok := creationAsAny.(augmentConversionForDateAfterCreation_STATUS); ok { + err := augmentedCreation.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_DateAfterCreation_STATUS populates the provided destination DateAfterCreation_STATUS from our DateAfterCreation_STATUS +func (creation *DateAfterCreation_STATUS) AssignProperties_To_DateAfterCreation_STATUS(destination *v20230101s.DateAfterCreation_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(creation.PropertyBag) + + // DaysAfterCreationGreaterThan + if creation.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *creation.DaysAfterCreationGreaterThan + destination.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + destination.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if creation.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *creation.DaysAfterLastTierChangeGreaterThan + destination.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + destination.DaysAfterLastTierChangeGreaterThan = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForDateAfterCreation_STATUS interface (if implemented) to customize the conversion + var creationAsAny any = creation + if augmentedCreation, ok := creationAsAny.(augmentConversionForDateAfterCreation_STATUS); ok { + err := augmentedCreation.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.DateAfterModification // Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, // daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The @@ -408,6 +3205,80 @@ type DateAfterModification struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_DateAfterModification populates our DateAfterModification from the provided source DateAfterModification +func (modification *DateAfterModification) AssignProperties_From_DateAfterModification(source *v20230101s.DateAfterModification) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // DaysAfterCreationGreaterThan + modification.DaysAfterCreationGreaterThan = genruntime.ClonePointerToInt(source.DaysAfterCreationGreaterThan) + + // DaysAfterLastAccessTimeGreaterThan + modification.DaysAfterLastAccessTimeGreaterThan = genruntime.ClonePointerToInt(source.DaysAfterLastAccessTimeGreaterThan) + + // DaysAfterLastTierChangeGreaterThan + modification.DaysAfterLastTierChangeGreaterThan = genruntime.ClonePointerToInt(source.DaysAfterLastTierChangeGreaterThan) + + // DaysAfterModificationGreaterThan + modification.DaysAfterModificationGreaterThan = genruntime.ClonePointerToInt(source.DaysAfterModificationGreaterThan) + + // Update the property bag + if len(propertyBag) > 0 { + modification.PropertyBag = propertyBag + } else { + modification.PropertyBag = nil + } + + // Invoke the augmentConversionForDateAfterModification interface (if implemented) to customize the conversion + var modificationAsAny any = modification + if augmentedModification, ok := modificationAsAny.(augmentConversionForDateAfterModification); ok { + err := augmentedModification.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_DateAfterModification populates the provided destination DateAfterModification from our DateAfterModification +func (modification *DateAfterModification) AssignProperties_To_DateAfterModification(destination *v20230101s.DateAfterModification) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(modification.PropertyBag) + + // DaysAfterCreationGreaterThan + destination.DaysAfterCreationGreaterThan = genruntime.ClonePointerToInt(modification.DaysAfterCreationGreaterThan) + + // DaysAfterLastAccessTimeGreaterThan + destination.DaysAfterLastAccessTimeGreaterThan = genruntime.ClonePointerToInt(modification.DaysAfterLastAccessTimeGreaterThan) + + // DaysAfterLastTierChangeGreaterThan + destination.DaysAfterLastTierChangeGreaterThan = genruntime.ClonePointerToInt(modification.DaysAfterLastTierChangeGreaterThan) + + // DaysAfterModificationGreaterThan + destination.DaysAfterModificationGreaterThan = genruntime.ClonePointerToInt(modification.DaysAfterModificationGreaterThan) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForDateAfterModification interface (if implemented) to customize the conversion + var modificationAsAny any = modification + if augmentedModification, ok := modificationAsAny.(augmentConversionForDateAfterModification); ok { + err := augmentedModification.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.DateAfterModification_STATUS // Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, // daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The @@ -422,6 +3293,140 @@ type DateAfterModification_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_DateAfterModification_STATUS populates our DateAfterModification_STATUS from the provided source DateAfterModification_STATUS +func (modification *DateAfterModification_STATUS) AssignProperties_From_DateAfterModification_STATUS(source *v20230101s.DateAfterModification_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // DaysAfterCreationGreaterThan + if source.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *source.DaysAfterCreationGreaterThan + modification.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + modification.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastAccessTimeGreaterThan + if source.DaysAfterLastAccessTimeGreaterThan != nil { + daysAfterLastAccessTimeGreaterThan := *source.DaysAfterLastAccessTimeGreaterThan + modification.DaysAfterLastAccessTimeGreaterThan = &daysAfterLastAccessTimeGreaterThan + } else { + modification.DaysAfterLastAccessTimeGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if source.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *source.DaysAfterLastTierChangeGreaterThan + modification.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + modification.DaysAfterLastTierChangeGreaterThan = nil + } + + // DaysAfterModificationGreaterThan + if source.DaysAfterModificationGreaterThan != nil { + daysAfterModificationGreaterThan := *source.DaysAfterModificationGreaterThan + modification.DaysAfterModificationGreaterThan = &daysAfterModificationGreaterThan + } else { + modification.DaysAfterModificationGreaterThan = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + modification.PropertyBag = propertyBag + } else { + modification.PropertyBag = nil + } + + // Invoke the augmentConversionForDateAfterModification_STATUS interface (if implemented) to customize the conversion + var modificationAsAny any = modification + if augmentedModification, ok := modificationAsAny.(augmentConversionForDateAfterModification_STATUS); ok { + err := augmentedModification.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_DateAfterModification_STATUS populates the provided destination DateAfterModification_STATUS from our DateAfterModification_STATUS +func (modification *DateAfterModification_STATUS) AssignProperties_To_DateAfterModification_STATUS(destination *v20230101s.DateAfterModification_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(modification.PropertyBag) + + // DaysAfterCreationGreaterThan + if modification.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *modification.DaysAfterCreationGreaterThan + destination.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + destination.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastAccessTimeGreaterThan + if modification.DaysAfterLastAccessTimeGreaterThan != nil { + daysAfterLastAccessTimeGreaterThan := *modification.DaysAfterLastAccessTimeGreaterThan + destination.DaysAfterLastAccessTimeGreaterThan = &daysAfterLastAccessTimeGreaterThan + } else { + destination.DaysAfterLastAccessTimeGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if modification.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *modification.DaysAfterLastTierChangeGreaterThan + destination.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + destination.DaysAfterLastTierChangeGreaterThan = nil + } + + // DaysAfterModificationGreaterThan + if modification.DaysAfterModificationGreaterThan != nil { + daysAfterModificationGreaterThan := *modification.DaysAfterModificationGreaterThan + destination.DaysAfterModificationGreaterThan = &daysAfterModificationGreaterThan + } else { + destination.DaysAfterModificationGreaterThan = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForDateAfterModification_STATUS interface (if implemented) to customize the conversion + var modificationAsAny any = modification + if augmentedModification, ok := modificationAsAny.(augmentConversionForDateAfterModification_STATUS); ok { + err := augmentedModification.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForDateAfterCreation interface { + AssignPropertiesFrom(src *v20230101s.DateAfterCreation) error + AssignPropertiesTo(dst *v20230101s.DateAfterCreation) error +} + +type augmentConversionForDateAfterCreation_STATUS interface { + AssignPropertiesFrom(src *v20230101s.DateAfterCreation_STATUS) error + AssignPropertiesTo(dst *v20230101s.DateAfterCreation_STATUS) error +} + +type augmentConversionForDateAfterModification interface { + AssignPropertiesFrom(src *v20230101s.DateAfterModification) error + AssignPropertiesTo(dst *v20230101s.DateAfterModification) error +} + +type augmentConversionForDateAfterModification_STATUS interface { + AssignPropertiesFrom(src *v20230101s.DateAfterModification_STATUS) error + AssignPropertiesTo(dst *v20230101s.DateAfterModification_STATUS) error +} + func init() { SchemeBuilder.Register(&StorageAccountsManagementPolicy{}, &StorageAccountsManagementPolicyList{}) } diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_management_policy_types_gen_test.go b/v2/api/storage/v1api20220901/storage/storage_accounts_management_policy_types_gen_test.go index 0d48cc5db97..0584a221d54 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_management_policy_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_management_policy_types_gen_test.go @@ -5,6 +5,7 @@ package storage import ( "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -17,6 +18,91 @@ import ( "testing" ) +func Test_StorageAccountsManagementPolicy_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsManagementPolicy to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsManagementPolicy, StorageAccountsManagementPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsManagementPolicy tests if a specific instance of StorageAccountsManagementPolicy round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsManagementPolicy(subject StorageAccountsManagementPolicy) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsManagementPolicy + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsManagementPolicy + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsManagementPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsManagementPolicy to StorageAccountsManagementPolicy via AssignProperties_To_StorageAccountsManagementPolicy & AssignProperties_From_StorageAccountsManagementPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsManagementPolicy, StorageAccountsManagementPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsManagementPolicy tests if a specific instance of StorageAccountsManagementPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsManagementPolicy(subject StorageAccountsManagementPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsManagementPolicy + err := copied.AssignProperties_To_StorageAccountsManagementPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsManagementPolicy + err = actual.AssignProperties_From_StorageAccountsManagementPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountsManagementPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -79,6 +165,48 @@ func AddRelatedPropertyGeneratorsForStorageAccountsManagementPolicy(gens map[str gens["Status"] = StorageAccounts_ManagementPolicy_STATUSGenerator() } +func Test_StorageAccounts_ManagementPolicy_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_ManagementPolicy_Spec to StorageAccounts_ManagementPolicy_Spec via AssignProperties_To_StorageAccounts_ManagementPolicy_Spec & AssignProperties_From_StorageAccounts_ManagementPolicy_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_ManagementPolicy_Spec, StorageAccounts_ManagementPolicy_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_ManagementPolicy_Spec tests if a specific instance of StorageAccounts_ManagementPolicy_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_ManagementPolicy_Spec(subject StorageAccounts_ManagementPolicy_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_ManagementPolicy_Spec + err := copied.AssignProperties_To_StorageAccounts_ManagementPolicy_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_ManagementPolicy_Spec + err = actual.AssignProperties_From_StorageAccounts_ManagementPolicy_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_ManagementPolicy_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -154,6 +282,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec(gens m gens["Policy"] = gen.PtrOf(ManagementPolicySchemaGenerator()) } +func Test_StorageAccounts_ManagementPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_ManagementPolicy_STATUS to StorageAccounts_ManagementPolicy_STATUS via AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS & AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_ManagementPolicy_STATUS, StorageAccounts_ManagementPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_ManagementPolicy_STATUS tests if a specific instance of StorageAccounts_ManagementPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_ManagementPolicy_STATUS(subject StorageAccounts_ManagementPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_ManagementPolicy_STATUS + err := copied.AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_ManagementPolicy_STATUS + err = actual.AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_ManagementPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -232,6 +402,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS(gens gens["Policy"] = gen.PtrOf(ManagementPolicySchema_STATUSGenerator()) } +func Test_ManagementPolicySchema_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicySchema to ManagementPolicySchema via AssignProperties_To_ManagementPolicySchema & AssignProperties_From_ManagementPolicySchema returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicySchema, ManagementPolicySchemaGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicySchema tests if a specific instance of ManagementPolicySchema can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicySchema(subject ManagementPolicySchema) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicySchema + err := copied.AssignProperties_To_ManagementPolicySchema(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicySchema + err = actual.AssignProperties_From_ManagementPolicySchema(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicySchema_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -293,6 +505,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicySchema(gens map[string]gopte gens["Rules"] = gen.SliceOf(ManagementPolicyRuleGenerator()) } +func Test_ManagementPolicySchema_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicySchema_STATUS to ManagementPolicySchema_STATUS via AssignProperties_To_ManagementPolicySchema_STATUS & AssignProperties_From_ManagementPolicySchema_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicySchema_STATUS, ManagementPolicySchema_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicySchema_STATUS tests if a specific instance of ManagementPolicySchema_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicySchema_STATUS(subject ManagementPolicySchema_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicySchema_STATUS + err := copied.AssignProperties_To_ManagementPolicySchema_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicySchema_STATUS + err = actual.AssignProperties_From_ManagementPolicySchema_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicySchema_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -354,6 +608,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicySchema_STATUS(gens map[strin gens["Rules"] = gen.SliceOf(ManagementPolicyRule_STATUSGenerator()) } +func Test_ManagementPolicyRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyRule to ManagementPolicyRule via AssignProperties_To_ManagementPolicyRule & AssignProperties_From_ManagementPolicyRule returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyRule, ManagementPolicyRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyRule tests if a specific instance of ManagementPolicyRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyRule(subject ManagementPolicyRule) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyRule + err := copied.AssignProperties_To_ManagementPolicyRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyRule + err = actual.AssignProperties_From_ManagementPolicyRule(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicyRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -431,6 +727,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicyRule(gens map[string]gopter. gens["Definition"] = gen.PtrOf(ManagementPolicyDefinitionGenerator()) } +func Test_ManagementPolicyRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyRule_STATUS to ManagementPolicyRule_STATUS via AssignProperties_To_ManagementPolicyRule_STATUS & AssignProperties_From_ManagementPolicyRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyRule_STATUS, ManagementPolicyRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyRule_STATUS tests if a specific instance of ManagementPolicyRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyRule_STATUS(subject ManagementPolicyRule_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyRule_STATUS + err := copied.AssignProperties_To_ManagementPolicyRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyRule_STATUS + err = actual.AssignProperties_From_ManagementPolicyRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicyRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -508,6 +846,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicyRule_STATUS(gens map[string] gens["Definition"] = gen.PtrOf(ManagementPolicyDefinition_STATUSGenerator()) } +func Test_ManagementPolicyDefinition_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyDefinition to ManagementPolicyDefinition via AssignProperties_To_ManagementPolicyDefinition & AssignProperties_From_ManagementPolicyDefinition returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyDefinition, ManagementPolicyDefinitionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyDefinition tests if a specific instance of ManagementPolicyDefinition can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyDefinition(subject ManagementPolicyDefinition) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyDefinition + err := copied.AssignProperties_To_ManagementPolicyDefinition(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyDefinition + err = actual.AssignProperties_From_ManagementPolicyDefinition(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicyDefinition_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -570,6 +950,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicyDefinition(gens map[string]g gens["Filters"] = gen.PtrOf(ManagementPolicyFilterGenerator()) } +func Test_ManagementPolicyDefinition_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyDefinition_STATUS to ManagementPolicyDefinition_STATUS via AssignProperties_To_ManagementPolicyDefinition_STATUS & AssignProperties_From_ManagementPolicyDefinition_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyDefinition_STATUS, ManagementPolicyDefinition_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyDefinition_STATUS tests if a specific instance of ManagementPolicyDefinition_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyDefinition_STATUS(subject ManagementPolicyDefinition_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyDefinition_STATUS + err := copied.AssignProperties_To_ManagementPolicyDefinition_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyDefinition_STATUS + err = actual.AssignProperties_From_ManagementPolicyDefinition_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicyDefinition_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -632,6 +1054,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicyDefinition_STATUS(gens map[s gens["Filters"] = gen.PtrOf(ManagementPolicyFilter_STATUSGenerator()) } +func Test_ManagementPolicyAction_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyAction to ManagementPolicyAction via AssignProperties_To_ManagementPolicyAction & AssignProperties_From_ManagementPolicyAction returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyAction, ManagementPolicyActionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyAction tests if a specific instance of ManagementPolicyAction can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyAction(subject ManagementPolicyAction) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyAction + err := copied.AssignProperties_To_ManagementPolicyAction(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyAction + err = actual.AssignProperties_From_ManagementPolicyAction(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicyAction_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -695,6 +1159,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicyAction(gens map[string]gopte gens["Version"] = gen.PtrOf(ManagementPolicyVersionGenerator()) } +func Test_ManagementPolicyAction_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyAction_STATUS to ManagementPolicyAction_STATUS via AssignProperties_To_ManagementPolicyAction_STATUS & AssignProperties_From_ManagementPolicyAction_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyAction_STATUS, ManagementPolicyAction_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyAction_STATUS tests if a specific instance of ManagementPolicyAction_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyAction_STATUS(subject ManagementPolicyAction_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyAction_STATUS + err := copied.AssignProperties_To_ManagementPolicyAction_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyAction_STATUS + err = actual.AssignProperties_From_ManagementPolicyAction_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicyAction_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -758,6 +1264,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicyAction_STATUS(gens map[strin gens["Version"] = gen.PtrOf(ManagementPolicyVersion_STATUSGenerator()) } +func Test_ManagementPolicyFilter_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyFilter to ManagementPolicyFilter via AssignProperties_To_ManagementPolicyFilter & AssignProperties_From_ManagementPolicyFilter returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyFilter, ManagementPolicyFilterGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyFilter tests if a specific instance of ManagementPolicyFilter can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyFilter(subject ManagementPolicyFilter) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyFilter + err := copied.AssignProperties_To_ManagementPolicyFilter(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyFilter + err = actual.AssignProperties_From_ManagementPolicyFilter(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicyFilter_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -834,6 +1382,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicyFilter(gens map[string]gopte gens["BlobIndexMatch"] = gen.SliceOf(TagFilterGenerator()) } +func Test_ManagementPolicyFilter_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyFilter_STATUS to ManagementPolicyFilter_STATUS via AssignProperties_To_ManagementPolicyFilter_STATUS & AssignProperties_From_ManagementPolicyFilter_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyFilter_STATUS, ManagementPolicyFilter_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyFilter_STATUS tests if a specific instance of ManagementPolicyFilter_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyFilter_STATUS(subject ManagementPolicyFilter_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyFilter_STATUS + err := copied.AssignProperties_To_ManagementPolicyFilter_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyFilter_STATUS + err = actual.AssignProperties_From_ManagementPolicyFilter_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicyFilter_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -910,6 +1500,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicyFilter_STATUS(gens map[strin gens["BlobIndexMatch"] = gen.SliceOf(TagFilter_STATUSGenerator()) } +func Test_ManagementPolicyBaseBlob_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyBaseBlob to ManagementPolicyBaseBlob via AssignProperties_To_ManagementPolicyBaseBlob & AssignProperties_From_ManagementPolicyBaseBlob returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyBaseBlob, ManagementPolicyBaseBlobGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyBaseBlob tests if a specific instance of ManagementPolicyBaseBlob can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyBaseBlob(subject ManagementPolicyBaseBlob) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyBaseBlob + err := copied.AssignProperties_To_ManagementPolicyBaseBlob(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyBaseBlob + err = actual.AssignProperties_From_ManagementPolicyBaseBlob(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicyBaseBlob_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -989,6 +1621,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob(gens map[string]gop gens["TierToHot"] = gen.PtrOf(DateAfterModificationGenerator()) } +func Test_ManagementPolicyBaseBlob_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyBaseBlob_STATUS to ManagementPolicyBaseBlob_STATUS via AssignProperties_To_ManagementPolicyBaseBlob_STATUS & AssignProperties_From_ManagementPolicyBaseBlob_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyBaseBlob_STATUS, ManagementPolicyBaseBlob_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyBaseBlob_STATUS tests if a specific instance of ManagementPolicyBaseBlob_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyBaseBlob_STATUS(subject ManagementPolicyBaseBlob_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyBaseBlob_STATUS + err := copied.AssignProperties_To_ManagementPolicyBaseBlob_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyBaseBlob_STATUS + err = actual.AssignProperties_From_ManagementPolicyBaseBlob_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicyBaseBlob_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1059,13 +1733,55 @@ func AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(gens map gens["EnableAutoTierToHotFromCool"] = gen.PtrOf(gen.Bool()) } -// AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(gens map[string]gopter.Gen) { - gens["Delete"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) - gens["TierToArchive"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) - gens["TierToCold"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) - gens["TierToCool"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) - gens["TierToHot"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) +// AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) +} + +func Test_ManagementPolicySnapShot_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicySnapShot to ManagementPolicySnapShot via AssignProperties_To_ManagementPolicySnapShot & AssignProperties_From_ManagementPolicySnapShot returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicySnapShot, ManagementPolicySnapShotGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicySnapShot tests if a specific instance of ManagementPolicySnapShot can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicySnapShot(subject ManagementPolicySnapShot) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicySnapShot + err := copied.AssignProperties_To_ManagementPolicySnapShot(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicySnapShot + err = actual.AssignProperties_From_ManagementPolicySnapShot(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" } func Test_ManagementPolicySnapShot_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { @@ -1133,6 +1849,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicySnapShot(gens map[string]gop gens["TierToHot"] = gen.PtrOf(DateAfterCreationGenerator()) } +func Test_ManagementPolicySnapShot_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicySnapShot_STATUS to ManagementPolicySnapShot_STATUS via AssignProperties_To_ManagementPolicySnapShot_STATUS & AssignProperties_From_ManagementPolicySnapShot_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicySnapShot_STATUS, ManagementPolicySnapShot_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicySnapShot_STATUS tests if a specific instance of ManagementPolicySnapShot_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicySnapShot_STATUS(subject ManagementPolicySnapShot_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicySnapShot_STATUS + err := copied.AssignProperties_To_ManagementPolicySnapShot_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicySnapShot_STATUS + err = actual.AssignProperties_From_ManagementPolicySnapShot_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicySnapShot_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1198,6 +1956,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicySnapShot_STATUS(gens map[str gens["TierToHot"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) } +func Test_ManagementPolicyVersion_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyVersion to ManagementPolicyVersion via AssignProperties_To_ManagementPolicyVersion & AssignProperties_From_ManagementPolicyVersion returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyVersion, ManagementPolicyVersionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyVersion tests if a specific instance of ManagementPolicyVersion can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyVersion(subject ManagementPolicyVersion) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyVersion + err := copied.AssignProperties_To_ManagementPolicyVersion(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyVersion + err = actual.AssignProperties_From_ManagementPolicyVersion(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicyVersion_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1263,6 +2063,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicyVersion(gens map[string]gopt gens["TierToHot"] = gen.PtrOf(DateAfterCreationGenerator()) } +func Test_ManagementPolicyVersion_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyVersion_STATUS to ManagementPolicyVersion_STATUS via AssignProperties_To_ManagementPolicyVersion_STATUS & AssignProperties_From_ManagementPolicyVersion_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyVersion_STATUS, ManagementPolicyVersion_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyVersion_STATUS tests if a specific instance of ManagementPolicyVersion_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyVersion_STATUS(subject ManagementPolicyVersion_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyVersion_STATUS + err := copied.AssignProperties_To_ManagementPolicyVersion_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyVersion_STATUS + err = actual.AssignProperties_From_ManagementPolicyVersion_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ManagementPolicyVersion_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1328,6 +2170,48 @@ func AddRelatedPropertyGeneratorsForManagementPolicyVersion_STATUS(gens map[stri gens["TierToHot"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) } +func Test_TagFilter_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TagFilter to TagFilter via AssignProperties_To_TagFilter & AssignProperties_From_TagFilter returns original", + prop.ForAll(RunPropertyAssignmentTestForTagFilter, TagFilterGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTagFilter tests if a specific instance of TagFilter can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTagFilter(subject TagFilter) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TagFilter + err := copied.AssignProperties_To_TagFilter(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TagFilter + err = actual.AssignProperties_From_TagFilter(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_TagFilter_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1390,6 +2274,48 @@ func AddIndependentPropertyGeneratorsForTagFilter(gens map[string]gopter.Gen) { gens["Value"] = gen.PtrOf(gen.AlphaString()) } +func Test_TagFilter_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TagFilter_STATUS to TagFilter_STATUS via AssignProperties_To_TagFilter_STATUS & AssignProperties_From_TagFilter_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForTagFilter_STATUS, TagFilter_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTagFilter_STATUS tests if a specific instance of TagFilter_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTagFilter_STATUS(subject TagFilter_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TagFilter_STATUS + err := copied.AssignProperties_To_TagFilter_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TagFilter_STATUS + err = actual.AssignProperties_From_TagFilter_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_TagFilter_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1452,6 +2378,48 @@ func AddIndependentPropertyGeneratorsForTagFilter_STATUS(gens map[string]gopter. gens["Value"] = gen.PtrOf(gen.AlphaString()) } +func Test_DateAfterCreation_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DateAfterCreation to DateAfterCreation via AssignProperties_To_DateAfterCreation & AssignProperties_From_DateAfterCreation returns original", + prop.ForAll(RunPropertyAssignmentTestForDateAfterCreation, DateAfterCreationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDateAfterCreation tests if a specific instance of DateAfterCreation can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDateAfterCreation(subject DateAfterCreation) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.DateAfterCreation + err := copied.AssignProperties_To_DateAfterCreation(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DateAfterCreation + err = actual.AssignProperties_From_DateAfterCreation(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_DateAfterCreation_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1513,6 +2481,48 @@ func AddIndependentPropertyGeneratorsForDateAfterCreation(gens map[string]gopter gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Int()) } +func Test_DateAfterCreation_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DateAfterCreation_STATUS to DateAfterCreation_STATUS via AssignProperties_To_DateAfterCreation_STATUS & AssignProperties_From_DateAfterCreation_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForDateAfterCreation_STATUS, DateAfterCreation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDateAfterCreation_STATUS tests if a specific instance of DateAfterCreation_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDateAfterCreation_STATUS(subject DateAfterCreation_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.DateAfterCreation_STATUS + err := copied.AssignProperties_To_DateAfterCreation_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DateAfterCreation_STATUS + err = actual.AssignProperties_From_DateAfterCreation_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_DateAfterCreation_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1575,6 +2585,48 @@ func AddIndependentPropertyGeneratorsForDateAfterCreation_STATUS(gens map[string gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Float64()) } +func Test_DateAfterModification_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DateAfterModification to DateAfterModification via AssignProperties_To_DateAfterModification & AssignProperties_From_DateAfterModification returns original", + prop.ForAll(RunPropertyAssignmentTestForDateAfterModification, DateAfterModificationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDateAfterModification tests if a specific instance of DateAfterModification can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDateAfterModification(subject DateAfterModification) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.DateAfterModification + err := copied.AssignProperties_To_DateAfterModification(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DateAfterModification + err = actual.AssignProperties_From_DateAfterModification(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_DateAfterModification_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1639,6 +2691,48 @@ func AddIndependentPropertyGeneratorsForDateAfterModification(gens map[string]go gens["DaysAfterModificationGreaterThan"] = gen.PtrOf(gen.Int()) } +func Test_DateAfterModification_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DateAfterModification_STATUS to DateAfterModification_STATUS via AssignProperties_To_DateAfterModification_STATUS & AssignProperties_From_DateAfterModification_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForDateAfterModification_STATUS, DateAfterModification_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDateAfterModification_STATUS tests if a specific instance of DateAfterModification_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDateAfterModification_STATUS(subject DateAfterModification_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.DateAfterModification_STATUS + err := copied.AssignProperties_To_DateAfterModification_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DateAfterModification_STATUS + err = actual.AssignProperties_From_DateAfterModification_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_DateAfterModification_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_queue_service_types_gen.go b/v2/api/storage/v1api20220901/storage/storage_accounts_queue_service_types_gen.go index 970412dbb06..ce473dce7fb 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_queue_service_types_gen.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_queue_service_types_gen.go @@ -4,19 +4,18 @@ package storage import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" ) -// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsqueueservices,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsqueueservices/status,storageaccountsqueueservices/finalizers},verbs=get;update;patch - // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" @@ -44,6 +43,28 @@ func (service *StorageAccountsQueueService) SetConditions(conditions conditions. service.Status.Conditions = conditions } +var _ conversion.Convertible = &StorageAccountsQueueService{} + +// ConvertFrom populates our StorageAccountsQueueService from the provided hub StorageAccountsQueueService +func (service *StorageAccountsQueueService) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsQueueService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsQueueService but received %T instead", hub) + } + + return service.AssignProperties_From_StorageAccountsQueueService(source) +} + +// ConvertTo populates the provided hub StorageAccountsQueueService from our StorageAccountsQueueService +func (service *StorageAccountsQueueService) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsQueueService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsQueueService but received %T instead", hub) + } + + return service.AssignProperties_To_StorageAccountsQueueService(destination) +} + var _ genruntime.KubernetesResource = &StorageAccountsQueueService{} // AzureName returns the Azure name of the resource (always "default") @@ -114,8 +135,75 @@ func (service *StorageAccountsQueueService) SetStatus(status genruntime.Converti return nil } -// Hub marks that this StorageAccountsQueueService is the hub type for conversion -func (service *StorageAccountsQueueService) Hub() {} +// AssignProperties_From_StorageAccountsQueueService populates our StorageAccountsQueueService from the provided source StorageAccountsQueueService +func (service *StorageAccountsQueueService) AssignProperties_From_StorageAccountsQueueService(source *v20230101s.StorageAccountsQueueService) error { + + // ObjectMeta + service.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_QueueService_Spec + err := spec.AssignProperties_From_StorageAccounts_QueueService_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_QueueService_Spec() to populate field Spec") + } + service.Spec = spec + + // Status + var status StorageAccounts_QueueService_STATUS + err = status.AssignProperties_From_StorageAccounts_QueueService_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_QueueService_STATUS() to populate field Status") + } + service.Status = status + + // Invoke the augmentConversionForStorageAccountsQueueService interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccountsQueueService); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsQueueService populates the provided destination StorageAccountsQueueService from our StorageAccountsQueueService +func (service *StorageAccountsQueueService) AssignProperties_To_StorageAccountsQueueService(destination *v20230101s.StorageAccountsQueueService) error { + + // ObjectMeta + destination.ObjectMeta = *service.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_QueueService_Spec + err := service.Spec.AssignProperties_To_StorageAccounts_QueueService_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_QueueService_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_QueueService_STATUS + err = service.Status.AssignProperties_To_StorageAccounts_QueueService_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_QueueService_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForStorageAccountsQueueService interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccountsQueueService); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (service *StorageAccountsQueueService) OriginalGVK() *schema.GroupVersionKind { @@ -137,6 +225,11 @@ type StorageAccountsQueueServiceList struct { Items []StorageAccountsQueueService `json:"items"` } +type augmentConversionForStorageAccountsQueueService interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountsQueueService) error + AssignPropertiesTo(dst *v20230101s.StorageAccountsQueueService) error +} + // Storage version of v1api20220901.StorageAccounts_QueueService_Spec type StorageAccounts_QueueService_Spec struct { Cors *CorsRules `json:"cors,omitempty"` @@ -154,20 +247,146 @@ var _ genruntime.ConvertibleSpec = &StorageAccounts_QueueService_Spec{} // ConvertSpecFrom populates our StorageAccounts_QueueService_Spec from the provided source func (service *StorageAccounts_QueueService_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + src, ok := source.(*v20230101s.StorageAccounts_QueueService_Spec) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_QueueService_Spec(src) } - return source.ConvertSpecTo(service) + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_QueueService_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_QueueService_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil } // ConvertSpecTo populates the provided destination from our StorageAccounts_QueueService_Spec func (service *StorageAccounts_QueueService_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + dst, ok := destination.(*v20230101s.StorageAccounts_QueueService_Spec) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_QueueService_Spec(dst) } - return destination.ConvertSpecFrom(service) + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_QueueService_Spec{} + err := service.AssignProperties_To_StorageAccounts_QueueService_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_QueueService_Spec populates our StorageAccounts_QueueService_Spec from the provided source StorageAccounts_QueueService_Spec +func (service *StorageAccounts_QueueService_Spec) AssignProperties_From_StorageAccounts_QueueService_Spec(source *v20230101s.StorageAccounts_QueueService_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Cors + if source.Cors != nil { + var cor CorsRules + err := cor.AssignProperties_From_CorsRules(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // OriginalVersion + service.OriginalVersion = source.OriginalVersion + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + service.Owner = &owner + } else { + service.Owner = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + service.PropertyBag = propertyBag + } else { + service.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_QueueService_Spec interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_QueueService_Spec); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_QueueService_Spec populates the provided destination StorageAccounts_QueueService_Spec from our StorageAccounts_QueueService_Spec +func (service *StorageAccounts_QueueService_Spec) AssignProperties_To_StorageAccounts_QueueService_Spec(destination *v20230101s.StorageAccounts_QueueService_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(service.PropertyBag) + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules + err := service.Cors.AssignProperties_To_CorsRules(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // OriginalVersion + destination.OriginalVersion = service.OriginalVersion + + // Owner + if service.Owner != nil { + owner := service.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_QueueService_Spec interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_QueueService_Spec); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } // Storage version of v1api20220901.StorageAccounts_QueueService_STATUS @@ -184,20 +403,158 @@ var _ genruntime.ConvertibleStatus = &StorageAccounts_QueueService_STATUS{} // ConvertStatusFrom populates our StorageAccounts_QueueService_STATUS from the provided source func (service *StorageAccounts_QueueService_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + src, ok := source.(*v20230101s.StorageAccounts_QueueService_STATUS) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_QueueService_STATUS(src) } - return source.ConvertStatusTo(service) + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_QueueService_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_QueueService_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil } // ConvertStatusTo populates the provided destination from our StorageAccounts_QueueService_STATUS func (service *StorageAccounts_QueueService_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + dst, ok := destination.(*v20230101s.StorageAccounts_QueueService_STATUS) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_QueueService_STATUS(dst) } - return destination.ConvertStatusFrom(service) + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_QueueService_STATUS{} + err := service.AssignProperties_To_StorageAccounts_QueueService_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_QueueService_STATUS populates our StorageAccounts_QueueService_STATUS from the provided source StorageAccounts_QueueService_STATUS +func (service *StorageAccounts_QueueService_STATUS) AssignProperties_From_StorageAccounts_QueueService_STATUS(source *v20230101s.StorageAccounts_QueueService_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Conditions + service.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Cors + if source.Cors != nil { + var cor CorsRules_STATUS + err := cor.AssignProperties_From_CorsRules_STATUS(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules_STATUS() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // Id + service.Id = genruntime.ClonePointerToString(source.Id) + + // Name + service.Name = genruntime.ClonePointerToString(source.Name) + + // Type + service.Type = genruntime.ClonePointerToString(source.Type) + + // Update the property bag + if len(propertyBag) > 0 { + service.PropertyBag = propertyBag + } else { + service.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_QueueService_STATUS interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_QueueService_STATUS); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_QueueService_STATUS populates the provided destination StorageAccounts_QueueService_STATUS from our StorageAccounts_QueueService_STATUS +func (service *StorageAccounts_QueueService_STATUS) AssignProperties_To_StorageAccounts_QueueService_STATUS(destination *v20230101s.StorageAccounts_QueueService_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(service.PropertyBag) + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(service.Conditions) + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules_STATUS + err := service.Cors.AssignProperties_To_CorsRules_STATUS(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules_STATUS() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(service.Id) + + // Name + destination.Name = genruntime.ClonePointerToString(service.Name) + + // Type + destination.Type = genruntime.ClonePointerToString(service.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_QueueService_STATUS interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_QueueService_STATUS); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForStorageAccounts_QueueService_Spec interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_QueueService_Spec) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_QueueService_Spec) error +} + +type augmentConversionForStorageAccounts_QueueService_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_QueueService_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_QueueService_STATUS) error } func init() { diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_queue_service_types_gen_test.go b/v2/api/storage/v1api20220901/storage/storage_accounts_queue_service_types_gen_test.go index e123ced35f6..cbc9d6fbb21 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_queue_service_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_queue_service_types_gen_test.go @@ -5,6 +5,7 @@ package storage import ( "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -17,6 +18,91 @@ import ( "testing" ) +func Test_StorageAccountsQueueService_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsQueueService to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsQueueService, StorageAccountsQueueServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsQueueService tests if a specific instance of StorageAccountsQueueService round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsQueueService(subject StorageAccountsQueueService) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsQueueService + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsQueueService + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsQueueService_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsQueueService to StorageAccountsQueueService via AssignProperties_To_StorageAccountsQueueService & AssignProperties_From_StorageAccountsQueueService returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsQueueService, StorageAccountsQueueServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsQueueService tests if a specific instance of StorageAccountsQueueService can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsQueueService(subject StorageAccountsQueueService) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsQueueService + err := copied.AssignProperties_To_StorageAccountsQueueService(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsQueueService + err = actual.AssignProperties_From_StorageAccountsQueueService(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountsQueueService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -79,6 +165,48 @@ func AddRelatedPropertyGeneratorsForStorageAccountsQueueService(gens map[string] gens["Status"] = StorageAccounts_QueueService_STATUSGenerator() } +func Test_StorageAccounts_QueueService_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_QueueService_Spec to StorageAccounts_QueueService_Spec via AssignProperties_To_StorageAccounts_QueueService_Spec & AssignProperties_From_StorageAccounts_QueueService_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_QueueService_Spec, StorageAccounts_QueueService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_QueueService_Spec tests if a specific instance of StorageAccounts_QueueService_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_QueueService_Spec(subject StorageAccounts_QueueService_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_QueueService_Spec + err := copied.AssignProperties_To_StorageAccounts_QueueService_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_QueueService_Spec + err = actual.AssignProperties_From_StorageAccounts_QueueService_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_QueueService_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -154,6 +282,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Spec(gens map[s gens["Cors"] = gen.PtrOf(CorsRulesGenerator()) } +func Test_StorageAccounts_QueueService_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_QueueService_STATUS to StorageAccounts_QueueService_STATUS via AssignProperties_To_StorageAccounts_QueueService_STATUS & AssignProperties_From_StorageAccounts_QueueService_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_QueueService_STATUS, StorageAccounts_QueueService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_QueueService_STATUS tests if a specific instance of StorageAccounts_QueueService_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_QueueService_STATUS(subject StorageAccounts_QueueService_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_QueueService_STATUS + err := copied.AssignProperties_To_StorageAccounts_QueueService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_QueueService_STATUS + err = actual.AssignProperties_From_StorageAccounts_QueueService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_QueueService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_queue_services_queue_types_gen.go b/v2/api/storage/v1api20220901/storage/storage_accounts_queue_services_queue_types_gen.go index 795bddf0f03..ca7b64e3745 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_queue_services_queue_types_gen.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_queue_services_queue_types_gen.go @@ -4,19 +4,18 @@ package storage import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" ) -// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsqueueservicesqueues,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsqueueservicesqueues/status,storageaccountsqueueservicesqueues/finalizers},verbs=get;update;patch - // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" @@ -44,6 +43,28 @@ func (queue *StorageAccountsQueueServicesQueue) SetConditions(conditions conditi queue.Status.Conditions = conditions } +var _ conversion.Convertible = &StorageAccountsQueueServicesQueue{} + +// ConvertFrom populates our StorageAccountsQueueServicesQueue from the provided hub StorageAccountsQueueServicesQueue +func (queue *StorageAccountsQueueServicesQueue) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsQueueServicesQueue) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsQueueServicesQueue but received %T instead", hub) + } + + return queue.AssignProperties_From_StorageAccountsQueueServicesQueue(source) +} + +// ConvertTo populates the provided hub StorageAccountsQueueServicesQueue from our StorageAccountsQueueServicesQueue +func (queue *StorageAccountsQueueServicesQueue) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsQueueServicesQueue) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsQueueServicesQueue but received %T instead", hub) + } + + return queue.AssignProperties_To_StorageAccountsQueueServicesQueue(destination) +} + var _ genruntime.KubernetesResource = &StorageAccountsQueueServicesQueue{} // AzureName returns the Azure name of the resource @@ -115,8 +136,75 @@ func (queue *StorageAccountsQueueServicesQueue) SetStatus(status genruntime.Conv return nil } -// Hub marks that this StorageAccountsQueueServicesQueue is the hub type for conversion -func (queue *StorageAccountsQueueServicesQueue) Hub() {} +// AssignProperties_From_StorageAccountsQueueServicesQueue populates our StorageAccountsQueueServicesQueue from the provided source StorageAccountsQueueServicesQueue +func (queue *StorageAccountsQueueServicesQueue) AssignProperties_From_StorageAccountsQueueServicesQueue(source *v20230101s.StorageAccountsQueueServicesQueue) error { + + // ObjectMeta + queue.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_QueueServices_Queue_Spec + err := spec.AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec() to populate field Spec") + } + queue.Spec = spec + + // Status + var status StorageAccounts_QueueServices_Queue_STATUS + err = status.AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS() to populate field Status") + } + queue.Status = status + + // Invoke the augmentConversionForStorageAccountsQueueServicesQueue interface (if implemented) to customize the conversion + var queueAsAny any = queue + if augmentedQueue, ok := queueAsAny.(augmentConversionForStorageAccountsQueueServicesQueue); ok { + err := augmentedQueue.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsQueueServicesQueue populates the provided destination StorageAccountsQueueServicesQueue from our StorageAccountsQueueServicesQueue +func (queue *StorageAccountsQueueServicesQueue) AssignProperties_To_StorageAccountsQueueServicesQueue(destination *v20230101s.StorageAccountsQueueServicesQueue) error { + + // ObjectMeta + destination.ObjectMeta = *queue.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_QueueServices_Queue_Spec + err := queue.Spec.AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_QueueServices_Queue_STATUS + err = queue.Status.AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForStorageAccountsQueueServicesQueue interface (if implemented) to customize the conversion + var queueAsAny any = queue + if augmentedQueue, ok := queueAsAny.(augmentConversionForStorageAccountsQueueServicesQueue); ok { + err := augmentedQueue.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (queue *StorageAccountsQueueServicesQueue) OriginalGVK() *schema.GroupVersionKind { @@ -138,10 +226,13 @@ type StorageAccountsQueueServicesQueueList struct { Items []StorageAccountsQueueServicesQueue `json:"items"` } +type augmentConversionForStorageAccountsQueueServicesQueue interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountsQueueServicesQueue) error + AssignPropertiesTo(dst *v20230101s.StorageAccountsQueueServicesQueue) error +} + // Storage version of v1api20220901.StorageAccounts_QueueServices_Queue_Spec type StorageAccounts_QueueServices_Queue_Spec struct { - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=3 // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` @@ -160,20 +251,134 @@ var _ genruntime.ConvertibleSpec = &StorageAccounts_QueueServices_Queue_Spec{} // ConvertSpecFrom populates our StorageAccounts_QueueServices_Queue_Spec from the provided source func (queue *StorageAccounts_QueueServices_Queue_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == queue { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + src, ok := source.(*v20230101s.StorageAccounts_QueueServices_Queue_Spec) + if ok { + // Populate our instance from source + return queue.AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec(src) } - return source.ConvertSpecTo(queue) + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_QueueServices_Queue_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = queue.AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil } // ConvertSpecTo populates the provided destination from our StorageAccounts_QueueServices_Queue_Spec func (queue *StorageAccounts_QueueServices_Queue_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == queue { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + dst, ok := destination.(*v20230101s.StorageAccounts_QueueServices_Queue_Spec) + if ok { + // Populate destination from our instance + return queue.AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_QueueServices_Queue_Spec{} + err := queue.AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") } - return destination.ConvertSpecFrom(queue) + return nil +} + +// AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec populates our StorageAccounts_QueueServices_Queue_Spec from the provided source StorageAccounts_QueueServices_Queue_Spec +func (queue *StorageAccounts_QueueServices_Queue_Spec) AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec(source *v20230101s.StorageAccounts_QueueServices_Queue_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AzureName + queue.AzureName = source.AzureName + + // Metadata + queue.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // OriginalVersion + queue.OriginalVersion = source.OriginalVersion + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + queue.Owner = &owner + } else { + queue.Owner = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + queue.PropertyBag = propertyBag + } else { + queue.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_QueueServices_Queue_Spec interface (if implemented) to customize the conversion + var queueAsAny any = queue + if augmentedQueue, ok := queueAsAny.(augmentConversionForStorageAccounts_QueueServices_Queue_Spec); ok { + err := augmentedQueue.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec populates the provided destination StorageAccounts_QueueServices_Queue_Spec from our StorageAccounts_QueueServices_Queue_Spec +func (queue *StorageAccounts_QueueServices_Queue_Spec) AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec(destination *v20230101s.StorageAccounts_QueueServices_Queue_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(queue.PropertyBag) + + // AzureName + destination.AzureName = queue.AzureName + + // Metadata + destination.Metadata = genruntime.CloneMapOfStringToString(queue.Metadata) + + // OriginalVersion + destination.OriginalVersion = queue.OriginalVersion + + // Owner + if queue.Owner != nil { + owner := queue.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_QueueServices_Queue_Spec interface (if implemented) to customize the conversion + var queueAsAny any = queue + if augmentedQueue, ok := queueAsAny.(augmentConversionForStorageAccounts_QueueServices_Queue_Spec); ok { + err := augmentedQueue.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } // Storage version of v1api20220901.StorageAccounts_QueueServices_Queue_STATUS @@ -191,20 +396,146 @@ var _ genruntime.ConvertibleStatus = &StorageAccounts_QueueServices_Queue_STATUS // ConvertStatusFrom populates our StorageAccounts_QueueServices_Queue_STATUS from the provided source func (queue *StorageAccounts_QueueServices_Queue_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == queue { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + src, ok := source.(*v20230101s.StorageAccounts_QueueServices_Queue_STATUS) + if ok { + // Populate our instance from source + return queue.AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_QueueServices_Queue_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = queue.AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") } - return source.ConvertStatusTo(queue) + return nil } // ConvertStatusTo populates the provided destination from our StorageAccounts_QueueServices_Queue_STATUS func (queue *StorageAccounts_QueueServices_Queue_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == queue { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + dst, ok := destination.(*v20230101s.StorageAccounts_QueueServices_Queue_STATUS) + if ok { + // Populate destination from our instance + return queue.AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_QueueServices_Queue_STATUS{} + err := queue.AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS populates our StorageAccounts_QueueServices_Queue_STATUS from the provided source StorageAccounts_QueueServices_Queue_STATUS +func (queue *StorageAccounts_QueueServices_Queue_STATUS) AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS(source *v20230101s.StorageAccounts_QueueServices_Queue_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ApproximateMessageCount + queue.ApproximateMessageCount = genruntime.ClonePointerToInt(source.ApproximateMessageCount) + + // Conditions + queue.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Id + queue.Id = genruntime.ClonePointerToString(source.Id) + + // Metadata + queue.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // Name + queue.Name = genruntime.ClonePointerToString(source.Name) + + // Type + queue.Type = genruntime.ClonePointerToString(source.Type) + + // Update the property bag + if len(propertyBag) > 0 { + queue.PropertyBag = propertyBag + } else { + queue.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_QueueServices_Queue_STATUS interface (if implemented) to customize the conversion + var queueAsAny any = queue + if augmentedQueue, ok := queueAsAny.(augmentConversionForStorageAccounts_QueueServices_Queue_STATUS); ok { + err := augmentedQueue.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS populates the provided destination StorageAccounts_QueueServices_Queue_STATUS from our StorageAccounts_QueueServices_Queue_STATUS +func (queue *StorageAccounts_QueueServices_Queue_STATUS) AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS(destination *v20230101s.StorageAccounts_QueueServices_Queue_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(queue.PropertyBag) + + // ApproximateMessageCount + destination.ApproximateMessageCount = genruntime.ClonePointerToInt(queue.ApproximateMessageCount) + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(queue.Conditions) + + // Id + destination.Id = genruntime.ClonePointerToString(queue.Id) + + // Metadata + destination.Metadata = genruntime.CloneMapOfStringToString(queue.Metadata) + + // Name + destination.Name = genruntime.ClonePointerToString(queue.Name) + + // Type + destination.Type = genruntime.ClonePointerToString(queue.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil } - return destination.ConvertStatusFrom(queue) + // Invoke the augmentConversionForStorageAccounts_QueueServices_Queue_STATUS interface (if implemented) to customize the conversion + var queueAsAny any = queue + if augmentedQueue, ok := queueAsAny.(augmentConversionForStorageAccounts_QueueServices_Queue_STATUS); ok { + err := augmentedQueue.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForStorageAccounts_QueueServices_Queue_Spec interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_QueueServices_Queue_Spec) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_QueueServices_Queue_Spec) error +} + +type augmentConversionForStorageAccounts_QueueServices_Queue_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_QueueServices_Queue_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_QueueServices_Queue_STATUS) error } func init() { diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_queue_services_queue_types_gen_test.go b/v2/api/storage/v1api20220901/storage/storage_accounts_queue_services_queue_types_gen_test.go index 5bfcfb66edd..aada4d8db57 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_queue_services_queue_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_queue_services_queue_types_gen_test.go @@ -5,6 +5,7 @@ package storage import ( "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -17,6 +18,91 @@ import ( "testing" ) +func Test_StorageAccountsQueueServicesQueue_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsQueueServicesQueue to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsQueueServicesQueue, StorageAccountsQueueServicesQueueGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsQueueServicesQueue tests if a specific instance of StorageAccountsQueueServicesQueue round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsQueueServicesQueue(subject StorageAccountsQueueServicesQueue) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsQueueServicesQueue + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsQueueServicesQueue + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsQueueServicesQueue_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsQueueServicesQueue to StorageAccountsQueueServicesQueue via AssignProperties_To_StorageAccountsQueueServicesQueue & AssignProperties_From_StorageAccountsQueueServicesQueue returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsQueueServicesQueue, StorageAccountsQueueServicesQueueGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsQueueServicesQueue tests if a specific instance of StorageAccountsQueueServicesQueue can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsQueueServicesQueue(subject StorageAccountsQueueServicesQueue) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsQueueServicesQueue + err := copied.AssignProperties_To_StorageAccountsQueueServicesQueue(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsQueueServicesQueue + err = actual.AssignProperties_From_StorageAccountsQueueServicesQueue(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountsQueueServicesQueue_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -79,6 +165,48 @@ func AddRelatedPropertyGeneratorsForStorageAccountsQueueServicesQueue(gens map[s gens["Status"] = StorageAccounts_QueueServices_Queue_STATUSGenerator() } +func Test_StorageAccounts_QueueServices_Queue_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_QueueServices_Queue_Spec to StorageAccounts_QueueServices_Queue_Spec via AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec & AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_QueueServices_Queue_Spec, StorageAccounts_QueueServices_Queue_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_QueueServices_Queue_Spec tests if a specific instance of StorageAccounts_QueueServices_Queue_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_QueueServices_Queue_Spec(subject StorageAccounts_QueueServices_Queue_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_QueueServices_Queue_Spec + err := copied.AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_QueueServices_Queue_Spec + err = actual.AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_QueueServices_Queue_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -142,6 +270,48 @@ func AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec gens["OriginalVersion"] = gen.AlphaString() } +func Test_StorageAccounts_QueueServices_Queue_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_QueueServices_Queue_STATUS to StorageAccounts_QueueServices_Queue_STATUS via AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS & AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_QueueServices_Queue_STATUS, StorageAccounts_QueueServices_Queue_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_QueueServices_Queue_STATUS tests if a specific instance of StorageAccounts_QueueServices_Queue_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_QueueServices_Queue_STATUS(subject StorageAccounts_QueueServices_Queue_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_QueueServices_Queue_STATUS + err := copied.AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_QueueServices_Queue_STATUS + err = actual.AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_QueueServices_Queue_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_table_service_types_gen.go b/v2/api/storage/v1api20220901/storage/storage_accounts_table_service_types_gen.go index 67699b844e8..b35b8a9c0a4 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_table_service_types_gen.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_table_service_types_gen.go @@ -4,19 +4,18 @@ package storage import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" ) -// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountstableservices,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountstableservices/status,storageaccountstableservices/finalizers},verbs=get;update;patch - // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" @@ -44,6 +43,28 @@ func (service *StorageAccountsTableService) SetConditions(conditions conditions. service.Status.Conditions = conditions } +var _ conversion.Convertible = &StorageAccountsTableService{} + +// ConvertFrom populates our StorageAccountsTableService from the provided hub StorageAccountsTableService +func (service *StorageAccountsTableService) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsTableService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsTableService but received %T instead", hub) + } + + return service.AssignProperties_From_StorageAccountsTableService(source) +} + +// ConvertTo populates the provided hub StorageAccountsTableService from our StorageAccountsTableService +func (service *StorageAccountsTableService) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsTableService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsTableService but received %T instead", hub) + } + + return service.AssignProperties_To_StorageAccountsTableService(destination) +} + var _ genruntime.KubernetesResource = &StorageAccountsTableService{} // AzureName returns the Azure name of the resource (always "default") @@ -114,8 +135,75 @@ func (service *StorageAccountsTableService) SetStatus(status genruntime.Converti return nil } -// Hub marks that this StorageAccountsTableService is the hub type for conversion -func (service *StorageAccountsTableService) Hub() {} +// AssignProperties_From_StorageAccountsTableService populates our StorageAccountsTableService from the provided source StorageAccountsTableService +func (service *StorageAccountsTableService) AssignProperties_From_StorageAccountsTableService(source *v20230101s.StorageAccountsTableService) error { + + // ObjectMeta + service.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_TableService_Spec + err := spec.AssignProperties_From_StorageAccounts_TableService_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_TableService_Spec() to populate field Spec") + } + service.Spec = spec + + // Status + var status StorageAccounts_TableService_STATUS + err = status.AssignProperties_From_StorageAccounts_TableService_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_TableService_STATUS() to populate field Status") + } + service.Status = status + + // Invoke the augmentConversionForStorageAccountsTableService interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccountsTableService); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsTableService populates the provided destination StorageAccountsTableService from our StorageAccountsTableService +func (service *StorageAccountsTableService) AssignProperties_To_StorageAccountsTableService(destination *v20230101s.StorageAccountsTableService) error { + + // ObjectMeta + destination.ObjectMeta = *service.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_TableService_Spec + err := service.Spec.AssignProperties_To_StorageAccounts_TableService_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_TableService_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_TableService_STATUS + err = service.Status.AssignProperties_To_StorageAccounts_TableService_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_TableService_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForStorageAccountsTableService interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccountsTableService); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (service *StorageAccountsTableService) OriginalGVK() *schema.GroupVersionKind { @@ -137,6 +225,11 @@ type StorageAccountsTableServiceList struct { Items []StorageAccountsTableService `json:"items"` } +type augmentConversionForStorageAccountsTableService interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountsTableService) error + AssignPropertiesTo(dst *v20230101s.StorageAccountsTableService) error +} + // Storage version of v1api20220901.StorageAccounts_TableService_Spec type StorageAccounts_TableService_Spec struct { Cors *CorsRules `json:"cors,omitempty"` @@ -154,20 +247,146 @@ var _ genruntime.ConvertibleSpec = &StorageAccounts_TableService_Spec{} // ConvertSpecFrom populates our StorageAccounts_TableService_Spec from the provided source func (service *StorageAccounts_TableService_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + src, ok := source.(*v20230101s.StorageAccounts_TableService_Spec) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_TableService_Spec(src) } - return source.ConvertSpecTo(service) + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_TableService_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_TableService_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil } // ConvertSpecTo populates the provided destination from our StorageAccounts_TableService_Spec func (service *StorageAccounts_TableService_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + dst, ok := destination.(*v20230101s.StorageAccounts_TableService_Spec) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_TableService_Spec(dst) } - return destination.ConvertSpecFrom(service) + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_TableService_Spec{} + err := service.AssignProperties_To_StorageAccounts_TableService_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_TableService_Spec populates our StorageAccounts_TableService_Spec from the provided source StorageAccounts_TableService_Spec +func (service *StorageAccounts_TableService_Spec) AssignProperties_From_StorageAccounts_TableService_Spec(source *v20230101s.StorageAccounts_TableService_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Cors + if source.Cors != nil { + var cor CorsRules + err := cor.AssignProperties_From_CorsRules(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // OriginalVersion + service.OriginalVersion = source.OriginalVersion + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + service.Owner = &owner + } else { + service.Owner = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + service.PropertyBag = propertyBag + } else { + service.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_TableService_Spec interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_TableService_Spec); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_TableService_Spec populates the provided destination StorageAccounts_TableService_Spec from our StorageAccounts_TableService_Spec +func (service *StorageAccounts_TableService_Spec) AssignProperties_To_StorageAccounts_TableService_Spec(destination *v20230101s.StorageAccounts_TableService_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(service.PropertyBag) + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules + err := service.Cors.AssignProperties_To_CorsRules(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // OriginalVersion + destination.OriginalVersion = service.OriginalVersion + + // Owner + if service.Owner != nil { + owner := service.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_TableService_Spec interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_TableService_Spec); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } // Storage version of v1api20220901.StorageAccounts_TableService_STATUS @@ -184,20 +403,158 @@ var _ genruntime.ConvertibleStatus = &StorageAccounts_TableService_STATUS{} // ConvertStatusFrom populates our StorageAccounts_TableService_STATUS from the provided source func (service *StorageAccounts_TableService_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + src, ok := source.(*v20230101s.StorageAccounts_TableService_STATUS) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_TableService_STATUS(src) } - return source.ConvertStatusTo(service) + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_TableService_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_TableService_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil } // ConvertStatusTo populates the provided destination from our StorageAccounts_TableService_STATUS func (service *StorageAccounts_TableService_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == service { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + dst, ok := destination.(*v20230101s.StorageAccounts_TableService_STATUS) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_TableService_STATUS(dst) } - return destination.ConvertStatusFrom(service) + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_TableService_STATUS{} + err := service.AssignProperties_To_StorageAccounts_TableService_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_TableService_STATUS populates our StorageAccounts_TableService_STATUS from the provided source StorageAccounts_TableService_STATUS +func (service *StorageAccounts_TableService_STATUS) AssignProperties_From_StorageAccounts_TableService_STATUS(source *v20230101s.StorageAccounts_TableService_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Conditions + service.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Cors + if source.Cors != nil { + var cor CorsRules_STATUS + err := cor.AssignProperties_From_CorsRules_STATUS(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules_STATUS() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // Id + service.Id = genruntime.ClonePointerToString(source.Id) + + // Name + service.Name = genruntime.ClonePointerToString(source.Name) + + // Type + service.Type = genruntime.ClonePointerToString(source.Type) + + // Update the property bag + if len(propertyBag) > 0 { + service.PropertyBag = propertyBag + } else { + service.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_TableService_STATUS interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_TableService_STATUS); ok { + err := augmentedService.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_TableService_STATUS populates the provided destination StorageAccounts_TableService_STATUS from our StorageAccounts_TableService_STATUS +func (service *StorageAccounts_TableService_STATUS) AssignProperties_To_StorageAccounts_TableService_STATUS(destination *v20230101s.StorageAccounts_TableService_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(service.PropertyBag) + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(service.Conditions) + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules_STATUS + err := service.Cors.AssignProperties_To_CorsRules_STATUS(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules_STATUS() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(service.Id) + + // Name + destination.Name = genruntime.ClonePointerToString(service.Name) + + // Type + destination.Type = genruntime.ClonePointerToString(service.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_TableService_STATUS interface (if implemented) to customize the conversion + var serviceAsAny any = service + if augmentedService, ok := serviceAsAny.(augmentConversionForStorageAccounts_TableService_STATUS); ok { + err := augmentedService.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForStorageAccounts_TableService_Spec interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_TableService_Spec) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_TableService_Spec) error +} + +type augmentConversionForStorageAccounts_TableService_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_TableService_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_TableService_STATUS) error } func init() { diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_table_service_types_gen_test.go b/v2/api/storage/v1api20220901/storage/storage_accounts_table_service_types_gen_test.go index 180f5de2d87..dbb023294df 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_table_service_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_table_service_types_gen_test.go @@ -5,6 +5,7 @@ package storage import ( "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -17,6 +18,91 @@ import ( "testing" ) +func Test_StorageAccountsTableService_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsTableService to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsTableService, StorageAccountsTableServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsTableService tests if a specific instance of StorageAccountsTableService round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsTableService(subject StorageAccountsTableService) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsTableService + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsTableService + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsTableService_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsTableService to StorageAccountsTableService via AssignProperties_To_StorageAccountsTableService & AssignProperties_From_StorageAccountsTableService returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsTableService, StorageAccountsTableServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsTableService tests if a specific instance of StorageAccountsTableService can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsTableService(subject StorageAccountsTableService) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsTableService + err := copied.AssignProperties_To_StorageAccountsTableService(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsTableService + err = actual.AssignProperties_From_StorageAccountsTableService(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountsTableService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -79,6 +165,48 @@ func AddRelatedPropertyGeneratorsForStorageAccountsTableService(gens map[string] gens["Status"] = StorageAccounts_TableService_STATUSGenerator() } +func Test_StorageAccounts_TableService_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_TableService_Spec to StorageAccounts_TableService_Spec via AssignProperties_To_StorageAccounts_TableService_Spec & AssignProperties_From_StorageAccounts_TableService_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_TableService_Spec, StorageAccounts_TableService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_TableService_Spec tests if a specific instance of StorageAccounts_TableService_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_TableService_Spec(subject StorageAccounts_TableService_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_TableService_Spec + err := copied.AssignProperties_To_StorageAccounts_TableService_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_TableService_Spec + err = actual.AssignProperties_From_StorageAccounts_TableService_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_TableService_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -154,6 +282,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Spec(gens map[s gens["Cors"] = gen.PtrOf(CorsRulesGenerator()) } +func Test_StorageAccounts_TableService_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_TableService_STATUS to StorageAccounts_TableService_STATUS via AssignProperties_To_StorageAccounts_TableService_STATUS & AssignProperties_From_StorageAccounts_TableService_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_TableService_STATUS, StorageAccounts_TableService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_TableService_STATUS tests if a specific instance of StorageAccounts_TableService_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_TableService_STATUS(subject StorageAccounts_TableService_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_TableService_STATUS + err := copied.AssignProperties_To_StorageAccounts_TableService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_TableService_STATUS + err = actual.AssignProperties_From_StorageAccounts_TableService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_TableService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_table_services_table_types_gen.go b/v2/api/storage/v1api20220901/storage/storage_accounts_table_services_table_types_gen.go index 3f0595ad04d..6085b272ac3 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_table_services_table_types_gen.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_table_services_table_types_gen.go @@ -4,19 +4,18 @@ package storage import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" ) -// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountstableservicestables,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountstableservicestables/status,storageaccountstableservicestables/finalizers},verbs=get;update;patch - // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" @@ -44,6 +43,28 @@ func (table *StorageAccountsTableServicesTable) SetConditions(conditions conditi table.Status.Conditions = conditions } +var _ conversion.Convertible = &StorageAccountsTableServicesTable{} + +// ConvertFrom populates our StorageAccountsTableServicesTable from the provided hub StorageAccountsTableServicesTable +func (table *StorageAccountsTableServicesTable) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsTableServicesTable) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsTableServicesTable but received %T instead", hub) + } + + return table.AssignProperties_From_StorageAccountsTableServicesTable(source) +} + +// ConvertTo populates the provided hub StorageAccountsTableServicesTable from our StorageAccountsTableServicesTable +func (table *StorageAccountsTableServicesTable) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsTableServicesTable) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsTableServicesTable but received %T instead", hub) + } + + return table.AssignProperties_To_StorageAccountsTableServicesTable(destination) +} + var _ genruntime.KubernetesResource = &StorageAccountsTableServicesTable{} // AzureName returns the Azure name of the resource @@ -115,8 +136,75 @@ func (table *StorageAccountsTableServicesTable) SetStatus(status genruntime.Conv return nil } -// Hub marks that this StorageAccountsTableServicesTable is the hub type for conversion -func (table *StorageAccountsTableServicesTable) Hub() {} +// AssignProperties_From_StorageAccountsTableServicesTable populates our StorageAccountsTableServicesTable from the provided source StorageAccountsTableServicesTable +func (table *StorageAccountsTableServicesTable) AssignProperties_From_StorageAccountsTableServicesTable(source *v20230101s.StorageAccountsTableServicesTable) error { + + // ObjectMeta + table.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_TableServices_Table_Spec + err := spec.AssignProperties_From_StorageAccounts_TableServices_Table_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_TableServices_Table_Spec() to populate field Spec") + } + table.Spec = spec + + // Status + var status StorageAccounts_TableServices_Table_STATUS + err = status.AssignProperties_From_StorageAccounts_TableServices_Table_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_TableServices_Table_STATUS() to populate field Status") + } + table.Status = status + + // Invoke the augmentConversionForStorageAccountsTableServicesTable interface (if implemented) to customize the conversion + var tableAsAny any = table + if augmentedTable, ok := tableAsAny.(augmentConversionForStorageAccountsTableServicesTable); ok { + err := augmentedTable.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsTableServicesTable populates the provided destination StorageAccountsTableServicesTable from our StorageAccountsTableServicesTable +func (table *StorageAccountsTableServicesTable) AssignProperties_To_StorageAccountsTableServicesTable(destination *v20230101s.StorageAccountsTableServicesTable) error { + + // ObjectMeta + destination.ObjectMeta = *table.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_TableServices_Table_Spec + err := table.Spec.AssignProperties_To_StorageAccounts_TableServices_Table_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_TableServices_Table_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_TableServices_Table_STATUS + err = table.Status.AssignProperties_To_StorageAccounts_TableServices_Table_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_TableServices_Table_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForStorageAccountsTableServicesTable interface (if implemented) to customize the conversion + var tableAsAny any = table + if augmentedTable, ok := tableAsAny.(augmentConversionForStorageAccountsTableServicesTable); ok { + err := augmentedTable.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (table *StorageAccountsTableServicesTable) OriginalGVK() *schema.GroupVersionKind { @@ -138,11 +226,13 @@ type StorageAccountsTableServicesTableList struct { Items []StorageAccountsTableServicesTable `json:"items"` } +type augmentConversionForStorageAccountsTableServicesTable interface { + AssignPropertiesFrom(src *v20230101s.StorageAccountsTableServicesTable) error + AssignPropertiesTo(dst *v20230101s.StorageAccountsTableServicesTable) error +} + // Storage version of v1api20220901.StorageAccounts_TableServices_Table_Spec type StorageAccounts_TableServices_Table_Spec struct { - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=3 - // +kubebuilder:validation:Pattern="^[A-Za-z][A-Za-z0-9]{2,62}$" // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` @@ -161,20 +251,164 @@ var _ genruntime.ConvertibleSpec = &StorageAccounts_TableServices_Table_Spec{} // ConvertSpecFrom populates our StorageAccounts_TableServices_Table_Spec from the provided source func (table *StorageAccounts_TableServices_Table_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == table { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + src, ok := source.(*v20230101s.StorageAccounts_TableServices_Table_Spec) + if ok { + // Populate our instance from source + return table.AssignProperties_From_StorageAccounts_TableServices_Table_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_TableServices_Table_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = table.AssignProperties_From_StorageAccounts_TableServices_Table_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") } - return source.ConvertSpecTo(table) + return nil } // ConvertSpecTo populates the provided destination from our StorageAccounts_TableServices_Table_Spec func (table *StorageAccounts_TableServices_Table_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == table { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + dst, ok := destination.(*v20230101s.StorageAccounts_TableServices_Table_Spec) + if ok { + // Populate destination from our instance + return table.AssignProperties_To_StorageAccounts_TableServices_Table_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_TableServices_Table_Spec{} + err := table.AssignProperties_To_StorageAccounts_TableServices_Table_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_TableServices_Table_Spec populates our StorageAccounts_TableServices_Table_Spec from the provided source StorageAccounts_TableServices_Table_Spec +func (table *StorageAccounts_TableServices_Table_Spec) AssignProperties_From_StorageAccounts_TableServices_Table_Spec(source *v20230101s.StorageAccounts_TableServices_Table_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AzureName + table.AzureName = source.AzureName + + // OriginalVersion + table.OriginalVersion = source.OriginalVersion + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + table.Owner = &owner + } else { + table.Owner = nil + } + + // SignedIdentifiers + if source.SignedIdentifiers != nil { + signedIdentifierList := make([]TableSignedIdentifier, len(source.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range source.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier TableSignedIdentifier + err := signedIdentifier.AssignProperties_From_TableSignedIdentifier(&signedIdentifierItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TableSignedIdentifier() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + table.SignedIdentifiers = signedIdentifierList + } else { + table.SignedIdentifiers = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + table.PropertyBag = propertyBag + } else { + table.PropertyBag = nil } - return destination.ConvertSpecFrom(table) + // Invoke the augmentConversionForStorageAccounts_TableServices_Table_Spec interface (if implemented) to customize the conversion + var tableAsAny any = table + if augmentedTable, ok := tableAsAny.(augmentConversionForStorageAccounts_TableServices_Table_Spec); ok { + err := augmentedTable.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_TableServices_Table_Spec populates the provided destination StorageAccounts_TableServices_Table_Spec from our StorageAccounts_TableServices_Table_Spec +func (table *StorageAccounts_TableServices_Table_Spec) AssignProperties_To_StorageAccounts_TableServices_Table_Spec(destination *v20230101s.StorageAccounts_TableServices_Table_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(table.PropertyBag) + + // AzureName + destination.AzureName = table.AzureName + + // OriginalVersion + destination.OriginalVersion = table.OriginalVersion + + // Owner + if table.Owner != nil { + owner := table.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // SignedIdentifiers + if table.SignedIdentifiers != nil { + signedIdentifierList := make([]v20230101s.TableSignedIdentifier, len(table.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range table.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier v20230101s.TableSignedIdentifier + err := signedIdentifierItem.AssignProperties_To_TableSignedIdentifier(&signedIdentifier) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TableSignedIdentifier() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + destination.SignedIdentifiers = signedIdentifierList + } else { + destination.SignedIdentifiers = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_TableServices_Table_Spec interface (if implemented) to customize the conversion + var tableAsAny any = table + if augmentedTable, ok := tableAsAny.(augmentConversionForStorageAccounts_TableServices_Table_Spec); ok { + err := augmentedTable.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } // Storage version of v1api20220901.StorageAccounts_TableServices_Table_STATUS @@ -192,20 +426,176 @@ var _ genruntime.ConvertibleStatus = &StorageAccounts_TableServices_Table_STATUS // ConvertStatusFrom populates our StorageAccounts_TableServices_Table_STATUS from the provided source func (table *StorageAccounts_TableServices_Table_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == table { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + src, ok := source.(*v20230101s.StorageAccounts_TableServices_Table_STATUS) + if ok { + // Populate our instance from source + return table.AssignProperties_From_StorageAccounts_TableServices_Table_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_TableServices_Table_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") } - return source.ConvertStatusTo(table) + // Update our instance from src + err = table.AssignProperties_From_StorageAccounts_TableServices_Table_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil } // ConvertStatusTo populates the provided destination from our StorageAccounts_TableServices_Table_STATUS func (table *StorageAccounts_TableServices_Table_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == table { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + dst, ok := destination.(*v20230101s.StorageAccounts_TableServices_Table_STATUS) + if ok { + // Populate destination from our instance + return table.AssignProperties_To_StorageAccounts_TableServices_Table_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_TableServices_Table_STATUS{} + err := table.AssignProperties_To_StorageAccounts_TableServices_Table_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_TableServices_Table_STATUS populates our StorageAccounts_TableServices_Table_STATUS from the provided source StorageAccounts_TableServices_Table_STATUS +func (table *StorageAccounts_TableServices_Table_STATUS) AssignProperties_From_StorageAccounts_TableServices_Table_STATUS(source *v20230101s.StorageAccounts_TableServices_Table_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Conditions + table.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Id + table.Id = genruntime.ClonePointerToString(source.Id) + + // Name + table.Name = genruntime.ClonePointerToString(source.Name) + + // SignedIdentifiers + if source.SignedIdentifiers != nil { + signedIdentifierList := make([]TableSignedIdentifier_STATUS, len(source.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range source.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier TableSignedIdentifier_STATUS + err := signedIdentifier.AssignProperties_From_TableSignedIdentifier_STATUS(&signedIdentifierItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TableSignedIdentifier_STATUS() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + table.SignedIdentifiers = signedIdentifierList + } else { + table.SignedIdentifiers = nil } - return destination.ConvertStatusFrom(table) + // TableName + table.TableName = genruntime.ClonePointerToString(source.TableName) + + // Type + table.Type = genruntime.ClonePointerToString(source.Type) + + // Update the property bag + if len(propertyBag) > 0 { + table.PropertyBag = propertyBag + } else { + table.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_TableServices_Table_STATUS interface (if implemented) to customize the conversion + var tableAsAny any = table + if augmentedTable, ok := tableAsAny.(augmentConversionForStorageAccounts_TableServices_Table_STATUS); ok { + err := augmentedTable.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_TableServices_Table_STATUS populates the provided destination StorageAccounts_TableServices_Table_STATUS from our StorageAccounts_TableServices_Table_STATUS +func (table *StorageAccounts_TableServices_Table_STATUS) AssignProperties_To_StorageAccounts_TableServices_Table_STATUS(destination *v20230101s.StorageAccounts_TableServices_Table_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(table.PropertyBag) + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(table.Conditions) + + // Id + destination.Id = genruntime.ClonePointerToString(table.Id) + + // Name + destination.Name = genruntime.ClonePointerToString(table.Name) + + // SignedIdentifiers + if table.SignedIdentifiers != nil { + signedIdentifierList := make([]v20230101s.TableSignedIdentifier_STATUS, len(table.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range table.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier v20230101s.TableSignedIdentifier_STATUS + err := signedIdentifierItem.AssignProperties_To_TableSignedIdentifier_STATUS(&signedIdentifier) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TableSignedIdentifier_STATUS() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + destination.SignedIdentifiers = signedIdentifierList + } else { + destination.SignedIdentifiers = nil + } + + // TableName + destination.TableName = genruntime.ClonePointerToString(table.TableName) + + // Type + destination.Type = genruntime.ClonePointerToString(table.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForStorageAccounts_TableServices_Table_STATUS interface (if implemented) to customize the conversion + var tableAsAny any = table + if augmentedTable, ok := tableAsAny.(augmentConversionForStorageAccounts_TableServices_Table_STATUS); ok { + err := augmentedTable.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForStorageAccounts_TableServices_Table_Spec interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_TableServices_Table_Spec) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_TableServices_Table_Spec) error +} + +type augmentConversionForStorageAccounts_TableServices_Table_STATUS interface { + AssignPropertiesFrom(src *v20230101s.StorageAccounts_TableServices_Table_STATUS) error + AssignPropertiesTo(dst *v20230101s.StorageAccounts_TableServices_Table_STATUS) error } // Storage version of v1api20220901.TableSignedIdentifier @@ -219,6 +609,96 @@ type TableSignedIdentifier struct { Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` } +// AssignProperties_From_TableSignedIdentifier populates our TableSignedIdentifier from the provided source TableSignedIdentifier +func (identifier *TableSignedIdentifier) AssignProperties_From_TableSignedIdentifier(source *v20230101s.TableSignedIdentifier) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AccessPolicy + if source.AccessPolicy != nil { + var accessPolicy TableAccessPolicy + err := accessPolicy.AssignProperties_From_TableAccessPolicy(source.AccessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TableAccessPolicy() to populate field AccessPolicy") + } + identifier.AccessPolicy = &accessPolicy + } else { + identifier.AccessPolicy = nil + } + + // Reference + if source.Reference != nil { + reference := source.Reference.Copy() + identifier.Reference = &reference + } else { + identifier.Reference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + identifier.PropertyBag = propertyBag + } else { + identifier.PropertyBag = nil + } + + // Invoke the augmentConversionForTableSignedIdentifier interface (if implemented) to customize the conversion + var identifierAsAny any = identifier + if augmentedIdentifier, ok := identifierAsAny.(augmentConversionForTableSignedIdentifier); ok { + err := augmentedIdentifier.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_TableSignedIdentifier populates the provided destination TableSignedIdentifier from our TableSignedIdentifier +func (identifier *TableSignedIdentifier) AssignProperties_To_TableSignedIdentifier(destination *v20230101s.TableSignedIdentifier) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(identifier.PropertyBag) + + // AccessPolicy + if identifier.AccessPolicy != nil { + var accessPolicy v20230101s.TableAccessPolicy + err := identifier.AccessPolicy.AssignProperties_To_TableAccessPolicy(&accessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TableAccessPolicy() to populate field AccessPolicy") + } + destination.AccessPolicy = &accessPolicy + } else { + destination.AccessPolicy = nil + } + + // Reference + if identifier.Reference != nil { + reference := identifier.Reference.Copy() + destination.Reference = &reference + } else { + destination.Reference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForTableSignedIdentifier interface (if implemented) to customize the conversion + var identifierAsAny any = identifier + if augmentedIdentifier, ok := identifierAsAny.(augmentConversionForTableSignedIdentifier); ok { + err := augmentedIdentifier.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.TableSignedIdentifier_STATUS // Object to set Table Access Policy. type TableSignedIdentifier_STATUS struct { @@ -227,6 +707,96 @@ type TableSignedIdentifier_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_TableSignedIdentifier_STATUS populates our TableSignedIdentifier_STATUS from the provided source TableSignedIdentifier_STATUS +func (identifier *TableSignedIdentifier_STATUS) AssignProperties_From_TableSignedIdentifier_STATUS(source *v20230101s.TableSignedIdentifier_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AccessPolicy + if source.AccessPolicy != nil { + var accessPolicy TableAccessPolicy_STATUS + err := accessPolicy.AssignProperties_From_TableAccessPolicy_STATUS(source.AccessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TableAccessPolicy_STATUS() to populate field AccessPolicy") + } + identifier.AccessPolicy = &accessPolicy + } else { + identifier.AccessPolicy = nil + } + + // Id + identifier.Id = genruntime.ClonePointerToString(source.Id) + + // Update the property bag + if len(propertyBag) > 0 { + identifier.PropertyBag = propertyBag + } else { + identifier.PropertyBag = nil + } + + // Invoke the augmentConversionForTableSignedIdentifier_STATUS interface (if implemented) to customize the conversion + var identifierAsAny any = identifier + if augmentedIdentifier, ok := identifierAsAny.(augmentConversionForTableSignedIdentifier_STATUS); ok { + err := augmentedIdentifier.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_TableSignedIdentifier_STATUS populates the provided destination TableSignedIdentifier_STATUS from our TableSignedIdentifier_STATUS +func (identifier *TableSignedIdentifier_STATUS) AssignProperties_To_TableSignedIdentifier_STATUS(destination *v20230101s.TableSignedIdentifier_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(identifier.PropertyBag) + + // AccessPolicy + if identifier.AccessPolicy != nil { + var accessPolicy v20230101s.TableAccessPolicy_STATUS + err := identifier.AccessPolicy.AssignProperties_To_TableAccessPolicy_STATUS(&accessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TableAccessPolicy_STATUS() to populate field AccessPolicy") + } + destination.AccessPolicy = &accessPolicy + } else { + destination.AccessPolicy = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(identifier.Id) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForTableSignedIdentifier_STATUS interface (if implemented) to customize the conversion + var identifierAsAny any = identifier + if augmentedIdentifier, ok := identifierAsAny.(augmentConversionForTableSignedIdentifier_STATUS); ok { + err := augmentedIdentifier.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForTableSignedIdentifier interface { + AssignPropertiesFrom(src *v20230101s.TableSignedIdentifier) error + AssignPropertiesTo(dst *v20230101s.TableSignedIdentifier) error +} + +type augmentConversionForTableSignedIdentifier_STATUS interface { + AssignPropertiesFrom(src *v20230101s.TableSignedIdentifier_STATUS) error + AssignPropertiesTo(dst *v20230101s.TableSignedIdentifier_STATUS) error +} + // Storage version of v1api20220901.TableAccessPolicy // Table Access Policy Properties Object. type TableAccessPolicy struct { @@ -236,6 +806,74 @@ type TableAccessPolicy struct { StartTime *string `json:"startTime,omitempty"` } +// AssignProperties_From_TableAccessPolicy populates our TableAccessPolicy from the provided source TableAccessPolicy +func (policy *TableAccessPolicy) AssignProperties_From_TableAccessPolicy(source *v20230101s.TableAccessPolicy) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ExpiryTime + policy.ExpiryTime = genruntime.ClonePointerToString(source.ExpiryTime) + + // Permission + policy.Permission = genruntime.ClonePointerToString(source.Permission) + + // StartTime + policy.StartTime = genruntime.ClonePointerToString(source.StartTime) + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForTableAccessPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForTableAccessPolicy); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_TableAccessPolicy populates the provided destination TableAccessPolicy from our TableAccessPolicy +func (policy *TableAccessPolicy) AssignProperties_To_TableAccessPolicy(destination *v20230101s.TableAccessPolicy) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // ExpiryTime + destination.ExpiryTime = genruntime.ClonePointerToString(policy.ExpiryTime) + + // Permission + destination.Permission = genruntime.ClonePointerToString(policy.Permission) + + // StartTime + destination.StartTime = genruntime.ClonePointerToString(policy.StartTime) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForTableAccessPolicy interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForTableAccessPolicy); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220901.TableAccessPolicy_STATUS // Table Access Policy Properties Object. type TableAccessPolicy_STATUS struct { @@ -245,6 +883,84 @@ type TableAccessPolicy_STATUS struct { StartTime *string `json:"startTime,omitempty"` } +// AssignProperties_From_TableAccessPolicy_STATUS populates our TableAccessPolicy_STATUS from the provided source TableAccessPolicy_STATUS +func (policy *TableAccessPolicy_STATUS) AssignProperties_From_TableAccessPolicy_STATUS(source *v20230101s.TableAccessPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ExpiryTime + policy.ExpiryTime = genruntime.ClonePointerToString(source.ExpiryTime) + + // Permission + policy.Permission = genruntime.ClonePointerToString(source.Permission) + + // StartTime + policy.StartTime = genruntime.ClonePointerToString(source.StartTime) + + // Update the property bag + if len(propertyBag) > 0 { + policy.PropertyBag = propertyBag + } else { + policy.PropertyBag = nil + } + + // Invoke the augmentConversionForTableAccessPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForTableAccessPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_TableAccessPolicy_STATUS populates the provided destination TableAccessPolicy_STATUS from our TableAccessPolicy_STATUS +func (policy *TableAccessPolicy_STATUS) AssignProperties_To_TableAccessPolicy_STATUS(destination *v20230101s.TableAccessPolicy_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(policy.PropertyBag) + + // ExpiryTime + destination.ExpiryTime = genruntime.ClonePointerToString(policy.ExpiryTime) + + // Permission + destination.Permission = genruntime.ClonePointerToString(policy.Permission) + + // StartTime + destination.StartTime = genruntime.ClonePointerToString(policy.StartTime) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForTableAccessPolicy_STATUS interface (if implemented) to customize the conversion + var policyAsAny any = policy + if augmentedPolicy, ok := policyAsAny.(augmentConversionForTableAccessPolicy_STATUS); ok { + err := augmentedPolicy.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForTableAccessPolicy interface { + AssignPropertiesFrom(src *v20230101s.TableAccessPolicy) error + AssignPropertiesTo(dst *v20230101s.TableAccessPolicy) error +} + +type augmentConversionForTableAccessPolicy_STATUS interface { + AssignPropertiesFrom(src *v20230101s.TableAccessPolicy_STATUS) error + AssignPropertiesTo(dst *v20230101s.TableAccessPolicy_STATUS) error +} + func init() { SchemeBuilder.Register(&StorageAccountsTableServicesTable{}, &StorageAccountsTableServicesTableList{}) } diff --git a/v2/api/storage/v1api20220901/storage/storage_accounts_table_services_table_types_gen_test.go b/v2/api/storage/v1api20220901/storage/storage_accounts_table_services_table_types_gen_test.go index 1734b371da2..2e445d4a13a 100644 --- a/v2/api/storage/v1api20220901/storage/storage_accounts_table_services_table_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage/storage_accounts_table_services_table_types_gen_test.go @@ -5,6 +5,7 @@ package storage import ( "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -17,6 +18,91 @@ import ( "testing" ) +func Test_StorageAccountsTableServicesTable_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsTableServicesTable to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsTableServicesTable, StorageAccountsTableServicesTableGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsTableServicesTable tests if a specific instance of StorageAccountsTableServicesTable round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsTableServicesTable(subject StorageAccountsTableServicesTable) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsTableServicesTable + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsTableServicesTable + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsTableServicesTable_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsTableServicesTable to StorageAccountsTableServicesTable via AssignProperties_To_StorageAccountsTableServicesTable & AssignProperties_From_StorageAccountsTableServicesTable returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsTableServicesTable, StorageAccountsTableServicesTableGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsTableServicesTable tests if a specific instance of StorageAccountsTableServicesTable can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsTableServicesTable(subject StorageAccountsTableServicesTable) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsTableServicesTable + err := copied.AssignProperties_To_StorageAccountsTableServicesTable(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsTableServicesTable + err = actual.AssignProperties_From_StorageAccountsTableServicesTable(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccountsTableServicesTable_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -79,6 +165,48 @@ func AddRelatedPropertyGeneratorsForStorageAccountsTableServicesTable(gens map[s gens["Status"] = StorageAccounts_TableServices_Table_STATUSGenerator() } +func Test_StorageAccounts_TableServices_Table_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_TableServices_Table_Spec to StorageAccounts_TableServices_Table_Spec via AssignProperties_To_StorageAccounts_TableServices_Table_Spec & AssignProperties_From_StorageAccounts_TableServices_Table_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_TableServices_Table_Spec, StorageAccounts_TableServices_Table_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_TableServices_Table_Spec tests if a specific instance of StorageAccounts_TableServices_Table_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_TableServices_Table_Spec(subject StorageAccounts_TableServices_Table_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_TableServices_Table_Spec + err := copied.AssignProperties_To_StorageAccounts_TableServices_Table_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_TableServices_Table_Spec + err = actual.AssignProperties_From_StorageAccounts_TableServices_Table_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_TableServices_Table_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -155,6 +283,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec(gen gens["SignedIdentifiers"] = gen.SliceOf(TableSignedIdentifierGenerator()) } +func Test_StorageAccounts_TableServices_Table_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_TableServices_Table_STATUS to StorageAccounts_TableServices_Table_STATUS via AssignProperties_To_StorageAccounts_TableServices_Table_STATUS & AssignProperties_From_StorageAccounts_TableServices_Table_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_TableServices_Table_STATUS, StorageAccounts_TableServices_Table_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_TableServices_Table_STATUS tests if a specific instance of StorageAccounts_TableServices_Table_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_TableServices_Table_STATUS(subject StorageAccounts_TableServices_Table_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_TableServices_Table_STATUS + err := copied.AssignProperties_To_StorageAccounts_TableServices_Table_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_TableServices_Table_STATUS + err = actual.AssignProperties_From_StorageAccounts_TableServices_Table_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_StorageAccounts_TableServices_Table_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -233,6 +403,48 @@ func AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS(g gens["SignedIdentifiers"] = gen.SliceOf(TableSignedIdentifier_STATUSGenerator()) } +func Test_TableSignedIdentifier_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TableSignedIdentifier to TableSignedIdentifier via AssignProperties_To_TableSignedIdentifier & AssignProperties_From_TableSignedIdentifier returns original", + prop.ForAll(RunPropertyAssignmentTestForTableSignedIdentifier, TableSignedIdentifierGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTableSignedIdentifier tests if a specific instance of TableSignedIdentifier can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTableSignedIdentifier(subject TableSignedIdentifier) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TableSignedIdentifier + err := copied.AssignProperties_To_TableSignedIdentifier(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TableSignedIdentifier + err = actual.AssignProperties_From_TableSignedIdentifier(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_TableSignedIdentifier_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -294,6 +506,48 @@ func AddRelatedPropertyGeneratorsForTableSignedIdentifier(gens map[string]gopter gens["AccessPolicy"] = gen.PtrOf(TableAccessPolicyGenerator()) } +func Test_TableSignedIdentifier_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TableSignedIdentifier_STATUS to TableSignedIdentifier_STATUS via AssignProperties_To_TableSignedIdentifier_STATUS & AssignProperties_From_TableSignedIdentifier_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForTableSignedIdentifier_STATUS, TableSignedIdentifier_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTableSignedIdentifier_STATUS tests if a specific instance of TableSignedIdentifier_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTableSignedIdentifier_STATUS(subject TableSignedIdentifier_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TableSignedIdentifier_STATUS + err := copied.AssignProperties_To_TableSignedIdentifier_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TableSignedIdentifier_STATUS + err = actual.AssignProperties_From_TableSignedIdentifier_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_TableSignedIdentifier_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -369,6 +623,48 @@ func AddRelatedPropertyGeneratorsForTableSignedIdentifier_STATUS(gens map[string gens["AccessPolicy"] = gen.PtrOf(TableAccessPolicy_STATUSGenerator()) } +func Test_TableAccessPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TableAccessPolicy to TableAccessPolicy via AssignProperties_To_TableAccessPolicy & AssignProperties_From_TableAccessPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForTableAccessPolicy, TableAccessPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTableAccessPolicy tests if a specific instance of TableAccessPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTableAccessPolicy(subject TableAccessPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TableAccessPolicy + err := copied.AssignProperties_To_TableAccessPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TableAccessPolicy + err = actual.AssignProperties_From_TableAccessPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_TableAccessPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -431,6 +727,48 @@ func AddIndependentPropertyGeneratorsForTableAccessPolicy(gens map[string]gopter gens["StartTime"] = gen.PtrOf(gen.AlphaString()) } +func Test_TableAccessPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TableAccessPolicy_STATUS to TableAccessPolicy_STATUS via AssignProperties_To_TableAccessPolicy_STATUS & AssignProperties_From_TableAccessPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForTableAccessPolicy_STATUS, TableAccessPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTableAccessPolicy_STATUS tests if a specific instance of TableAccessPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTableAccessPolicy_STATUS(subject TableAccessPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TableAccessPolicy_STATUS + err := copied.AssignProperties_To_TableAccessPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TableAccessPolicy_STATUS + err = actual.AssignProperties_From_TableAccessPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_TableAccessPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/storage/v1api20220901/storage/structure.txt b/v2/api/storage/v1api20220901/storage/structure.txt index 551ca6773d8..8c49c1afc9a 100644 --- a/v2/api/storage/v1api20220901/storage/structure.txt +++ b/v2/api/storage/v1api20220901/storage/structure.txt @@ -24,9 +24,7 @@ github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage │ │ │ ├── DefaultSharePermission: *string │ │ │ ├── DirectoryServiceOptions: *string │ │ │ └── PropertyBag: genruntime.PropertyBag -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 24 -│ │ │ └── Rule 1: MinLength: 3 +│ │ ├── AzureName: string │ │ ├── CustomDomain: *Object (3 properties) │ │ │ ├── Name: *string │ │ │ ├── PropertyBag: genruntime.PropertyBag @@ -458,9 +456,7 @@ github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage ├── StorageAccountsBlobServicesContainer: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901.StorageAccountsBlobService │ ├── Spec: Object (11 properties) -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 63 -│ │ │ └── Rule 1: MinLength: 3 +│ │ ├── AzureName: string │ │ ├── DefaultEncryptionScope: *string │ │ ├── DenyEncryptionScopeOverride: *bool │ │ ├── EnableNfsV3AllSquash: *bool @@ -602,9 +598,7 @@ github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901.StorageAccountsFileService │ ├── Spec: Object (10 properties) │ │ ├── AccessTier: *string -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 63 -│ │ │ └── Rule 1: MinLength: 3 +│ │ ├── AzureName: string │ │ ├── EnabledProtocols: *string │ │ ├── Metadata: map[string]string │ │ ├── OriginalVersion: string @@ -892,9 +886,7 @@ github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage ├── StorageAccountsQueueServicesQueue: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901.StorageAccountsQueueService │ ├── Spec: Object (5 properties) -│ │ ├── AzureName: Validated (2 rules) -│ │ │ ├── Rule 0: MaxLength: 63 -│ │ │ └── Rule 1: MinLength: 3 +│ │ ├── AzureName: string │ │ ├── Metadata: map[string]string │ │ ├── OriginalVersion: string │ │ ├── Owner: *genruntime.KnownResourceReference @@ -937,36 +929,173 @@ github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage │ ├── Name: *string │ ├── PropertyBag: genruntime.PropertyBag │ └── Type: *string -└── StorageAccountsTableServicesTable: Resource - ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901.StorageAccountsTableService - ├── Spec: Object (5 properties) - │ ├── AzureName: Validated (3 rules) - │ │ ├── Rule 0: MaxLength: 63 - │ │ ├── Rule 1: MinLength: 3 - │ │ └── Rule 2: Pattern: "^[A-Za-z][A-Za-z0-9]{2,62}$" - │ ├── OriginalVersion: string - │ ├── Owner: *genruntime.KnownResourceReference - │ ├── PropertyBag: genruntime.PropertyBag - │ └── SignedIdentifiers: Object (3 properties)[] - │ ├── AccessPolicy: *Object (4 properties) - │ │ ├── ExpiryTime: *string - │ │ ├── Permission: *string - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── StartTime: *string - │ ├── PropertyBag: genruntime.PropertyBag - │ └── Reference: *genruntime.ResourceReference - └── Status: Object (7 properties) - ├── Conditions: conditions.Condition[] - ├── Id: *string - ├── Name: *string - ├── PropertyBag: genruntime.PropertyBag - ├── SignedIdentifiers: Object (3 properties)[] - │ ├── AccessPolicy: *Object (4 properties) - │ │ ├── ExpiryTime: *string - │ │ ├── Permission: *string - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── StartTime: *string - │ ├── Id: *string - │ └── PropertyBag: genruntime.PropertyBag - ├── TableName: *string - └── Type: *string +├── StorageAccountsTableServicesTable: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901.StorageAccountsTableService +│ ├── Spec: Object (5 properties) +│ │ ├── AzureName: string +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── SignedIdentifiers: Object (3 properties)[] +│ │ ├── AccessPolicy: *Object (4 properties) +│ │ │ ├── ExpiryTime: *string +│ │ │ ├── Permission: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── StartTime: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Reference: *genruntime.ResourceReference +│ └── Status: Object (7 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Id: *string +│ ├── Name: *string +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── SignedIdentifiers: Object (3 properties)[] +│ │ ├── AccessPolicy: *Object (4 properties) +│ │ │ ├── ExpiryTime: *string +│ │ │ ├── Permission: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── StartTime: *string +│ │ ├── Id: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── TableName: *string +│ └── Type: *string +├── augmentConversionForAccessPolicy: Interface +├── augmentConversionForAccessPolicy_STATUS: Interface +├── augmentConversionForAccountImmutabilityPolicyProperties: Interface +├── augmentConversionForAccountImmutabilityPolicyProperties_STATUS: Interface +├── augmentConversionForActiveDirectoryProperties: Interface +├── augmentConversionForActiveDirectoryProperties_STATUS: Interface +├── augmentConversionForAzureFilesIdentityBasedAuthentication: Interface +├── augmentConversionForAzureFilesIdentityBasedAuthentication_STATUS: Interface +├── augmentConversionForBlobRestoreParameters_STATUS: Interface +├── augmentConversionForBlobRestoreRange_STATUS: Interface +├── augmentConversionForBlobRestoreStatus_STATUS: Interface +├── augmentConversionForChangeFeed: Interface +├── augmentConversionForChangeFeed_STATUS: Interface +├── augmentConversionForCorsRule: Interface +├── augmentConversionForCorsRule_STATUS: Interface +├── augmentConversionForCorsRules: Interface +├── augmentConversionForCorsRules_STATUS: Interface +├── augmentConversionForCustomDomain: Interface +├── augmentConversionForCustomDomain_STATUS: Interface +├── augmentConversionForDateAfterCreation: Interface +├── augmentConversionForDateAfterCreation_STATUS: Interface +├── augmentConversionForDateAfterModification: Interface +├── augmentConversionForDateAfterModification_STATUS: Interface +├── augmentConversionForDeleteRetentionPolicy: Interface +├── augmentConversionForDeleteRetentionPolicy_STATUS: Interface +├── augmentConversionForEncryption: Interface +├── augmentConversionForEncryptionIdentity: Interface +├── augmentConversionForEncryptionIdentity_STATUS: Interface +├── augmentConversionForEncryptionService: Interface +├── augmentConversionForEncryptionService_STATUS: Interface +├── augmentConversionForEncryptionServices: Interface +├── augmentConversionForEncryptionServices_STATUS: Interface +├── augmentConversionForEncryption_STATUS: Interface +├── augmentConversionForEndpoints_STATUS: Interface +├── augmentConversionForExtendedLocation: Interface +├── augmentConversionForExtendedLocation_STATUS: Interface +├── augmentConversionForGeoReplicationStats_STATUS: Interface +├── augmentConversionForIPRule: Interface +├── augmentConversionForIPRule_STATUS: Interface +├── augmentConversionForIdentity: Interface +├── augmentConversionForIdentity_STATUS: Interface +├── augmentConversionForImmutabilityPolicyProperties_STATUS: Interface +├── augmentConversionForImmutableStorageAccount: Interface +├── augmentConversionForImmutableStorageAccount_STATUS: Interface +├── augmentConversionForImmutableStorageWithVersioning: Interface +├── augmentConversionForImmutableStorageWithVersioning_STATUS: Interface +├── augmentConversionForKeyCreationTime_STATUS: Interface +├── augmentConversionForKeyPolicy: Interface +├── augmentConversionForKeyPolicy_STATUS: Interface +├── augmentConversionForKeyVaultProperties: Interface +├── augmentConversionForKeyVaultProperties_STATUS: Interface +├── augmentConversionForLastAccessTimeTrackingPolicy: Interface +├── augmentConversionForLastAccessTimeTrackingPolicy_STATUS: Interface +├── augmentConversionForLegalHoldProperties_STATUS: Interface +├── augmentConversionForManagementPolicyAction: Interface +├── augmentConversionForManagementPolicyAction_STATUS: Interface +├── augmentConversionForManagementPolicyBaseBlob: Interface +├── augmentConversionForManagementPolicyBaseBlob_STATUS: Interface +├── augmentConversionForManagementPolicyDefinition: Interface +├── augmentConversionForManagementPolicyDefinition_STATUS: Interface +├── augmentConversionForManagementPolicyFilter: Interface +├── augmentConversionForManagementPolicyFilter_STATUS: Interface +├── augmentConversionForManagementPolicyRule: Interface +├── augmentConversionForManagementPolicyRule_STATUS: Interface +├── augmentConversionForManagementPolicySchema: Interface +├── augmentConversionForManagementPolicySchema_STATUS: Interface +├── augmentConversionForManagementPolicySnapShot: Interface +├── augmentConversionForManagementPolicySnapShot_STATUS: Interface +├── augmentConversionForManagementPolicyVersion: Interface +├── augmentConversionForManagementPolicyVersion_STATUS: Interface +├── augmentConversionForMultichannel: Interface +├── augmentConversionForMultichannel_STATUS: Interface +├── augmentConversionForNetworkRuleSet: Interface +├── augmentConversionForNetworkRuleSet_STATUS: Interface +├── augmentConversionForPrivateEndpointConnection_STATUS: Interface +├── augmentConversionForProtectedAppendWritesHistory_STATUS: Interface +├── augmentConversionForProtocolSettings: Interface +├── augmentConversionForProtocolSettings_STATUS: Interface +├── augmentConversionForResourceAccessRule: Interface +├── augmentConversionForResourceAccessRule_STATUS: Interface +├── augmentConversionForRestorePolicyProperties: Interface +├── augmentConversionForRestorePolicyProperties_STATUS: Interface +├── augmentConversionForRoutingPreference: Interface +├── augmentConversionForRoutingPreference_STATUS: Interface +├── augmentConversionForSasPolicy: Interface +├── augmentConversionForSasPolicy_STATUS: Interface +├── augmentConversionForSignedIdentifier: Interface +├── augmentConversionForSignedIdentifier_STATUS: Interface +├── augmentConversionForSku: Interface +├── augmentConversionForSku_STATUS: Interface +├── augmentConversionForSmbSetting: Interface +├── augmentConversionForSmbSetting_STATUS: Interface +├── augmentConversionForStorageAccount: Interface +├── augmentConversionForStorageAccountInternetEndpoints_STATUS: Interface +├── augmentConversionForStorageAccountMicrosoftEndpoints_STATUS: Interface +├── augmentConversionForStorageAccountOperatorConfigMaps: Interface +├── augmentConversionForStorageAccountOperatorSecrets: Interface +├── augmentConversionForStorageAccountOperatorSpec: Interface +├── augmentConversionForStorageAccountSkuConversionStatus_STATUS: Interface +├── augmentConversionForStorageAccount_STATUS: Interface +├── augmentConversionForStorageAccount_Spec: Interface +├── augmentConversionForStorageAccountsBlobService: Interface +├── augmentConversionForStorageAccountsBlobServicesContainer: Interface +├── augmentConversionForStorageAccountsFileService: Interface +├── augmentConversionForStorageAccountsFileServicesShare: Interface +├── augmentConversionForStorageAccountsManagementPolicy: Interface +├── augmentConversionForStorageAccountsQueueService: Interface +├── augmentConversionForStorageAccountsQueueServicesQueue: Interface +├── augmentConversionForStorageAccountsTableService: Interface +├── augmentConversionForStorageAccountsTableServicesTable: Interface +├── augmentConversionForStorageAccounts_BlobService_STATUS: Interface +├── augmentConversionForStorageAccounts_BlobService_Spec: Interface +├── augmentConversionForStorageAccounts_BlobServices_Container_STATUS: Interface +├── augmentConversionForStorageAccounts_BlobServices_Container_Spec: Interface +├── augmentConversionForStorageAccounts_FileService_STATUS: Interface +├── augmentConversionForStorageAccounts_FileService_Spec: Interface +├── augmentConversionForStorageAccounts_FileServices_Share_STATUS: Interface +├── augmentConversionForStorageAccounts_FileServices_Share_Spec: Interface +├── augmentConversionForStorageAccounts_ManagementPolicy_STATUS: Interface +├── augmentConversionForStorageAccounts_ManagementPolicy_Spec: Interface +├── augmentConversionForStorageAccounts_QueueService_STATUS: Interface +├── augmentConversionForStorageAccounts_QueueService_Spec: Interface +├── augmentConversionForStorageAccounts_QueueServices_Queue_STATUS: Interface +├── augmentConversionForStorageAccounts_QueueServices_Queue_Spec: Interface +├── augmentConversionForStorageAccounts_TableService_STATUS: Interface +├── augmentConversionForStorageAccounts_TableService_Spec: Interface +├── augmentConversionForStorageAccounts_TableServices_Table_STATUS: Interface +├── augmentConversionForStorageAccounts_TableServices_Table_Spec: Interface +├── augmentConversionForTableAccessPolicy: Interface +├── augmentConversionForTableAccessPolicy_STATUS: Interface +├── augmentConversionForTableSignedIdentifier: Interface +├── augmentConversionForTableSignedIdentifier_STATUS: Interface +├── augmentConversionForTagFilter: Interface +├── augmentConversionForTagFilter_STATUS: Interface +├── augmentConversionForTagProperty_STATUS: Interface +├── augmentConversionForUpdateHistoryProperty_STATUS: Interface +├── augmentConversionForUserAssignedIdentityDetails: Interface +├── augmentConversionForUserAssignedIdentity_STATUS: Interface +├── augmentConversionForVirtualNetworkRule: Interface +└── augmentConversionForVirtualNetworkRule_STATUS: Interface diff --git a/v2/api/storage/v1api20220901/storage_account_types_gen.go b/v2/api/storage/v1api20220901/storage_account_types_gen.go index 79d806455a3..316148b14d4 100644 --- a/v2/api/storage/v1api20220901/storage_account_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_account_types_gen.go @@ -54,22 +54,36 @@ var _ conversion.Convertible = &StorageAccount{} // ConvertFrom populates our StorageAccount from the provided hub StorageAccount func (account *StorageAccount) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccount) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccount but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccount + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = account.AssignProperties_From_StorageAccount(&source) + if err != nil { + return errors.Wrap(err, "converting from source to account") } - return account.AssignProperties_From_StorageAccount(source) + return nil } // ConvertTo populates the provided hub StorageAccount from our StorageAccount func (account *StorageAccount) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccount) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccount but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccount + err := account.AssignProperties_To_StorageAccount(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from account") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return account.AssignProperties_To_StorageAccount(destination) + return nil } // +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20220901-storageaccount,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccounts,verbs=create;update,versions=v1api20220901,name=default.v1api20220901.storageaccounts.storage.azure.com,admissionReviewVersions=v1 @@ -95,17 +109,6 @@ func (account *StorageAccount) defaultAzureName() { // defaultImpl applies the code generated defaults to the StorageAccount resource func (account *StorageAccount) defaultImpl() { account.defaultAzureName() } -var _ genruntime.ImportableResource = &StorageAccount{} - -// InitializeSpec initializes the spec for this resource from the given status -func (account *StorageAccount) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*StorageAccount_STATUS); ok { - return account.Spec.Initialize_From_StorageAccount_STATUS(s) - } - - return fmt.Errorf("expected Status of type StorageAccount_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesExporter = &StorageAccount{} // ExportKubernetesResources defines a resource which can create other resources in Kubernetes. @@ -1758,279 +1761,6 @@ func (account *StorageAccount_Spec) AssignProperties_To_StorageAccount_Spec(dest return nil } -// Initialize_From_StorageAccount_STATUS populates our StorageAccount_Spec from the provided source StorageAccount_STATUS -func (account *StorageAccount_Spec) Initialize_From_StorageAccount_STATUS(source *StorageAccount_STATUS) error { - - // AccessTier - if source.AccessTier != nil { - accessTier := StorageAccountPropertiesCreateParameters_AccessTier(*source.AccessTier) - account.AccessTier = &accessTier - } else { - account.AccessTier = nil - } - - // AllowBlobPublicAccess - if source.AllowBlobPublicAccess != nil { - allowBlobPublicAccess := *source.AllowBlobPublicAccess - account.AllowBlobPublicAccess = &allowBlobPublicAccess - } else { - account.AllowBlobPublicAccess = nil - } - - // AllowCrossTenantReplication - if source.AllowCrossTenantReplication != nil { - allowCrossTenantReplication := *source.AllowCrossTenantReplication - account.AllowCrossTenantReplication = &allowCrossTenantReplication - } else { - account.AllowCrossTenantReplication = nil - } - - // AllowSharedKeyAccess - if source.AllowSharedKeyAccess != nil { - allowSharedKeyAccess := *source.AllowSharedKeyAccess - account.AllowSharedKeyAccess = &allowSharedKeyAccess - } else { - account.AllowSharedKeyAccess = nil - } - - // AllowedCopyScope - if source.AllowedCopyScope != nil { - allowedCopyScope := StorageAccountPropertiesCreateParameters_AllowedCopyScope(*source.AllowedCopyScope) - account.AllowedCopyScope = &allowedCopyScope - } else { - account.AllowedCopyScope = nil - } - - // AzureFilesIdentityBasedAuthentication - if source.AzureFilesIdentityBasedAuthentication != nil { - var azureFilesIdentityBasedAuthentication AzureFilesIdentityBasedAuthentication - err := azureFilesIdentityBasedAuthentication.Initialize_From_AzureFilesIdentityBasedAuthentication_STATUS(source.AzureFilesIdentityBasedAuthentication) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_AzureFilesIdentityBasedAuthentication_STATUS() to populate field AzureFilesIdentityBasedAuthentication") - } - account.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication - } else { - account.AzureFilesIdentityBasedAuthentication = nil - } - - // CustomDomain - if source.CustomDomain != nil { - var customDomain CustomDomain - err := customDomain.Initialize_From_CustomDomain_STATUS(source.CustomDomain) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_CustomDomain_STATUS() to populate field CustomDomain") - } - account.CustomDomain = &customDomain - } else { - account.CustomDomain = nil - } - - // DefaultToOAuthAuthentication - if source.DefaultToOAuthAuthentication != nil { - defaultToOAuthAuthentication := *source.DefaultToOAuthAuthentication - account.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication - } else { - account.DefaultToOAuthAuthentication = nil - } - - // DnsEndpointType - if source.DnsEndpointType != nil { - dnsEndpointType := StorageAccountPropertiesCreateParameters_DnsEndpointType(*source.DnsEndpointType) - account.DnsEndpointType = &dnsEndpointType - } else { - account.DnsEndpointType = nil - } - - // Encryption - if source.Encryption != nil { - var encryption Encryption - err := encryption.Initialize_From_Encryption_STATUS(source.Encryption) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_Encryption_STATUS() to populate field Encryption") - } - account.Encryption = &encryption - } else { - account.Encryption = nil - } - - // ExtendedLocation - if source.ExtendedLocation != nil { - var extendedLocation ExtendedLocation - err := extendedLocation.Initialize_From_ExtendedLocation_STATUS(source.ExtendedLocation) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ExtendedLocation_STATUS() to populate field ExtendedLocation") - } - account.ExtendedLocation = &extendedLocation - } else { - account.ExtendedLocation = nil - } - - // Identity - if source.Identity != nil { - var identity Identity - err := identity.Initialize_From_Identity_STATUS(source.Identity) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_Identity_STATUS() to populate field Identity") - } - account.Identity = &identity - } else { - account.Identity = nil - } - - // ImmutableStorageWithVersioning - if source.ImmutableStorageWithVersioning != nil { - var immutableStorageWithVersioning ImmutableStorageAccount - err := immutableStorageWithVersioning.Initialize_From_ImmutableStorageAccount_STATUS(source.ImmutableStorageWithVersioning) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ImmutableStorageAccount_STATUS() to populate field ImmutableStorageWithVersioning") - } - account.ImmutableStorageWithVersioning = &immutableStorageWithVersioning - } else { - account.ImmutableStorageWithVersioning = nil - } - - // IsHnsEnabled - if source.IsHnsEnabled != nil { - isHnsEnabled := *source.IsHnsEnabled - account.IsHnsEnabled = &isHnsEnabled - } else { - account.IsHnsEnabled = nil - } - - // IsLocalUserEnabled - if source.IsLocalUserEnabled != nil { - isLocalUserEnabled := *source.IsLocalUserEnabled - account.IsLocalUserEnabled = &isLocalUserEnabled - } else { - account.IsLocalUserEnabled = nil - } - - // IsNfsV3Enabled - if source.IsNfsV3Enabled != nil { - isNfsV3Enabled := *source.IsNfsV3Enabled - account.IsNfsV3Enabled = &isNfsV3Enabled - } else { - account.IsNfsV3Enabled = nil - } - - // IsSftpEnabled - if source.IsSftpEnabled != nil { - isSftpEnabled := *source.IsSftpEnabled - account.IsSftpEnabled = &isSftpEnabled - } else { - account.IsSftpEnabled = nil - } - - // KeyPolicy - if source.KeyPolicy != nil { - var keyPolicy KeyPolicy - err := keyPolicy.Initialize_From_KeyPolicy_STATUS(source.KeyPolicy) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_KeyPolicy_STATUS() to populate field KeyPolicy") - } - account.KeyPolicy = &keyPolicy - } else { - account.KeyPolicy = nil - } - - // Kind - if source.Kind != nil { - kind := StorageAccount_Kind_Spec(*source.Kind) - account.Kind = &kind - } else { - account.Kind = nil - } - - // LargeFileSharesState - if source.LargeFileSharesState != nil { - largeFileSharesState := StorageAccountPropertiesCreateParameters_LargeFileSharesState(*source.LargeFileSharesState) - account.LargeFileSharesState = &largeFileSharesState - } else { - account.LargeFileSharesState = nil - } - - // Location - account.Location = genruntime.ClonePointerToString(source.Location) - - // MinimumTlsVersion - if source.MinimumTlsVersion != nil { - minimumTlsVersion := StorageAccountPropertiesCreateParameters_MinimumTlsVersion(*source.MinimumTlsVersion) - account.MinimumTlsVersion = &minimumTlsVersion - } else { - account.MinimumTlsVersion = nil - } - - // NetworkAcls - if source.NetworkAcls != nil { - var networkAcl NetworkRuleSet - err := networkAcl.Initialize_From_NetworkRuleSet_STATUS(source.NetworkAcls) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_NetworkRuleSet_STATUS() to populate field NetworkAcls") - } - account.NetworkAcls = &networkAcl - } else { - account.NetworkAcls = nil - } - - // PublicNetworkAccess - if source.PublicNetworkAccess != nil { - publicNetworkAccess := StorageAccountPropertiesCreateParameters_PublicNetworkAccess(*source.PublicNetworkAccess) - account.PublicNetworkAccess = &publicNetworkAccess - } else { - account.PublicNetworkAccess = nil - } - - // RoutingPreference - if source.RoutingPreference != nil { - var routingPreference RoutingPreference - err := routingPreference.Initialize_From_RoutingPreference_STATUS(source.RoutingPreference) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_RoutingPreference_STATUS() to populate field RoutingPreference") - } - account.RoutingPreference = &routingPreference - } else { - account.RoutingPreference = nil - } - - // SasPolicy - if source.SasPolicy != nil { - var sasPolicy SasPolicy - err := sasPolicy.Initialize_From_SasPolicy_STATUS(source.SasPolicy) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_SasPolicy_STATUS() to populate field SasPolicy") - } - account.SasPolicy = &sasPolicy - } else { - account.SasPolicy = nil - } - - // Sku - if source.Sku != nil { - var sku Sku - err := sku.Initialize_From_Sku_STATUS(source.Sku) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_Sku_STATUS() to populate field Sku") - } - account.Sku = &sku - } else { - account.Sku = nil - } - - // SupportsHttpsTrafficOnly - if source.SupportsHttpsTrafficOnly != nil { - supportsHttpsTrafficOnly := *source.SupportsHttpsTrafficOnly - account.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly - } else { - account.SupportsHttpsTrafficOnly = nil - } - - // Tags - account.Tags = genruntime.CloneMapOfStringToString(source.Tags) - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (account *StorageAccount_Spec) OriginalVersion() string { return GroupVersion.Version @@ -3745,65 +3475,30 @@ func (authentication *AzureFilesIdentityBasedAuthentication) AssignProperties_To } destination.ActiveDirectoryProperties = &activeDirectoryProperty } else { - destination.ActiveDirectoryProperties = nil - } - - // DefaultSharePermission - if authentication.DefaultSharePermission != nil { - defaultSharePermission := string(*authentication.DefaultSharePermission) - destination.DefaultSharePermission = &defaultSharePermission - } else { - destination.DefaultSharePermission = nil - } - - // DirectoryServiceOptions - if authentication.DirectoryServiceOptions != nil { - directoryServiceOption := string(*authentication.DirectoryServiceOptions) - destination.DirectoryServiceOptions = &directoryServiceOption - } else { - destination.DirectoryServiceOptions = nil - } - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // No error - return nil -} - -// Initialize_From_AzureFilesIdentityBasedAuthentication_STATUS populates our AzureFilesIdentityBasedAuthentication from the provided source AzureFilesIdentityBasedAuthentication_STATUS -func (authentication *AzureFilesIdentityBasedAuthentication) Initialize_From_AzureFilesIdentityBasedAuthentication_STATUS(source *AzureFilesIdentityBasedAuthentication_STATUS) error { - - // ActiveDirectoryProperties - if source.ActiveDirectoryProperties != nil { - var activeDirectoryProperty ActiveDirectoryProperties - err := activeDirectoryProperty.Initialize_From_ActiveDirectoryProperties_STATUS(source.ActiveDirectoryProperties) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ActiveDirectoryProperties_STATUS() to populate field ActiveDirectoryProperties") - } - authentication.ActiveDirectoryProperties = &activeDirectoryProperty - } else { - authentication.ActiveDirectoryProperties = nil + destination.ActiveDirectoryProperties = nil } // DefaultSharePermission - if source.DefaultSharePermission != nil { - defaultSharePermission := AzureFilesIdentityBasedAuthentication_DefaultSharePermission(*source.DefaultSharePermission) - authentication.DefaultSharePermission = &defaultSharePermission + if authentication.DefaultSharePermission != nil { + defaultSharePermission := string(*authentication.DefaultSharePermission) + destination.DefaultSharePermission = &defaultSharePermission } else { - authentication.DefaultSharePermission = nil + destination.DefaultSharePermission = nil } // DirectoryServiceOptions - if source.DirectoryServiceOptions != nil { - directoryServiceOption := AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions(*source.DirectoryServiceOptions) - authentication.DirectoryServiceOptions = &directoryServiceOption + if authentication.DirectoryServiceOptions != nil { + directoryServiceOption := string(*authentication.DirectoryServiceOptions) + destination.DirectoryServiceOptions = &directoryServiceOption } else { - authentication.DirectoryServiceOptions = nil + destination.DirectoryServiceOptions = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil } // No error @@ -4187,24 +3882,6 @@ func (domain *CustomDomain) AssignProperties_To_CustomDomain(destination *v20220 return nil } -// Initialize_From_CustomDomain_STATUS populates our CustomDomain from the provided source CustomDomain_STATUS -func (domain *CustomDomain) Initialize_From_CustomDomain_STATUS(source *CustomDomain_STATUS) error { - - // Name - domain.Name = genruntime.ClonePointerToString(source.Name) - - // UseSubDomainName - if source.UseSubDomainName != nil { - useSubDomainName := *source.UseSubDomainName - domain.UseSubDomainName = &useSubDomainName - } else { - domain.UseSubDomainName = nil - } - - // No error - return nil -} - // The custom domain assigned to this storage account. This can be set via Update. type CustomDomain_STATUS struct { // Name: Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. @@ -4551,65 +4228,6 @@ func (encryption *Encryption) AssignProperties_To_Encryption(destination *v20220 return nil } -// Initialize_From_Encryption_STATUS populates our Encryption from the provided source Encryption_STATUS -func (encryption *Encryption) Initialize_From_Encryption_STATUS(source *Encryption_STATUS) error { - - // Identity - if source.Identity != nil { - var identity EncryptionIdentity - err := identity.Initialize_From_EncryptionIdentity_STATUS(source.Identity) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_EncryptionIdentity_STATUS() to populate field Identity") - } - encryption.Identity = &identity - } else { - encryption.Identity = nil - } - - // KeySource - if source.KeySource != nil { - keySource := Encryption_KeySource(*source.KeySource) - encryption.KeySource = &keySource - } else { - encryption.KeySource = nil - } - - // Keyvaultproperties - if source.Keyvaultproperties != nil { - var keyvaultproperty KeyVaultProperties - err := keyvaultproperty.Initialize_From_KeyVaultProperties_STATUS(source.Keyvaultproperties) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_KeyVaultProperties_STATUS() to populate field Keyvaultproperties") - } - encryption.Keyvaultproperties = &keyvaultproperty - } else { - encryption.Keyvaultproperties = nil - } - - // RequireInfrastructureEncryption - if source.RequireInfrastructureEncryption != nil { - requireInfrastructureEncryption := *source.RequireInfrastructureEncryption - encryption.RequireInfrastructureEncryption = &requireInfrastructureEncryption - } else { - encryption.RequireInfrastructureEncryption = nil - } - - // Services - if source.Services != nil { - var service EncryptionServices - err := service.Initialize_From_EncryptionServices_STATUS(source.Services) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_EncryptionServices_STATUS() to populate field Services") - } - encryption.Services = &service - } else { - encryption.Services = nil - } - - // No error - return nil -} - // The encryption settings on the storage account. type Encryption_STATUS struct { // Identity: The identity to be used with service-side encryption at rest. @@ -5135,24 +4753,6 @@ func (location *ExtendedLocation) AssignProperties_To_ExtendedLocation(destinati return nil } -// Initialize_From_ExtendedLocation_STATUS populates our ExtendedLocation from the provided source ExtendedLocation_STATUS -func (location *ExtendedLocation) Initialize_From_ExtendedLocation_STATUS(source *ExtendedLocation_STATUS) error { - - // Name - location.Name = genruntime.ClonePointerToString(source.Name) - - // Type - if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar - } else { - location.Type = nil - } - - // No error - return nil -} - // The complex type of the extended location. type ExtendedLocation_STATUS struct { // Name: The name of the extended location. @@ -5491,33 +5091,6 @@ func (identity *Identity) AssignProperties_To_Identity(destination *v20220901s.I return nil } -// Initialize_From_Identity_STATUS populates our Identity from the provided source Identity_STATUS -func (identity *Identity) Initialize_From_Identity_STATUS(source *Identity_STATUS) error { - - // Type - if source.Type != nil { - typeVar := Identity_Type(*source.Type) - identity.Type = &typeVar - } else { - identity.Type = nil - } - - // UserAssignedIdentities - if source.UserAssignedIdentities != nil { - userAssignedIdentityList := make([]UserAssignedIdentityDetails, 0, len(source.UserAssignedIdentities)) - for userAssignedIdentitiesKey := range source.UserAssignedIdentities { - userAssignedIdentitiesRef := genruntime.CreateResourceReferenceFromARMID(userAssignedIdentitiesKey) - userAssignedIdentityList = append(userAssignedIdentityList, UserAssignedIdentityDetails{Reference: userAssignedIdentitiesRef}) - } - identity.UserAssignedIdentities = userAssignedIdentityList - } else { - identity.UserAssignedIdentities = nil - } - - // No error - return nil -} - // Identity for the resource. type Identity_STATUS struct { // PrincipalId: The principal ID of resource identity. @@ -5807,33 +5380,6 @@ func (account *ImmutableStorageAccount) AssignProperties_To_ImmutableStorageAcco return nil } -// Initialize_From_ImmutableStorageAccount_STATUS populates our ImmutableStorageAccount from the provided source ImmutableStorageAccount_STATUS -func (account *ImmutableStorageAccount) Initialize_From_ImmutableStorageAccount_STATUS(source *ImmutableStorageAccount_STATUS) error { - - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - account.Enabled = &enabled - } else { - account.Enabled = nil - } - - // ImmutabilityPolicy - if source.ImmutabilityPolicy != nil { - var immutabilityPolicy AccountImmutabilityPolicyProperties - err := immutabilityPolicy.Initialize_From_AccountImmutabilityPolicyProperties_STATUS(source.ImmutabilityPolicy) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_AccountImmutabilityPolicyProperties_STATUS() to populate field ImmutabilityPolicy") - } - account.ImmutabilityPolicy = &immutabilityPolicy - } else { - account.ImmutabilityPolicy = nil - } - - // No error - return nil -} - // This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. type ImmutableStorageAccount_STATUS struct { // Enabled: A boolean flag which enables account-level immutability. All the containers under such an account have @@ -6091,16 +5637,6 @@ func (policy *KeyPolicy) AssignProperties_To_KeyPolicy(destination *v20220901s.K return nil } -// Initialize_From_KeyPolicy_STATUS populates our KeyPolicy from the provided source KeyPolicy_STATUS -func (policy *KeyPolicy) Initialize_From_KeyPolicy_STATUS(source *KeyPolicy_STATUS) error { - - // KeyExpirationPeriodInDays - policy.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(source.KeyExpirationPeriodInDays) - - // No error - return nil -} - // KeyPolicy assigned to the storage account. type KeyPolicy_STATUS struct { // KeyExpirationPeriodInDays: The key expiration period in days. @@ -6451,83 +5987,6 @@ func (ruleSet *NetworkRuleSet) AssignProperties_To_NetworkRuleSet(destination *v return nil } -// Initialize_From_NetworkRuleSet_STATUS populates our NetworkRuleSet from the provided source NetworkRuleSet_STATUS -func (ruleSet *NetworkRuleSet) Initialize_From_NetworkRuleSet_STATUS(source *NetworkRuleSet_STATUS) error { - - // Bypass - if source.Bypass != nil { - bypass := NetworkRuleSet_Bypass(*source.Bypass) - ruleSet.Bypass = &bypass - } else { - ruleSet.Bypass = nil - } - - // DefaultAction - if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction - } else { - ruleSet.DefaultAction = nil - } - - // IpRules - if source.IpRules != nil { - ipRuleList := make([]IPRule, len(source.IpRules)) - for ipRuleIndex, ipRuleItem := range source.IpRules { - // Shadow the loop variable to avoid aliasing - ipRuleItem := ipRuleItem - var ipRule IPRule - err := ipRule.Initialize_From_IPRule_STATUS(&ipRuleItem) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_IPRule_STATUS() to populate field IpRules") - } - ipRuleList[ipRuleIndex] = ipRule - } - ruleSet.IpRules = ipRuleList - } else { - ruleSet.IpRules = nil - } - - // ResourceAccessRules - if source.ResourceAccessRules != nil { - resourceAccessRuleList := make([]ResourceAccessRule, len(source.ResourceAccessRules)) - for resourceAccessRuleIndex, resourceAccessRuleItem := range source.ResourceAccessRules { - // Shadow the loop variable to avoid aliasing - resourceAccessRuleItem := resourceAccessRuleItem - var resourceAccessRule ResourceAccessRule - err := resourceAccessRule.Initialize_From_ResourceAccessRule_STATUS(&resourceAccessRuleItem) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ResourceAccessRule_STATUS() to populate field ResourceAccessRules") - } - resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule - } - ruleSet.ResourceAccessRules = resourceAccessRuleList - } else { - ruleSet.ResourceAccessRules = nil - } - - // VirtualNetworkRules - if source.VirtualNetworkRules != nil { - virtualNetworkRuleList := make([]VirtualNetworkRule, len(source.VirtualNetworkRules)) - for virtualNetworkRuleIndex, virtualNetworkRuleItem := range source.VirtualNetworkRules { - // Shadow the loop variable to avoid aliasing - virtualNetworkRuleItem := virtualNetworkRuleItem - var virtualNetworkRule VirtualNetworkRule - err := virtualNetworkRule.Initialize_From_VirtualNetworkRule_STATUS(&virtualNetworkRuleItem) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_VirtualNetworkRule_STATUS() to populate field VirtualNetworkRules") - } - virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule - } - ruleSet.VirtualNetworkRules = virtualNetworkRuleList - } else { - ruleSet.VirtualNetworkRules = nil - } - - // No error - return nil -} - // Network rule set type NetworkRuleSet_STATUS struct { // Bypass: Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of @@ -6963,45 +6422,14 @@ func (preference *RoutingPreference) AssignProperties_To_RoutingPreference(desti routingChoice := string(*preference.RoutingChoice) destination.RoutingChoice = &routingChoice } else { - destination.RoutingChoice = nil - } - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // No error - return nil -} - -// Initialize_From_RoutingPreference_STATUS populates our RoutingPreference from the provided source RoutingPreference_STATUS -func (preference *RoutingPreference) Initialize_From_RoutingPreference_STATUS(source *RoutingPreference_STATUS) error { - - // PublishInternetEndpoints - if source.PublishInternetEndpoints != nil { - publishInternetEndpoint := *source.PublishInternetEndpoints - preference.PublishInternetEndpoints = &publishInternetEndpoint - } else { - preference.PublishInternetEndpoints = nil - } - - // PublishMicrosoftEndpoints - if source.PublishMicrosoftEndpoints != nil { - publishMicrosoftEndpoint := *source.PublishMicrosoftEndpoints - preference.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint - } else { - preference.PublishMicrosoftEndpoints = nil + destination.RoutingChoice = nil } - // RoutingChoice - if source.RoutingChoice != nil { - routingChoice := RoutingPreference_RoutingChoice(*source.RoutingChoice) - preference.RoutingChoice = &routingChoice + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag } else { - preference.RoutingChoice = nil + destination.PropertyBag = nil } // No error @@ -7235,24 +6663,6 @@ func (policy *SasPolicy) AssignProperties_To_SasPolicy(destination *v20220901s.S return nil } -// Initialize_From_SasPolicy_STATUS populates our SasPolicy from the provided source SasPolicy_STATUS -func (policy *SasPolicy) Initialize_From_SasPolicy_STATUS(source *SasPolicy_STATUS) error { - - // ExpirationAction - if source.ExpirationAction != nil { - expirationAction := SasPolicy_ExpirationAction(*source.ExpirationAction) - policy.ExpirationAction = &expirationAction - } else { - policy.ExpirationAction = nil - } - - // SasExpirationPeriod - policy.SasExpirationPeriod = genruntime.ClonePointerToString(source.SasExpirationPeriod) - - // No error - return nil -} - // SasPolicy assigned to the storage account. type SasPolicy_STATUS struct { // ExpirationAction: The SAS expiration action. Can only be Log. @@ -7454,29 +6864,6 @@ func (sku *Sku) AssignProperties_To_Sku(destination *v20220901s.Sku) error { return nil } -// Initialize_From_Sku_STATUS populates our Sku from the provided source Sku_STATUS -func (sku *Sku) Initialize_From_Sku_STATUS(source *Sku_STATUS) error { - - // Name - if source.Name != nil { - name := SkuName(*source.Name) - sku.Name = &name - } else { - sku.Name = nil - } - - // Tier - if source.Tier != nil { - tier := Tier(*source.Tier) - sku.Tier = &tier - } else { - sku.Tier = nil - } - - // No error - return nil -} - // The SKU of the storage account. type Sku_STATUS struct { // Name: The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called @@ -8047,37 +7434,6 @@ func (properties *AccountImmutabilityPolicyProperties) AssignProperties_To_Accou return nil } -// Initialize_From_AccountImmutabilityPolicyProperties_STATUS populates our AccountImmutabilityPolicyProperties from the provided source AccountImmutabilityPolicyProperties_STATUS -func (properties *AccountImmutabilityPolicyProperties) Initialize_From_AccountImmutabilityPolicyProperties_STATUS(source *AccountImmutabilityPolicyProperties_STATUS) error { - - // AllowProtectedAppendWrites - if source.AllowProtectedAppendWrites != nil { - allowProtectedAppendWrite := *source.AllowProtectedAppendWrites - properties.AllowProtectedAppendWrites = &allowProtectedAppendWrite - } else { - properties.AllowProtectedAppendWrites = nil - } - - // ImmutabilityPeriodSinceCreationInDays - if source.ImmutabilityPeriodSinceCreationInDays != nil { - immutabilityPeriodSinceCreationInDay := *source.ImmutabilityPeriodSinceCreationInDays - properties.ImmutabilityPeriodSinceCreationInDays = &immutabilityPeriodSinceCreationInDay - } else { - properties.ImmutabilityPeriodSinceCreationInDays = nil - } - - // State - if source.State != nil { - state := AccountImmutabilityPolicyProperties_State(*source.State) - properties.State = &state - } else { - properties.State = nil - } - - // No error - return nil -} - // This defines account-level immutability policy properties. type AccountImmutabilityPolicyProperties_STATUS struct { // AllowProtectedAppendWrites: This property can only be changed for disabled and unlocked time-based retention policies. @@ -8427,42 +7783,6 @@ func (properties *ActiveDirectoryProperties) AssignProperties_To_ActiveDirectory return nil } -// Initialize_From_ActiveDirectoryProperties_STATUS populates our ActiveDirectoryProperties from the provided source ActiveDirectoryProperties_STATUS -func (properties *ActiveDirectoryProperties) Initialize_From_ActiveDirectoryProperties_STATUS(source *ActiveDirectoryProperties_STATUS) error { - - // AccountType - if source.AccountType != nil { - accountType := ActiveDirectoryProperties_AccountType(*source.AccountType) - properties.AccountType = &accountType - } else { - properties.AccountType = nil - } - - // AzureStorageSid - properties.AzureStorageSid = genruntime.ClonePointerToString(source.AzureStorageSid) - - // DomainGuid - properties.DomainGuid = genruntime.ClonePointerToString(source.DomainGuid) - - // DomainName - properties.DomainName = genruntime.ClonePointerToString(source.DomainName) - - // DomainSid - properties.DomainSid = genruntime.ClonePointerToString(source.DomainSid) - - // ForestName - properties.ForestName = genruntime.ClonePointerToString(source.ForestName) - - // NetBiosDomainName - properties.NetBiosDomainName = genruntime.ClonePointerToString(source.NetBiosDomainName) - - // SamAccountName - properties.SamAccountName = genruntime.ClonePointerToString(source.SamAccountName) - - // No error - return nil -} - // Settings properties for Active Directory (AD). type ActiveDirectoryProperties_STATUS struct { // AccountType: Specifies the Active Directory account type for Azure Storage. @@ -8913,16 +8233,6 @@ func (identity *EncryptionIdentity) AssignProperties_To_EncryptionIdentity(desti return nil } -// Initialize_From_EncryptionIdentity_STATUS populates our EncryptionIdentity from the provided source EncryptionIdentity_STATUS -func (identity *EncryptionIdentity) Initialize_From_EncryptionIdentity_STATUS(source *EncryptionIdentity_STATUS) error { - - // FederatedIdentityClientId - identity.FederatedIdentityClientId = genruntime.ClonePointerToString(source.FederatedIdentityClientId) - - // No error - return nil -} - // Encryption identity for the storage account. type EncryptionIdentity_STATUS struct { // FederatedIdentityClientId: ClientId of the multi-tenant application to be used in conjunction with the user-assigned @@ -9244,61 +8554,6 @@ func (services *EncryptionServices) AssignProperties_To_EncryptionServices(desti return nil } -// Initialize_From_EncryptionServices_STATUS populates our EncryptionServices from the provided source EncryptionServices_STATUS -func (services *EncryptionServices) Initialize_From_EncryptionServices_STATUS(source *EncryptionServices_STATUS) error { - - // Blob - if source.Blob != nil { - var blob EncryptionService - err := blob.Initialize_From_EncryptionService_STATUS(source.Blob) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_EncryptionService_STATUS() to populate field Blob") - } - services.Blob = &blob - } else { - services.Blob = nil - } - - // File - if source.File != nil { - var file EncryptionService - err := file.Initialize_From_EncryptionService_STATUS(source.File) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_EncryptionService_STATUS() to populate field File") - } - services.File = &file - } else { - services.File = nil - } - - // Queue - if source.Queue != nil { - var queue EncryptionService - err := queue.Initialize_From_EncryptionService_STATUS(source.Queue) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_EncryptionService_STATUS() to populate field Queue") - } - services.Queue = &queue - } else { - services.Queue = nil - } - - // Table - if source.Table != nil { - var table EncryptionService - err := table.Initialize_From_EncryptionService_STATUS(source.Table) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_EncryptionService_STATUS() to populate field Table") - } - services.Table = &table - } else { - services.Table = nil - } - - // No error - return nil -} - // A list of services that support encryption. type EncryptionServices_STATUS struct { // Blob: The encryption function of the blob storage service. @@ -9609,24 +8864,6 @@ func (rule *IPRule) AssignProperties_To_IPRule(destination *v20220901s.IPRule) e return nil } -// Initialize_From_IPRule_STATUS populates our IPRule from the provided source IPRule_STATUS -func (rule *IPRule) Initialize_From_IPRule_STATUS(source *IPRule_STATUS) error { - - // Action - if source.Action != nil { - action := IPRule_Action(*source.Action) - rule.Action = &action - } else { - rule.Action = nil - } - - // Value - rule.Value = genruntime.ClonePointerToString(source.Value) - - // No error - return nil -} - // IP rule with specific IP or IP range in CIDR format. type IPRule_STATUS struct { // Action: The action of IP ACL rule. @@ -9827,22 +9064,6 @@ func (properties *KeyVaultProperties) AssignProperties_To_KeyVaultProperties(des return nil } -// Initialize_From_KeyVaultProperties_STATUS populates our KeyVaultProperties from the provided source KeyVaultProperties_STATUS -func (properties *KeyVaultProperties) Initialize_From_KeyVaultProperties_STATUS(source *KeyVaultProperties_STATUS) error { - - // Keyname - properties.Keyname = genruntime.ClonePointerToString(source.Keyname) - - // Keyvaulturi - properties.Keyvaulturi = genruntime.ClonePointerToString(source.Keyvaulturi) - - // Keyversion - properties.Keyversion = genruntime.ClonePointerToString(source.Keyversion) - - // No error - return nil -} - // Properties of key vault. type KeyVaultProperties_STATUS struct { // CurrentVersionedKeyExpirationTimestamp: This is a read only property that represents the expiration time of the current @@ -10117,24 +9338,6 @@ func (rule *ResourceAccessRule) AssignProperties_To_ResourceAccessRule(destinati return nil } -// Initialize_From_ResourceAccessRule_STATUS populates our ResourceAccessRule from the provided source ResourceAccessRule_STATUS -func (rule *ResourceAccessRule) Initialize_From_ResourceAccessRule_STATUS(source *ResourceAccessRule_STATUS) error { - - // ResourceReference - if source.ResourceId != nil { - resourceReference := genruntime.CreateResourceReferenceFromARMID(*source.ResourceId) - rule.ResourceReference = &resourceReference - } else { - rule.ResourceReference = nil - } - - // TenantId - rule.TenantId = genruntime.ClonePointerToString(source.TenantId) - - // No error - return nil -} - // Resource Access Rule. type ResourceAccessRule_STATUS struct { // ResourceId: Resource Id @@ -11058,37 +10261,6 @@ func (rule *VirtualNetworkRule) AssignProperties_To_VirtualNetworkRule(destinati return nil } -// Initialize_From_VirtualNetworkRule_STATUS populates our VirtualNetworkRule from the provided source VirtualNetworkRule_STATUS -func (rule *VirtualNetworkRule) Initialize_From_VirtualNetworkRule_STATUS(source *VirtualNetworkRule_STATUS) error { - - // Action - if source.Action != nil { - action := VirtualNetworkRule_Action(*source.Action) - rule.Action = &action - } else { - rule.Action = nil - } - - // Reference - if source.Id != nil { - reference := genruntime.CreateResourceReferenceFromARMID(*source.Id) - rule.Reference = &reference - } else { - rule.Reference = nil - } - - // State - if source.State != nil { - state := VirtualNetworkRule_State(*source.State) - rule.State = &state - } else { - rule.State = nil - } - - // No error - return nil -} - // Virtual Network rule. type VirtualNetworkRule_STATUS struct { // Action: The action of virtual network rule. @@ -11422,29 +10594,6 @@ func (service *EncryptionService) AssignProperties_To_EncryptionService(destinat return nil } -// Initialize_From_EncryptionService_STATUS populates our EncryptionService from the provided source EncryptionService_STATUS -func (service *EncryptionService) Initialize_From_EncryptionService_STATUS(source *EncryptionService_STATUS) error { - - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - service.Enabled = &enabled - } else { - service.Enabled = nil - } - - // KeyType - if source.KeyType != nil { - keyType := EncryptionService_KeyType(*source.KeyType) - service.KeyType = &keyType - } else { - service.KeyType = nil - } - - // No error - return nil -} - // A service that allows server-side encryption to be used. type EncryptionService_STATUS struct { // Enabled: A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is diff --git a/v2/api/storage/v1api20220901/storage_account_types_gen_test.go b/v2/api/storage/v1api20220901/storage_account_types_gen_test.go index 7357c06f231..6ad0500eb35 100644 --- a/v2/api/storage/v1api20220901/storage_account_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage_account_types_gen_test.go @@ -6,6 +6,7 @@ package v1api20220901 import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccount(subject StorageAccount) string { copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccount + var hub v20230101s.StorageAccount err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20220901/storage_accounts_blob_service_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_blob_service_types_gen.go index f62f047a215..8506005d7e7 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_blob_service_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_blob_service_types_gen.go @@ -49,22 +49,36 @@ var _ conversion.Convertible = &StorageAccountsBlobService{} // ConvertFrom populates our StorageAccountsBlobService from the provided hub StorageAccountsBlobService func (service *StorageAccountsBlobService) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsBlobService) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsBlobService but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsBlobService + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = service.AssignProperties_From_StorageAccountsBlobService(&source) + if err != nil { + return errors.Wrap(err, "converting from source to service") } - return service.AssignProperties_From_StorageAccountsBlobService(source) + return nil } // ConvertTo populates the provided hub StorageAccountsBlobService from our StorageAccountsBlobService func (service *StorageAccountsBlobService) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsBlobService) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsBlobService but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsBlobService + err := service.AssignProperties_To_StorageAccountsBlobService(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from service") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return service.AssignProperties_To_StorageAccountsBlobService(destination) + return nil } // +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20220901-storageaccountsblobservice,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsblobservices,verbs=create;update,versions=v1api20220901,name=default.v1api20220901.storageaccountsblobservices.storage.azure.com,admissionReviewVersions=v1 @@ -83,17 +97,6 @@ func (service *StorageAccountsBlobService) Default() { // defaultImpl applies the code generated defaults to the StorageAccountsBlobService resource func (service *StorageAccountsBlobService) defaultImpl() {} -var _ genruntime.ImportableResource = &StorageAccountsBlobService{} - -// InitializeSpec initializes the spec for this resource from the given status -func (service *StorageAccountsBlobService) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*StorageAccounts_BlobService_STATUS); ok { - return service.Spec.Initialize_From_StorageAccounts_BlobService_STATUS(s) - } - - return fmt.Errorf("expected Status of type StorageAccounts_BlobService_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesResource = &StorageAccountsBlobService{} // AzureName returns the Azure name of the resource (always "default") @@ -848,104 +851,6 @@ func (service *StorageAccounts_BlobService_Spec) AssignProperties_To_StorageAcco return nil } -// Initialize_From_StorageAccounts_BlobService_STATUS populates our StorageAccounts_BlobService_Spec from the provided source StorageAccounts_BlobService_STATUS -func (service *StorageAccounts_BlobService_Spec) Initialize_From_StorageAccounts_BlobService_STATUS(source *StorageAccounts_BlobService_STATUS) error { - - // AutomaticSnapshotPolicyEnabled - if source.AutomaticSnapshotPolicyEnabled != nil { - automaticSnapshotPolicyEnabled := *source.AutomaticSnapshotPolicyEnabled - service.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled - } else { - service.AutomaticSnapshotPolicyEnabled = nil - } - - // ChangeFeed - if source.ChangeFeed != nil { - var changeFeed ChangeFeed - err := changeFeed.Initialize_From_ChangeFeed_STATUS(source.ChangeFeed) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ChangeFeed_STATUS() to populate field ChangeFeed") - } - service.ChangeFeed = &changeFeed - } else { - service.ChangeFeed = nil - } - - // ContainerDeleteRetentionPolicy - if source.ContainerDeleteRetentionPolicy != nil { - var containerDeleteRetentionPolicy DeleteRetentionPolicy - err := containerDeleteRetentionPolicy.Initialize_From_DeleteRetentionPolicy_STATUS(source.ContainerDeleteRetentionPolicy) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DeleteRetentionPolicy_STATUS() to populate field ContainerDeleteRetentionPolicy") - } - service.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy - } else { - service.ContainerDeleteRetentionPolicy = nil - } - - // Cors - if source.Cors != nil { - var cor CorsRules - err := cor.Initialize_From_CorsRules_STATUS(source.Cors) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_CorsRules_STATUS() to populate field Cors") - } - service.Cors = &cor - } else { - service.Cors = nil - } - - // DefaultServiceVersion - service.DefaultServiceVersion = genruntime.ClonePointerToString(source.DefaultServiceVersion) - - // DeleteRetentionPolicy - if source.DeleteRetentionPolicy != nil { - var deleteRetentionPolicy DeleteRetentionPolicy - err := deleteRetentionPolicy.Initialize_From_DeleteRetentionPolicy_STATUS(source.DeleteRetentionPolicy) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DeleteRetentionPolicy_STATUS() to populate field DeleteRetentionPolicy") - } - service.DeleteRetentionPolicy = &deleteRetentionPolicy - } else { - service.DeleteRetentionPolicy = nil - } - - // IsVersioningEnabled - if source.IsVersioningEnabled != nil { - isVersioningEnabled := *source.IsVersioningEnabled - service.IsVersioningEnabled = &isVersioningEnabled - } else { - service.IsVersioningEnabled = nil - } - - // LastAccessTimeTrackingPolicy - if source.LastAccessTimeTrackingPolicy != nil { - var lastAccessTimeTrackingPolicy LastAccessTimeTrackingPolicy - err := lastAccessTimeTrackingPolicy.Initialize_From_LastAccessTimeTrackingPolicy_STATUS(source.LastAccessTimeTrackingPolicy) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_LastAccessTimeTrackingPolicy_STATUS() to populate field LastAccessTimeTrackingPolicy") - } - service.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy - } else { - service.LastAccessTimeTrackingPolicy = nil - } - - // RestorePolicy - if source.RestorePolicy != nil { - var restorePolicy RestorePolicyProperties - err := restorePolicy.Initialize_From_RestorePolicyProperties_STATUS(source.RestorePolicy) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_RestorePolicyProperties_STATUS() to populate field RestorePolicy") - } - service.RestorePolicy = &restorePolicy - } else { - service.RestorePolicy = nil - } - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (service *StorageAccounts_BlobService_Spec) OriginalVersion() string { return GroupVersion.Version @@ -1580,29 +1485,6 @@ func (feed *ChangeFeed) AssignProperties_To_ChangeFeed(destination *v20220901s.C return nil } -// Initialize_From_ChangeFeed_STATUS populates our ChangeFeed from the provided source ChangeFeed_STATUS -func (feed *ChangeFeed) Initialize_From_ChangeFeed_STATUS(source *ChangeFeed_STATUS) error { - - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - feed.Enabled = &enabled - } else { - feed.Enabled = nil - } - - // RetentionInDays - if source.RetentionInDays != nil { - retentionInDay := *source.RetentionInDays - feed.RetentionInDays = &retentionInDay - } else { - feed.RetentionInDays = nil - } - - // No error - return nil -} - // The blob service properties for change feed events. type ChangeFeed_STATUS struct { // Enabled: Indicates whether change feed event logging is enabled for the Blob service. @@ -1799,31 +1681,6 @@ func (rules *CorsRules) AssignProperties_To_CorsRules(destination *v20220901s.Co return nil } -// Initialize_From_CorsRules_STATUS populates our CorsRules from the provided source CorsRules_STATUS -func (rules *CorsRules) Initialize_From_CorsRules_STATUS(source *CorsRules_STATUS) error { - - // CorsRules - if source.CorsRules != nil { - corsRuleList := make([]CorsRule, len(source.CorsRules)) - for corsRuleIndex, corsRuleItem := range source.CorsRules { - // Shadow the loop variable to avoid aliasing - corsRuleItem := corsRuleItem - var corsRule CorsRule - err := corsRule.Initialize_From_CorsRule_STATUS(&corsRuleItem) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_CorsRule_STATUS() to populate field CorsRules") - } - corsRuleList[corsRuleIndex] = corsRule - } - rules.CorsRules = corsRuleList - } else { - rules.CorsRules = nil - } - - // No error - return nil -} - // Sets the CORS rules. You can include up to five CorsRule elements in the request. type CorsRules_STATUS struct { // CorsRules: The List of CORS rules. You can include up to five CorsRule elements in the request. @@ -2068,37 +1925,6 @@ func (policy *DeleteRetentionPolicy) AssignProperties_To_DeleteRetentionPolicy(d return nil } -// Initialize_From_DeleteRetentionPolicy_STATUS populates our DeleteRetentionPolicy from the provided source DeleteRetentionPolicy_STATUS -func (policy *DeleteRetentionPolicy) Initialize_From_DeleteRetentionPolicy_STATUS(source *DeleteRetentionPolicy_STATUS) error { - - // AllowPermanentDelete - if source.AllowPermanentDelete != nil { - allowPermanentDelete := *source.AllowPermanentDelete - policy.AllowPermanentDelete = &allowPermanentDelete - } else { - policy.AllowPermanentDelete = nil - } - - // Days - if source.Days != nil { - day := *source.Days - policy.Days = &day - } else { - policy.Days = nil - } - - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - policy.Enabled = &enabled - } else { - policy.Enabled = nil - } - - // No error - return nil -} - // The service properties for soft delete. type DeleteRetentionPolicy_STATUS struct { // AllowPermanentDelete: This property when set to true allows deletion of the soft deleted blob versions and snapshots. @@ -2369,35 +2195,6 @@ func (policy *LastAccessTimeTrackingPolicy) AssignProperties_To_LastAccessTimeTr return nil } -// Initialize_From_LastAccessTimeTrackingPolicy_STATUS populates our LastAccessTimeTrackingPolicy from the provided source LastAccessTimeTrackingPolicy_STATUS -func (policy *LastAccessTimeTrackingPolicy) Initialize_From_LastAccessTimeTrackingPolicy_STATUS(source *LastAccessTimeTrackingPolicy_STATUS) error { - - // BlobType - policy.BlobType = genruntime.CloneSliceOfString(source.BlobType) - - // Enable - if source.Enable != nil { - enable := *source.Enable - policy.Enable = &enable - } else { - policy.Enable = nil - } - - // Name - if source.Name != nil { - name := LastAccessTimeTrackingPolicy_Name(*source.Name) - policy.Name = &name - } else { - policy.Name = nil - } - - // TrackingGranularityInDays - policy.TrackingGranularityInDays = genruntime.ClonePointerToInt(source.TrackingGranularityInDays) - - // No error - return nil -} - // The blob service properties for Last access time based tracking policy. type LastAccessTimeTrackingPolicy_STATUS struct { // BlobType: An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently @@ -2641,29 +2438,6 @@ func (properties *RestorePolicyProperties) AssignProperties_To_RestorePolicyProp return nil } -// Initialize_From_RestorePolicyProperties_STATUS populates our RestorePolicyProperties from the provided source RestorePolicyProperties_STATUS -func (properties *RestorePolicyProperties) Initialize_From_RestorePolicyProperties_STATUS(source *RestorePolicyProperties_STATUS) error { - - // Days - if source.Days != nil { - day := *source.Days - properties.Days = &day - } else { - properties.Days = nil - } - - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - properties.Enabled = &enabled - } else { - properties.Enabled = nil - } - - // No error - return nil -} - // The blob service properties for blob restore policy type RestorePolicyProperties_STATUS struct { // Days: how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. @@ -2957,39 +2731,6 @@ func (rule *CorsRule) AssignProperties_To_CorsRule(destination *v20220901s.CorsR return nil } -// Initialize_From_CorsRule_STATUS populates our CorsRule from the provided source CorsRule_STATUS -func (rule *CorsRule) Initialize_From_CorsRule_STATUS(source *CorsRule_STATUS) error { - - // AllowedHeaders - rule.AllowedHeaders = genruntime.CloneSliceOfString(source.AllowedHeaders) - - // AllowedMethods - if source.AllowedMethods != nil { - allowedMethodList := make([]CorsRule_AllowedMethods, len(source.AllowedMethods)) - for allowedMethodIndex, allowedMethodItem := range source.AllowedMethods { - // Shadow the loop variable to avoid aliasing - allowedMethodItem := allowedMethodItem - allowedMethod := CorsRule_AllowedMethods(allowedMethodItem) - allowedMethodList[allowedMethodIndex] = allowedMethod - } - rule.AllowedMethods = allowedMethodList - } else { - rule.AllowedMethods = nil - } - - // AllowedOrigins - rule.AllowedOrigins = genruntime.CloneSliceOfString(source.AllowedOrigins) - - // ExposedHeaders - rule.ExposedHeaders = genruntime.CloneSliceOfString(source.ExposedHeaders) - - // MaxAgeInSeconds - rule.MaxAgeInSeconds = genruntime.ClonePointerToInt(source.MaxAgeInSeconds) - - // No error - return nil -} - // Specifies a CORS rule for the Blob service. type CorsRule_STATUS struct { // AllowedHeaders: Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin diff --git a/v2/api/storage/v1api20220901/storage_accounts_blob_service_types_gen_test.go b/v2/api/storage/v1api20220901/storage_accounts_blob_service_types_gen_test.go index 2b180127047..1d69f8c8a6d 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_blob_service_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage_accounts_blob_service_types_gen_test.go @@ -6,6 +6,7 @@ package v1api20220901 import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsBlobService(subject StorageAccou copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsBlobService + var hub v20230101s.StorageAccountsBlobService err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20220901/storage_accounts_blob_services_container_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_blob_services_container_types_gen.go index c16ea557ab8..59a3e7fc00c 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_blob_services_container_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_blob_services_container_types_gen.go @@ -49,22 +49,36 @@ var _ conversion.Convertible = &StorageAccountsBlobServicesContainer{} // ConvertFrom populates our StorageAccountsBlobServicesContainer from the provided hub StorageAccountsBlobServicesContainer func (container *StorageAccountsBlobServicesContainer) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsBlobServicesContainer) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsBlobServicesContainer but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsBlobServicesContainer + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = container.AssignProperties_From_StorageAccountsBlobServicesContainer(&source) + if err != nil { + return errors.Wrap(err, "converting from source to container") } - return container.AssignProperties_From_StorageAccountsBlobServicesContainer(source) + return nil } // ConvertTo populates the provided hub StorageAccountsBlobServicesContainer from our StorageAccountsBlobServicesContainer func (container *StorageAccountsBlobServicesContainer) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsBlobServicesContainer) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsBlobServicesContainer but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsBlobServicesContainer + err := container.AssignProperties_To_StorageAccountsBlobServicesContainer(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from container") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return container.AssignProperties_To_StorageAccountsBlobServicesContainer(destination) + return nil } // +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20220901-storageaccountsblobservicescontainer,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsblobservicescontainers,verbs=create;update,versions=v1api20220901,name=default.v1api20220901.storageaccountsblobservicescontainers.storage.azure.com,admissionReviewVersions=v1 @@ -90,17 +104,6 @@ func (container *StorageAccountsBlobServicesContainer) defaultAzureName() { // defaultImpl applies the code generated defaults to the StorageAccountsBlobServicesContainer resource func (container *StorageAccountsBlobServicesContainer) defaultImpl() { container.defaultAzureName() } -var _ genruntime.ImportableResource = &StorageAccountsBlobServicesContainer{} - -// InitializeSpec initializes the spec for this resource from the given status -func (container *StorageAccountsBlobServicesContainer) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*StorageAccounts_BlobServices_Container_STATUS); ok { - return container.Spec.Initialize_From_StorageAccounts_BlobServices_Container_STATUS(s) - } - - return fmt.Errorf("expected Status of type StorageAccounts_BlobServices_Container_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesResource = &StorageAccountsBlobServicesContainer{} // AzureName returns the Azure name of the resource @@ -712,63 +715,6 @@ func (container *StorageAccounts_BlobServices_Container_Spec) AssignProperties_T return nil } -// Initialize_From_StorageAccounts_BlobServices_Container_STATUS populates our StorageAccounts_BlobServices_Container_Spec from the provided source StorageAccounts_BlobServices_Container_STATUS -func (container *StorageAccounts_BlobServices_Container_Spec) Initialize_From_StorageAccounts_BlobServices_Container_STATUS(source *StorageAccounts_BlobServices_Container_STATUS) error { - - // DefaultEncryptionScope - container.DefaultEncryptionScope = genruntime.ClonePointerToString(source.DefaultEncryptionScope) - - // DenyEncryptionScopeOverride - if source.DenyEncryptionScopeOverride != nil { - denyEncryptionScopeOverride := *source.DenyEncryptionScopeOverride - container.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride - } else { - container.DenyEncryptionScopeOverride = nil - } - - // EnableNfsV3AllSquash - if source.EnableNfsV3AllSquash != nil { - enableNfsV3AllSquash := *source.EnableNfsV3AllSquash - container.EnableNfsV3AllSquash = &enableNfsV3AllSquash - } else { - container.EnableNfsV3AllSquash = nil - } - - // EnableNfsV3RootSquash - if source.EnableNfsV3RootSquash != nil { - enableNfsV3RootSquash := *source.EnableNfsV3RootSquash - container.EnableNfsV3RootSquash = &enableNfsV3RootSquash - } else { - container.EnableNfsV3RootSquash = nil - } - - // ImmutableStorageWithVersioning - if source.ImmutableStorageWithVersioning != nil { - var immutableStorageWithVersioning ImmutableStorageWithVersioning - err := immutableStorageWithVersioning.Initialize_From_ImmutableStorageWithVersioning_STATUS(source.ImmutableStorageWithVersioning) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ImmutableStorageWithVersioning_STATUS() to populate field ImmutableStorageWithVersioning") - } - container.ImmutableStorageWithVersioning = &immutableStorageWithVersioning - } else { - container.ImmutableStorageWithVersioning = nil - } - - // Metadata - container.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) - - // PublicAccess - if source.PublicAccess != nil { - publicAccess := ContainerProperties_PublicAccess(*source.PublicAccess) - container.PublicAccess = &publicAccess - } else { - container.PublicAccess = nil - } - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (container *StorageAccounts_BlobServices_Container_Spec) OriginalVersion() string { return GroupVersion.Version @@ -1806,21 +1752,6 @@ func (versioning *ImmutableStorageWithVersioning) AssignProperties_To_ImmutableS return nil } -// Initialize_From_ImmutableStorageWithVersioning_STATUS populates our ImmutableStorageWithVersioning from the provided source ImmutableStorageWithVersioning_STATUS -func (versioning *ImmutableStorageWithVersioning) Initialize_From_ImmutableStorageWithVersioning_STATUS(source *ImmutableStorageWithVersioning_STATUS) error { - - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - versioning.Enabled = &enabled - } else { - versioning.Enabled = nil - } - - // No error - return nil -} - // Object level immutability properties of the container. type ImmutableStorageWithVersioning_STATUS struct { // Enabled: This is an immutable property, when set to true it enables object level immutability at the container level. diff --git a/v2/api/storage/v1api20220901/storage_accounts_blob_services_container_types_gen_test.go b/v2/api/storage/v1api20220901/storage_accounts_blob_services_container_types_gen_test.go index 8285b37c673..acaa0142fb1 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_blob_services_container_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage_accounts_blob_services_container_types_gen_test.go @@ -6,6 +6,7 @@ package v1api20220901 import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsBlobServicesContainer(subject St copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsBlobServicesContainer + var hub v20230101s.StorageAccountsBlobServicesContainer err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20220901/storage_accounts_file_service_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_file_service_types_gen.go index 8c5aaa9541b..1401bc475c5 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_file_service_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_file_service_types_gen.go @@ -49,22 +49,36 @@ var _ conversion.Convertible = &StorageAccountsFileService{} // ConvertFrom populates our StorageAccountsFileService from the provided hub StorageAccountsFileService func (service *StorageAccountsFileService) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsFileService) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsFileService but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsFileService + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") } - return service.AssignProperties_From_StorageAccountsFileService(source) + err = service.AssignProperties_From_StorageAccountsFileService(&source) + if err != nil { + return errors.Wrap(err, "converting from source to service") + } + + return nil } // ConvertTo populates the provided hub StorageAccountsFileService from our StorageAccountsFileService func (service *StorageAccountsFileService) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsFileService) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsFileService but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsFileService + err := service.AssignProperties_To_StorageAccountsFileService(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from service") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return service.AssignProperties_To_StorageAccountsFileService(destination) + return nil } // +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20220901-storageaccountsfileservice,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsfileservices,verbs=create;update,versions=v1api20220901,name=default.v1api20220901.storageaccountsfileservices.storage.azure.com,admissionReviewVersions=v1 @@ -83,17 +97,6 @@ func (service *StorageAccountsFileService) Default() { // defaultImpl applies the code generated defaults to the StorageAccountsFileService resource func (service *StorageAccountsFileService) defaultImpl() {} -var _ genruntime.ImportableResource = &StorageAccountsFileService{} - -// InitializeSpec initializes the spec for this resource from the given status -func (service *StorageAccountsFileService) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*StorageAccounts_FileService_STATUS); ok { - return service.Spec.Initialize_From_StorageAccounts_FileService_STATUS(s) - } - - return fmt.Errorf("expected Status of type StorageAccounts_FileService_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesResource = &StorageAccountsFileService{} // AzureName returns the Azure name of the resource (always "default") @@ -608,49 +611,6 @@ func (service *StorageAccounts_FileService_Spec) AssignProperties_To_StorageAcco return nil } -// Initialize_From_StorageAccounts_FileService_STATUS populates our StorageAccounts_FileService_Spec from the provided source StorageAccounts_FileService_STATUS -func (service *StorageAccounts_FileService_Spec) Initialize_From_StorageAccounts_FileService_STATUS(source *StorageAccounts_FileService_STATUS) error { - - // Cors - if source.Cors != nil { - var cor CorsRules - err := cor.Initialize_From_CorsRules_STATUS(source.Cors) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_CorsRules_STATUS() to populate field Cors") - } - service.Cors = &cor - } else { - service.Cors = nil - } - - // ProtocolSettings - if source.ProtocolSettings != nil { - var protocolSetting ProtocolSettings - err := protocolSetting.Initialize_From_ProtocolSettings_STATUS(source.ProtocolSettings) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ProtocolSettings_STATUS() to populate field ProtocolSettings") - } - service.ProtocolSettings = &protocolSetting - } else { - service.ProtocolSettings = nil - } - - // ShareDeleteRetentionPolicy - if source.ShareDeleteRetentionPolicy != nil { - var shareDeleteRetentionPolicy DeleteRetentionPolicy - err := shareDeleteRetentionPolicy.Initialize_From_DeleteRetentionPolicy_STATUS(source.ShareDeleteRetentionPolicy) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DeleteRetentionPolicy_STATUS() to populate field ShareDeleteRetentionPolicy") - } - service.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy - } else { - service.ShareDeleteRetentionPolicy = nil - } - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (service *StorageAccounts_FileService_Spec) OriginalVersion() string { return GroupVersion.Version @@ -1070,25 +1030,6 @@ func (settings *ProtocolSettings) AssignProperties_To_ProtocolSettings(destinati return nil } -// Initialize_From_ProtocolSettings_STATUS populates our ProtocolSettings from the provided source ProtocolSettings_STATUS -func (settings *ProtocolSettings) Initialize_From_ProtocolSettings_STATUS(source *ProtocolSettings_STATUS) error { - - // Smb - if source.Smb != nil { - var smb SmbSetting - err := smb.Initialize_From_SmbSetting_STATUS(source.Smb) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_SmbSetting_STATUS() to populate field Smb") - } - settings.Smb = &smb - } else { - settings.Smb = nil - } - - // No error - return nil -} - // Protocol settings for file service type ProtocolSettings_STATUS struct { // Smb: Setting for SMB protocol @@ -1360,37 +1301,6 @@ func (setting *SmbSetting) AssignProperties_To_SmbSetting(destination *v20220901 return nil } -// Initialize_From_SmbSetting_STATUS populates our SmbSetting from the provided source SmbSetting_STATUS -func (setting *SmbSetting) Initialize_From_SmbSetting_STATUS(source *SmbSetting_STATUS) error { - - // AuthenticationMethods - setting.AuthenticationMethods = genruntime.ClonePointerToString(source.AuthenticationMethods) - - // ChannelEncryption - setting.ChannelEncryption = genruntime.ClonePointerToString(source.ChannelEncryption) - - // KerberosTicketEncryption - setting.KerberosTicketEncryption = genruntime.ClonePointerToString(source.KerberosTicketEncryption) - - // Multichannel - if source.Multichannel != nil { - var multichannel Multichannel - err := multichannel.Initialize_From_Multichannel_STATUS(source.Multichannel) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_Multichannel_STATUS() to populate field Multichannel") - } - setting.Multichannel = &multichannel - } else { - setting.Multichannel = nil - } - - // Versions - setting.Versions = genruntime.ClonePointerToString(source.Versions) - - // No error - return nil -} - // Setting for SMB protocol type SmbSetting_STATUS struct { // AuthenticationMethods: SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos. Should be @@ -1621,21 +1531,6 @@ func (multichannel *Multichannel) AssignProperties_To_Multichannel(destination * return nil } -// Initialize_From_Multichannel_STATUS populates our Multichannel from the provided source Multichannel_STATUS -func (multichannel *Multichannel) Initialize_From_Multichannel_STATUS(source *Multichannel_STATUS) error { - - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - multichannel.Enabled = &enabled - } else { - multichannel.Enabled = nil - } - - // No error - return nil -} - // Multichannel setting. Applies to Premium FileStorage only. type Multichannel_STATUS struct { // Enabled: Indicates whether multichannel is enabled diff --git a/v2/api/storage/v1api20220901/storage_accounts_file_service_types_gen_test.go b/v2/api/storage/v1api20220901/storage_accounts_file_service_types_gen_test.go index a1a38912b13..fd77ca50a13 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_file_service_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage_accounts_file_service_types_gen_test.go @@ -6,6 +6,7 @@ package v1api20220901 import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsFileService(subject StorageAccou copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsFileService + var hub v20230101s.StorageAccountsFileService err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20220901/storage_accounts_file_services_share_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_file_services_share_types_gen.go index 59a9e726162..97f5ca4f723 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_file_services_share_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_file_services_share_types_gen.go @@ -49,22 +49,36 @@ var _ conversion.Convertible = &StorageAccountsFileServicesShare{} // ConvertFrom populates our StorageAccountsFileServicesShare from the provided hub StorageAccountsFileServicesShare func (share *StorageAccountsFileServicesShare) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsFileServicesShare) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsFileServicesShare but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsFileServicesShare + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") } - return share.AssignProperties_From_StorageAccountsFileServicesShare(source) + err = share.AssignProperties_From_StorageAccountsFileServicesShare(&source) + if err != nil { + return errors.Wrap(err, "converting from source to share") + } + + return nil } // ConvertTo populates the provided hub StorageAccountsFileServicesShare from our StorageAccountsFileServicesShare func (share *StorageAccountsFileServicesShare) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsFileServicesShare) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsFileServicesShare but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsFileServicesShare + err := share.AssignProperties_To_StorageAccountsFileServicesShare(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from share") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return share.AssignProperties_To_StorageAccountsFileServicesShare(destination) + return nil } // +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20220901-storageaccountsfileservicesshare,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsfileservicesshares,verbs=create;update,versions=v1api20220901,name=default.v1api20220901.storageaccountsfileservicesshares.storage.azure.com,admissionReviewVersions=v1 @@ -90,17 +104,6 @@ func (share *StorageAccountsFileServicesShare) defaultAzureName() { // defaultImpl applies the code generated defaults to the StorageAccountsFileServicesShare resource func (share *StorageAccountsFileServicesShare) defaultImpl() { share.defaultAzureName() } -var _ genruntime.ImportableResource = &StorageAccountsFileServicesShare{} - -// InitializeSpec initializes the spec for this resource from the given status -func (share *StorageAccountsFileServicesShare) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*StorageAccounts_FileServices_Share_STATUS); ok { - return share.Spec.Initialize_From_StorageAccounts_FileServices_Share_STATUS(s) - } - - return fmt.Errorf("expected Status of type StorageAccounts_FileServices_Share_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesResource = &StorageAccountsFileServicesShare{} // AzureName returns the Azure name of the resource @@ -703,66 +706,6 @@ func (share *StorageAccounts_FileServices_Share_Spec) AssignProperties_To_Storag return nil } -// Initialize_From_StorageAccounts_FileServices_Share_STATUS populates our StorageAccounts_FileServices_Share_Spec from the provided source StorageAccounts_FileServices_Share_STATUS -func (share *StorageAccounts_FileServices_Share_Spec) Initialize_From_StorageAccounts_FileServices_Share_STATUS(source *StorageAccounts_FileServices_Share_STATUS) error { - - // AccessTier - if source.AccessTier != nil { - accessTier := FileShareProperties_AccessTier(*source.AccessTier) - share.AccessTier = &accessTier - } else { - share.AccessTier = nil - } - - // EnabledProtocols - if source.EnabledProtocols != nil { - enabledProtocol := FileShareProperties_EnabledProtocols(*source.EnabledProtocols) - share.EnabledProtocols = &enabledProtocol - } else { - share.EnabledProtocols = nil - } - - // Metadata - share.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) - - // RootSquash - if source.RootSquash != nil { - rootSquash := FileShareProperties_RootSquash(*source.RootSquash) - share.RootSquash = &rootSquash - } else { - share.RootSquash = nil - } - - // ShareQuota - if source.ShareQuota != nil { - shareQuota := *source.ShareQuota - share.ShareQuota = &shareQuota - } else { - share.ShareQuota = nil - } - - // SignedIdentifiers - if source.SignedIdentifiers != nil { - signedIdentifierList := make([]SignedIdentifier, len(source.SignedIdentifiers)) - for signedIdentifierIndex, signedIdentifierItem := range source.SignedIdentifiers { - // Shadow the loop variable to avoid aliasing - signedIdentifierItem := signedIdentifierItem - var signedIdentifier SignedIdentifier - err := signedIdentifier.Initialize_From_SignedIdentifier_STATUS(&signedIdentifierItem) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_SignedIdentifier_STATUS() to populate field SignedIdentifiers") - } - signedIdentifierList[signedIdentifierIndex] = signedIdentifier - } - share.SignedIdentifiers = signedIdentifierList - } else { - share.SignedIdentifiers = nil - } - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (share *StorageAccounts_FileServices_Share_Spec) OriginalVersion() string { return GroupVersion.Version @@ -1578,33 +1521,6 @@ func (identifier *SignedIdentifier) AssignProperties_To_SignedIdentifier(destina return nil } -// Initialize_From_SignedIdentifier_STATUS populates our SignedIdentifier from the provided source SignedIdentifier_STATUS -func (identifier *SignedIdentifier) Initialize_From_SignedIdentifier_STATUS(source *SignedIdentifier_STATUS) error { - - // AccessPolicy - if source.AccessPolicy != nil { - var accessPolicy AccessPolicy - err := accessPolicy.Initialize_From_AccessPolicy_STATUS(source.AccessPolicy) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_AccessPolicy_STATUS() to populate field AccessPolicy") - } - identifier.AccessPolicy = &accessPolicy - } else { - identifier.AccessPolicy = nil - } - - // Reference - if source.Id != nil { - reference := genruntime.CreateResourceReferenceFromARMID(*source.Id) - identifier.Reference = &reference - } else { - identifier.Reference = nil - } - - // No error - return nil -} - type SignedIdentifier_STATUS struct { // AccessPolicy: Access policy AccessPolicy *AccessPolicy_STATUS `json:"accessPolicy,omitempty"` @@ -1816,22 +1732,6 @@ func (policy *AccessPolicy) AssignProperties_To_AccessPolicy(destination *v20220 return nil } -// Initialize_From_AccessPolicy_STATUS populates our AccessPolicy from the provided source AccessPolicy_STATUS -func (policy *AccessPolicy) Initialize_From_AccessPolicy_STATUS(source *AccessPolicy_STATUS) error { - - // ExpiryTime - policy.ExpiryTime = genruntime.ClonePointerToString(source.ExpiryTime) - - // Permission - policy.Permission = genruntime.ClonePointerToString(source.Permission) - - // StartTime - policy.StartTime = genruntime.ClonePointerToString(source.StartTime) - - // No error - return nil -} - type AccessPolicy_STATUS struct { // ExpiryTime: Expiry time of the access policy ExpiryTime *string `json:"expiryTime,omitempty"` diff --git a/v2/api/storage/v1api20220901/storage_accounts_file_services_share_types_gen_test.go b/v2/api/storage/v1api20220901/storage_accounts_file_services_share_types_gen_test.go index 41cdf03c981..919a8df185f 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_file_services_share_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage_accounts_file_services_share_types_gen_test.go @@ -6,6 +6,7 @@ package v1api20220901 import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsFileServicesShare(subject Storag copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsFileServicesShare + var hub v20230101s.StorageAccountsFileServicesShare err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20220901/storage_accounts_management_policy_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_management_policy_types_gen.go index 21cd636f5c3..888157c94ee 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_management_policy_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_management_policy_types_gen.go @@ -49,22 +49,36 @@ var _ conversion.Convertible = &StorageAccountsManagementPolicy{} // ConvertFrom populates our StorageAccountsManagementPolicy from the provided hub StorageAccountsManagementPolicy func (policy *StorageAccountsManagementPolicy) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsManagementPolicy) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsManagementPolicy but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsManagementPolicy + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") } - return policy.AssignProperties_From_StorageAccountsManagementPolicy(source) + err = policy.AssignProperties_From_StorageAccountsManagementPolicy(&source) + if err != nil { + return errors.Wrap(err, "converting from source to policy") + } + + return nil } // ConvertTo populates the provided hub StorageAccountsManagementPolicy from our StorageAccountsManagementPolicy func (policy *StorageAccountsManagementPolicy) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsManagementPolicy) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsManagementPolicy but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsManagementPolicy + err := policy.AssignProperties_To_StorageAccountsManagementPolicy(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from policy") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return policy.AssignProperties_To_StorageAccountsManagementPolicy(destination) + return nil } // +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20220901-storageaccountsmanagementpolicy,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsmanagementpolicies,verbs=create;update,versions=v1api20220901,name=default.v1api20220901.storageaccountsmanagementpolicies.storage.azure.com,admissionReviewVersions=v1 @@ -83,17 +97,6 @@ func (policy *StorageAccountsManagementPolicy) Default() { // defaultImpl applies the code generated defaults to the StorageAccountsManagementPolicy resource func (policy *StorageAccountsManagementPolicy) defaultImpl() {} -var _ genruntime.ImportableResource = &StorageAccountsManagementPolicy{} - -// InitializeSpec initializes the spec for this resource from the given status -func (policy *StorageAccountsManagementPolicy) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*StorageAccounts_ManagementPolicy_STATUS); ok { - return policy.Spec.Initialize_From_StorageAccounts_ManagementPolicy_STATUS(s) - } - - return fmt.Errorf("expected Status of type StorageAccounts_ManagementPolicy_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesResource = &StorageAccountsManagementPolicy{} // AzureName returns the Azure name of the resource (always "default") @@ -509,25 +512,6 @@ func (policy *StorageAccounts_ManagementPolicy_Spec) AssignProperties_To_Storage return nil } -// Initialize_From_StorageAccounts_ManagementPolicy_STATUS populates our StorageAccounts_ManagementPolicy_Spec from the provided source StorageAccounts_ManagementPolicy_STATUS -func (policy *StorageAccounts_ManagementPolicy_Spec) Initialize_From_StorageAccounts_ManagementPolicy_STATUS(source *StorageAccounts_ManagementPolicy_STATUS) error { - - // Policy - if source.Policy != nil { - var policyLocal ManagementPolicySchema - err := policyLocal.Initialize_From_ManagementPolicySchema_STATUS(source.Policy) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ManagementPolicySchema_STATUS() to populate field Policy") - } - policy.Policy = &policyLocal - } else { - policy.Policy = nil - } - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (policy *StorageAccounts_ManagementPolicy_Spec) OriginalVersion() string { return GroupVersion.Version @@ -857,31 +841,6 @@ func (schema *ManagementPolicySchema) AssignProperties_To_ManagementPolicySchema return nil } -// Initialize_From_ManagementPolicySchema_STATUS populates our ManagementPolicySchema from the provided source ManagementPolicySchema_STATUS -func (schema *ManagementPolicySchema) Initialize_From_ManagementPolicySchema_STATUS(source *ManagementPolicySchema_STATUS) error { - - // Rules - if source.Rules != nil { - ruleList := make([]ManagementPolicyRule, len(source.Rules)) - for ruleIndex, ruleItem := range source.Rules { - // Shadow the loop variable to avoid aliasing - ruleItem := ruleItem - var rule ManagementPolicyRule - err := rule.Initialize_From_ManagementPolicyRule_STATUS(&ruleItem) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ManagementPolicyRule_STATUS() to populate field Rules") - } - ruleList[ruleIndex] = rule - } - schema.Rules = ruleList - } else { - schema.Rules = nil - } - - // No error - return nil -} - // The Storage Account ManagementPolicies Rules. See more details in: // https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. type ManagementPolicySchema_STATUS struct { @@ -1165,44 +1124,6 @@ func (rule *ManagementPolicyRule) AssignProperties_To_ManagementPolicyRule(desti return nil } -// Initialize_From_ManagementPolicyRule_STATUS populates our ManagementPolicyRule from the provided source ManagementPolicyRule_STATUS -func (rule *ManagementPolicyRule) Initialize_From_ManagementPolicyRule_STATUS(source *ManagementPolicyRule_STATUS) error { - - // Definition - if source.Definition != nil { - var definition ManagementPolicyDefinition - err := definition.Initialize_From_ManagementPolicyDefinition_STATUS(source.Definition) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ManagementPolicyDefinition_STATUS() to populate field Definition") - } - rule.Definition = &definition - } else { - rule.Definition = nil - } - - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - rule.Enabled = &enabled - } else { - rule.Enabled = nil - } - - // Name - rule.Name = genruntime.ClonePointerToString(source.Name) - - // Type - if source.Type != nil { - typeVar := ManagementPolicyRule_Type(*source.Type) - rule.Type = &typeVar - } else { - rule.Type = nil - } - - // No error - return nil -} - // An object that wraps the Lifecycle rule. Each rule is uniquely defined by name. type ManagementPolicyRule_STATUS struct { // Definition: An object that defines the Lifecycle rule. @@ -1501,37 +1422,6 @@ func (definition *ManagementPolicyDefinition) AssignProperties_To_ManagementPoli return nil } -// Initialize_From_ManagementPolicyDefinition_STATUS populates our ManagementPolicyDefinition from the provided source ManagementPolicyDefinition_STATUS -func (definition *ManagementPolicyDefinition) Initialize_From_ManagementPolicyDefinition_STATUS(source *ManagementPolicyDefinition_STATUS) error { - - // Actions - if source.Actions != nil { - var action ManagementPolicyAction - err := action.Initialize_From_ManagementPolicyAction_STATUS(source.Actions) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ManagementPolicyAction_STATUS() to populate field Actions") - } - definition.Actions = &action - } else { - definition.Actions = nil - } - - // Filters - if source.Filters != nil { - var filter ManagementPolicyFilter - err := filter.Initialize_From_ManagementPolicyFilter_STATUS(source.Filters) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ManagementPolicyFilter_STATUS() to populate field Filters") - } - definition.Filters = &filter - } else { - definition.Filters = nil - } - - // No error - return nil -} - // An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set. type ManagementPolicyDefinition_STATUS struct { // Actions: An object that defines the action set. @@ -1858,49 +1748,6 @@ func (action *ManagementPolicyAction) AssignProperties_To_ManagementPolicyAction return nil } -// Initialize_From_ManagementPolicyAction_STATUS populates our ManagementPolicyAction from the provided source ManagementPolicyAction_STATUS -func (action *ManagementPolicyAction) Initialize_From_ManagementPolicyAction_STATUS(source *ManagementPolicyAction_STATUS) error { - - // BaseBlob - if source.BaseBlob != nil { - var baseBlob ManagementPolicyBaseBlob - err := baseBlob.Initialize_From_ManagementPolicyBaseBlob_STATUS(source.BaseBlob) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ManagementPolicyBaseBlob_STATUS() to populate field BaseBlob") - } - action.BaseBlob = &baseBlob - } else { - action.BaseBlob = nil - } - - // Snapshot - if source.Snapshot != nil { - var snapshot ManagementPolicySnapShot - err := snapshot.Initialize_From_ManagementPolicySnapShot_STATUS(source.Snapshot) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ManagementPolicySnapShot_STATUS() to populate field Snapshot") - } - action.Snapshot = &snapshot - } else { - action.Snapshot = nil - } - - // Version - if source.Version != nil { - var version ManagementPolicyVersion - err := version.Initialize_From_ManagementPolicyVersion_STATUS(source.Version) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_ManagementPolicyVersion_STATUS() to populate field Version") - } - action.Version = &version - } else { - action.Version = nil - } - - // No error - return nil -} - // Actions are applied to the filtered blobs when the execution condition is met. type ManagementPolicyAction_STATUS struct { // BaseBlob: The management policy action for base blob @@ -2211,37 +2058,6 @@ func (filter *ManagementPolicyFilter) AssignProperties_To_ManagementPolicyFilter return nil } -// Initialize_From_ManagementPolicyFilter_STATUS populates our ManagementPolicyFilter from the provided source ManagementPolicyFilter_STATUS -func (filter *ManagementPolicyFilter) Initialize_From_ManagementPolicyFilter_STATUS(source *ManagementPolicyFilter_STATUS) error { - - // BlobIndexMatch - if source.BlobIndexMatch != nil { - blobIndexMatchList := make([]TagFilter, len(source.BlobIndexMatch)) - for blobIndexMatchIndex, blobIndexMatchItem := range source.BlobIndexMatch { - // Shadow the loop variable to avoid aliasing - blobIndexMatchItem := blobIndexMatchItem - var blobIndexMatch TagFilter - err := blobIndexMatch.Initialize_From_TagFilter_STATUS(&blobIndexMatchItem) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_TagFilter_STATUS() to populate field BlobIndexMatch") - } - blobIndexMatchList[blobIndexMatchIndex] = blobIndexMatch - } - filter.BlobIndexMatch = blobIndexMatchList - } else { - filter.BlobIndexMatch = nil - } - - // BlobTypes - filter.BlobTypes = genruntime.CloneSliceOfString(source.BlobTypes) - - // PrefixMatch - filter.PrefixMatch = genruntime.CloneSliceOfString(source.PrefixMatch) - - // No error - return nil -} - // Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical // AND is performed on all filters. type ManagementPolicyFilter_STATUS struct { @@ -2691,81 +2507,6 @@ func (blob *ManagementPolicyBaseBlob) AssignProperties_To_ManagementPolicyBaseBl return nil } -// Initialize_From_ManagementPolicyBaseBlob_STATUS populates our ManagementPolicyBaseBlob from the provided source ManagementPolicyBaseBlob_STATUS -func (blob *ManagementPolicyBaseBlob) Initialize_From_ManagementPolicyBaseBlob_STATUS(source *ManagementPolicyBaseBlob_STATUS) error { - - // Delete - if source.Delete != nil { - var delete DateAfterModification - err := delete.Initialize_From_DateAfterModification_STATUS(source.Delete) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterModification_STATUS() to populate field Delete") - } - blob.Delete = &delete - } else { - blob.Delete = nil - } - - // EnableAutoTierToHotFromCool - if source.EnableAutoTierToHotFromCool != nil { - enableAutoTierToHotFromCool := *source.EnableAutoTierToHotFromCool - blob.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool - } else { - blob.EnableAutoTierToHotFromCool = nil - } - - // TierToArchive - if source.TierToArchive != nil { - var tierToArchive DateAfterModification - err := tierToArchive.Initialize_From_DateAfterModification_STATUS(source.TierToArchive) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterModification_STATUS() to populate field TierToArchive") - } - blob.TierToArchive = &tierToArchive - } else { - blob.TierToArchive = nil - } - - // TierToCold - if source.TierToCold != nil { - var tierToCold DateAfterModification - err := tierToCold.Initialize_From_DateAfterModification_STATUS(source.TierToCold) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterModification_STATUS() to populate field TierToCold") - } - blob.TierToCold = &tierToCold - } else { - blob.TierToCold = nil - } - - // TierToCool - if source.TierToCool != nil { - var tierToCool DateAfterModification - err := tierToCool.Initialize_From_DateAfterModification_STATUS(source.TierToCool) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterModification_STATUS() to populate field TierToCool") - } - blob.TierToCool = &tierToCool - } else { - blob.TierToCool = nil - } - - // TierToHot - if source.TierToHot != nil { - var tierToHot DateAfterModification - err := tierToHot.Initialize_From_DateAfterModification_STATUS(source.TierToHot) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterModification_STATUS() to populate field TierToHot") - } - blob.TierToHot = &tierToHot - } else { - blob.TierToHot = nil - } - - // No error - return nil -} - // Management policy action for base blob. type ManagementPolicyBaseBlob_STATUS struct { // Delete: The function to delete the blob @@ -3321,73 +3062,6 @@ func (shot *ManagementPolicySnapShot) AssignProperties_To_ManagementPolicySnapSh return nil } -// Initialize_From_ManagementPolicySnapShot_STATUS populates our ManagementPolicySnapShot from the provided source ManagementPolicySnapShot_STATUS -func (shot *ManagementPolicySnapShot) Initialize_From_ManagementPolicySnapShot_STATUS(source *ManagementPolicySnapShot_STATUS) error { - - // Delete - if source.Delete != nil { - var delete DateAfterCreation - err := delete.Initialize_From_DateAfterCreation_STATUS(source.Delete) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field Delete") - } - shot.Delete = &delete - } else { - shot.Delete = nil - } - - // TierToArchive - if source.TierToArchive != nil { - var tierToArchive DateAfterCreation - err := tierToArchive.Initialize_From_DateAfterCreation_STATUS(source.TierToArchive) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToArchive") - } - shot.TierToArchive = &tierToArchive - } else { - shot.TierToArchive = nil - } - - // TierToCold - if source.TierToCold != nil { - var tierToCold DateAfterCreation - err := tierToCold.Initialize_From_DateAfterCreation_STATUS(source.TierToCold) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToCold") - } - shot.TierToCold = &tierToCold - } else { - shot.TierToCold = nil - } - - // TierToCool - if source.TierToCool != nil { - var tierToCool DateAfterCreation - err := tierToCool.Initialize_From_DateAfterCreation_STATUS(source.TierToCool) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToCool") - } - shot.TierToCool = &tierToCool - } else { - shot.TierToCool = nil - } - - // TierToHot - if source.TierToHot != nil { - var tierToHot DateAfterCreation - err := tierToHot.Initialize_From_DateAfterCreation_STATUS(source.TierToHot) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToHot") - } - shot.TierToHot = &tierToHot - } else { - shot.TierToHot = nil - } - - // No error - return nil -} - // Management policy action for snapshot. type ManagementPolicySnapShot_STATUS struct { // Delete: The function to delete the blob snapshot @@ -3917,73 +3591,6 @@ func (version *ManagementPolicyVersion) AssignProperties_To_ManagementPolicyVers return nil } -// Initialize_From_ManagementPolicyVersion_STATUS populates our ManagementPolicyVersion from the provided source ManagementPolicyVersion_STATUS -func (version *ManagementPolicyVersion) Initialize_From_ManagementPolicyVersion_STATUS(source *ManagementPolicyVersion_STATUS) error { - - // Delete - if source.Delete != nil { - var delete DateAfterCreation - err := delete.Initialize_From_DateAfterCreation_STATUS(source.Delete) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field Delete") - } - version.Delete = &delete - } else { - version.Delete = nil - } - - // TierToArchive - if source.TierToArchive != nil { - var tierToArchive DateAfterCreation - err := tierToArchive.Initialize_From_DateAfterCreation_STATUS(source.TierToArchive) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToArchive") - } - version.TierToArchive = &tierToArchive - } else { - version.TierToArchive = nil - } - - // TierToCold - if source.TierToCold != nil { - var tierToCold DateAfterCreation - err := tierToCold.Initialize_From_DateAfterCreation_STATUS(source.TierToCold) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToCold") - } - version.TierToCold = &tierToCold - } else { - version.TierToCold = nil - } - - // TierToCool - if source.TierToCool != nil { - var tierToCool DateAfterCreation - err := tierToCool.Initialize_From_DateAfterCreation_STATUS(source.TierToCool) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToCool") - } - version.TierToCool = &tierToCool - } else { - version.TierToCool = nil - } - - // TierToHot - if source.TierToHot != nil { - var tierToHot DateAfterCreation - err := tierToHot.Initialize_From_DateAfterCreation_STATUS(source.TierToHot) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToHot") - } - version.TierToHot = &tierToHot - } else { - version.TierToHot = nil - } - - // No error - return nil -} - // Management policy action for blob version. type ManagementPolicyVersion_STATUS struct { // Delete: The function to delete the blob version @@ -4363,32 +3970,6 @@ func (filter *TagFilter) AssignProperties_To_TagFilter(destination *v20220901s.T return nil } -// Initialize_From_TagFilter_STATUS populates our TagFilter from the provided source TagFilter_STATUS -func (filter *TagFilter) Initialize_From_TagFilter_STATUS(source *TagFilter_STATUS) error { - - // Name - if source.Name != nil { - name := *source.Name - filter.Name = &name - } else { - filter.Name = nil - } - - // Op - filter.Op = genruntime.ClonePointerToString(source.Op) - - // Value - if source.Value != nil { - value := *source.Value - filter.Value = &value - } else { - filter.Value = nil - } - - // No error - return nil -} - // Blob index tag based filtering for blob objects type TagFilter_STATUS struct { // Name: This is the filter tag name, it can have 1 - 128 characters @@ -4601,29 +4182,6 @@ func (creation *DateAfterCreation) AssignProperties_To_DateAfterCreation(destina return nil } -// Initialize_From_DateAfterCreation_STATUS populates our DateAfterCreation from the provided source DateAfterCreation_STATUS -func (creation *DateAfterCreation) Initialize_From_DateAfterCreation_STATUS(source *DateAfterCreation_STATUS) error { - - // DaysAfterCreationGreaterThan - if source.DaysAfterCreationGreaterThan != nil { - daysAfterCreationGreaterThan := genruntime.GetIntFromFloat(*source.DaysAfterCreationGreaterThan) - creation.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan - } else { - creation.DaysAfterCreationGreaterThan = nil - } - - // DaysAfterLastTierChangeGreaterThan - if source.DaysAfterLastTierChangeGreaterThan != nil { - daysAfterLastTierChangeGreaterThan := genruntime.GetIntFromFloat(*source.DaysAfterLastTierChangeGreaterThan) - creation.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan - } else { - creation.DaysAfterLastTierChangeGreaterThan = nil - } - - // No error - return nil -} - // Object to define snapshot and version action conditions. type DateAfterCreation_STATUS struct { // DaysAfterCreationGreaterThan: Value indicating the age in days after creation @@ -4912,45 +4470,6 @@ func (modification *DateAfterModification) AssignProperties_To_DateAfterModifica return nil } -// Initialize_From_DateAfterModification_STATUS populates our DateAfterModification from the provided source DateAfterModification_STATUS -func (modification *DateAfterModification) Initialize_From_DateAfterModification_STATUS(source *DateAfterModification_STATUS) error { - - // DaysAfterCreationGreaterThan - if source.DaysAfterCreationGreaterThan != nil { - daysAfterCreationGreaterThan := genruntime.GetIntFromFloat(*source.DaysAfterCreationGreaterThan) - modification.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan - } else { - modification.DaysAfterCreationGreaterThan = nil - } - - // DaysAfterLastAccessTimeGreaterThan - if source.DaysAfterLastAccessTimeGreaterThan != nil { - daysAfterLastAccessTimeGreaterThan := genruntime.GetIntFromFloat(*source.DaysAfterLastAccessTimeGreaterThan) - modification.DaysAfterLastAccessTimeGreaterThan = &daysAfterLastAccessTimeGreaterThan - } else { - modification.DaysAfterLastAccessTimeGreaterThan = nil - } - - // DaysAfterLastTierChangeGreaterThan - if source.DaysAfterLastTierChangeGreaterThan != nil { - daysAfterLastTierChangeGreaterThan := genruntime.GetIntFromFloat(*source.DaysAfterLastTierChangeGreaterThan) - modification.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan - } else { - modification.DaysAfterLastTierChangeGreaterThan = nil - } - - // DaysAfterModificationGreaterThan - if source.DaysAfterModificationGreaterThan != nil { - daysAfterModificationGreaterThan := genruntime.GetIntFromFloat(*source.DaysAfterModificationGreaterThan) - modification.DaysAfterModificationGreaterThan = &daysAfterModificationGreaterThan - } else { - modification.DaysAfterModificationGreaterThan = nil - } - - // No error - return nil -} - // Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, // daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The // daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires diff --git a/v2/api/storage/v1api20220901/storage_accounts_management_policy_types_gen_test.go b/v2/api/storage/v1api20220901/storage_accounts_management_policy_types_gen_test.go index d438587325b..027f4952c2e 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_management_policy_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage_accounts_management_policy_types_gen_test.go @@ -6,6 +6,7 @@ package v1api20220901 import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsManagementPolicy(subject Storage copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsManagementPolicy + var hub v20230101s.StorageAccountsManagementPolicy err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20220901/storage_accounts_queue_service_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_queue_service_types_gen.go index 5ed33babc82..f84fa46c1a6 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_queue_service_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_queue_service_types_gen.go @@ -49,22 +49,36 @@ var _ conversion.Convertible = &StorageAccountsQueueService{} // ConvertFrom populates our StorageAccountsQueueService from the provided hub StorageAccountsQueueService func (service *StorageAccountsQueueService) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsQueueService) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsQueueService but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsQueueService + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = service.AssignProperties_From_StorageAccountsQueueService(&source) + if err != nil { + return errors.Wrap(err, "converting from source to service") } - return service.AssignProperties_From_StorageAccountsQueueService(source) + return nil } // ConvertTo populates the provided hub StorageAccountsQueueService from our StorageAccountsQueueService func (service *StorageAccountsQueueService) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsQueueService) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsQueueService but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsQueueService + err := service.AssignProperties_To_StorageAccountsQueueService(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from service") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return service.AssignProperties_To_StorageAccountsQueueService(destination) + return nil } // +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20220901-storageaccountsqueueservice,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsqueueservices,verbs=create;update,versions=v1api20220901,name=default.v1api20220901.storageaccountsqueueservices.storage.azure.com,admissionReviewVersions=v1 @@ -83,17 +97,6 @@ func (service *StorageAccountsQueueService) Default() { // defaultImpl applies the code generated defaults to the StorageAccountsQueueService resource func (service *StorageAccountsQueueService) defaultImpl() {} -var _ genruntime.ImportableResource = &StorageAccountsQueueService{} - -// InitializeSpec initializes the spec for this resource from the given status -func (service *StorageAccountsQueueService) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*StorageAccounts_QueueService_STATUS); ok { - return service.Spec.Initialize_From_StorageAccounts_QueueService_STATUS(s) - } - - return fmt.Errorf("expected Status of type StorageAccounts_QueueService_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesResource = &StorageAccountsQueueService{} // AzureName returns the Azure name of the resource (always "default") @@ -508,25 +511,6 @@ func (service *StorageAccounts_QueueService_Spec) AssignProperties_To_StorageAcc return nil } -// Initialize_From_StorageAccounts_QueueService_STATUS populates our StorageAccounts_QueueService_Spec from the provided source StorageAccounts_QueueService_STATUS -func (service *StorageAccounts_QueueService_Spec) Initialize_From_StorageAccounts_QueueService_STATUS(source *StorageAccounts_QueueService_STATUS) error { - - // Cors - if source.Cors != nil { - var cor CorsRules - err := cor.Initialize_From_CorsRules_STATUS(source.Cors) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_CorsRules_STATUS() to populate field Cors") - } - service.Cors = &cor - } else { - service.Cors = nil - } - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (service *StorageAccounts_QueueService_Spec) OriginalVersion() string { return GroupVersion.Version diff --git a/v2/api/storage/v1api20220901/storage_accounts_queue_service_types_gen_test.go b/v2/api/storage/v1api20220901/storage_accounts_queue_service_types_gen_test.go index 5fcd7cc4f95..e00015895ac 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_queue_service_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage_accounts_queue_service_types_gen_test.go @@ -6,6 +6,7 @@ package v1api20220901 import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsQueueService(subject StorageAcco copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsQueueService + var hub v20230101s.StorageAccountsQueueService err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20220901/storage_accounts_queue_services_queue_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_queue_services_queue_types_gen.go index 6c548c53c9e..4d00fc9e01b 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_queue_services_queue_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_queue_services_queue_types_gen.go @@ -49,22 +49,36 @@ var _ conversion.Convertible = &StorageAccountsQueueServicesQueue{} // ConvertFrom populates our StorageAccountsQueueServicesQueue from the provided hub StorageAccountsQueueServicesQueue func (queue *StorageAccountsQueueServicesQueue) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsQueueServicesQueue) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsQueueServicesQueue but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsQueueServicesQueue + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") } - return queue.AssignProperties_From_StorageAccountsQueueServicesQueue(source) + err = queue.AssignProperties_From_StorageAccountsQueueServicesQueue(&source) + if err != nil { + return errors.Wrap(err, "converting from source to queue") + } + + return nil } // ConvertTo populates the provided hub StorageAccountsQueueServicesQueue from our StorageAccountsQueueServicesQueue func (queue *StorageAccountsQueueServicesQueue) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsQueueServicesQueue) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsQueueServicesQueue but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsQueueServicesQueue + err := queue.AssignProperties_To_StorageAccountsQueueServicesQueue(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from queue") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return queue.AssignProperties_To_StorageAccountsQueueServicesQueue(destination) + return nil } // +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20220901-storageaccountsqueueservicesqueue,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsqueueservicesqueues,verbs=create;update,versions=v1api20220901,name=default.v1api20220901.storageaccountsqueueservicesqueues.storage.azure.com,admissionReviewVersions=v1 @@ -90,17 +104,6 @@ func (queue *StorageAccountsQueueServicesQueue) defaultAzureName() { // defaultImpl applies the code generated defaults to the StorageAccountsQueueServicesQueue resource func (queue *StorageAccountsQueueServicesQueue) defaultImpl() { queue.defaultAzureName() } -var _ genruntime.ImportableResource = &StorageAccountsQueueServicesQueue{} - -// InitializeSpec initializes the spec for this resource from the given status -func (queue *StorageAccountsQueueServicesQueue) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*StorageAccounts_QueueServices_Queue_STATUS); ok { - return queue.Spec.Initialize_From_StorageAccounts_QueueServices_Queue_STATUS(s) - } - - return fmt.Errorf("expected Status of type StorageAccounts_QueueServices_Queue_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesResource = &StorageAccountsQueueServicesQueue{} // AzureName returns the Azure name of the resource @@ -506,16 +509,6 @@ func (queue *StorageAccounts_QueueServices_Queue_Spec) AssignProperties_To_Stora return nil } -// Initialize_From_StorageAccounts_QueueServices_Queue_STATUS populates our StorageAccounts_QueueServices_Queue_Spec from the provided source StorageAccounts_QueueServices_Queue_STATUS -func (queue *StorageAccounts_QueueServices_Queue_Spec) Initialize_From_StorageAccounts_QueueServices_Queue_STATUS(source *StorageAccounts_QueueServices_Queue_STATUS) error { - - // Metadata - queue.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (queue *StorageAccounts_QueueServices_Queue_Spec) OriginalVersion() string { return GroupVersion.Version diff --git a/v2/api/storage/v1api20220901/storage_accounts_queue_services_queue_types_gen_test.go b/v2/api/storage/v1api20220901/storage_accounts_queue_services_queue_types_gen_test.go index 464cec09007..653b0f8766a 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_queue_services_queue_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage_accounts_queue_services_queue_types_gen_test.go @@ -6,6 +6,7 @@ package v1api20220901 import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsQueueServicesQueue(subject Stora copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsQueueServicesQueue + var hub v20230101s.StorageAccountsQueueServicesQueue err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20220901/storage_accounts_table_service_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_table_service_types_gen.go index 31b1050968c..9795c531206 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_table_service_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_table_service_types_gen.go @@ -49,22 +49,36 @@ var _ conversion.Convertible = &StorageAccountsTableService{} // ConvertFrom populates our StorageAccountsTableService from the provided hub StorageAccountsTableService func (service *StorageAccountsTableService) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsTableService) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsTableService but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsTableService + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = service.AssignProperties_From_StorageAccountsTableService(&source) + if err != nil { + return errors.Wrap(err, "converting from source to service") } - return service.AssignProperties_From_StorageAccountsTableService(source) + return nil } // ConvertTo populates the provided hub StorageAccountsTableService from our StorageAccountsTableService func (service *StorageAccountsTableService) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsTableService) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsTableService but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsTableService + err := service.AssignProperties_To_StorageAccountsTableService(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from service") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return service.AssignProperties_To_StorageAccountsTableService(destination) + return nil } // +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20220901-storageaccountstableservice,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountstableservices,verbs=create;update,versions=v1api20220901,name=default.v1api20220901.storageaccountstableservices.storage.azure.com,admissionReviewVersions=v1 @@ -83,17 +97,6 @@ func (service *StorageAccountsTableService) Default() { // defaultImpl applies the code generated defaults to the StorageAccountsTableService resource func (service *StorageAccountsTableService) defaultImpl() {} -var _ genruntime.ImportableResource = &StorageAccountsTableService{} - -// InitializeSpec initializes the spec for this resource from the given status -func (service *StorageAccountsTableService) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*StorageAccounts_TableService_STATUS); ok { - return service.Spec.Initialize_From_StorageAccounts_TableService_STATUS(s) - } - - return fmt.Errorf("expected Status of type StorageAccounts_TableService_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesResource = &StorageAccountsTableService{} // AzureName returns the Azure name of the resource (always "default") @@ -508,25 +511,6 @@ func (service *StorageAccounts_TableService_Spec) AssignProperties_To_StorageAcc return nil } -// Initialize_From_StorageAccounts_TableService_STATUS populates our StorageAccounts_TableService_Spec from the provided source StorageAccounts_TableService_STATUS -func (service *StorageAccounts_TableService_Spec) Initialize_From_StorageAccounts_TableService_STATUS(source *StorageAccounts_TableService_STATUS) error { - - // Cors - if source.Cors != nil { - var cor CorsRules - err := cor.Initialize_From_CorsRules_STATUS(source.Cors) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_CorsRules_STATUS() to populate field Cors") - } - service.Cors = &cor - } else { - service.Cors = nil - } - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (service *StorageAccounts_TableService_Spec) OriginalVersion() string { return GroupVersion.Version diff --git a/v2/api/storage/v1api20220901/storage_accounts_table_service_types_gen_test.go b/v2/api/storage/v1api20220901/storage_accounts_table_service_types_gen_test.go index 0ddf235601c..70bdda3c891 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_table_service_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage_accounts_table_service_types_gen_test.go @@ -6,6 +6,7 @@ package v1api20220901 import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsTableService(subject StorageAcco copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsTableService + var hub v20230101s.StorageAccountsTableService err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20220901/storage_accounts_table_services_table_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_table_services_table_types_gen.go index 01af5b0f498..06f838a9552 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_table_services_table_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_table_services_table_types_gen.go @@ -49,22 +49,36 @@ var _ conversion.Convertible = &StorageAccountsTableServicesTable{} // ConvertFrom populates our StorageAccountsTableServicesTable from the provided hub StorageAccountsTableServicesTable func (table *StorageAccountsTableServicesTable) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20220901s.StorageAccountsTableServicesTable) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsTableServicesTable but received %T instead", hub) + // intermediate variable for conversion + var source v20220901s.StorageAccountsTableServicesTable + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = table.AssignProperties_From_StorageAccountsTableServicesTable(&source) + if err != nil { + return errors.Wrap(err, "converting from source to table") } - return table.AssignProperties_From_StorageAccountsTableServicesTable(source) + return nil } // ConvertTo populates the provided hub StorageAccountsTableServicesTable from our StorageAccountsTableServicesTable func (table *StorageAccountsTableServicesTable) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20220901s.StorageAccountsTableServicesTable) - if !ok { - return fmt.Errorf("expected storage/v1api20220901/storage/StorageAccountsTableServicesTable but received %T instead", hub) + // intermediate variable for conversion + var destination v20220901s.StorageAccountsTableServicesTable + err := table.AssignProperties_To_StorageAccountsTableServicesTable(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from table") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return table.AssignProperties_To_StorageAccountsTableServicesTable(destination) + return nil } // +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20220901-storageaccountstableservicestable,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountstableservicestables,verbs=create;update,versions=v1api20220901,name=default.v1api20220901.storageaccountstableservicestables.storage.azure.com,admissionReviewVersions=v1 @@ -90,17 +104,6 @@ func (table *StorageAccountsTableServicesTable) defaultAzureName() { // defaultImpl applies the code generated defaults to the StorageAccountsTableServicesTable resource func (table *StorageAccountsTableServicesTable) defaultImpl() { table.defaultAzureName() } -var _ genruntime.ImportableResource = &StorageAccountsTableServicesTable{} - -// InitializeSpec initializes the spec for this resource from the given status -func (table *StorageAccountsTableServicesTable) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*StorageAccounts_TableServices_Table_STATUS); ok { - return table.Spec.Initialize_From_StorageAccounts_TableServices_Table_STATUS(s) - } - - return fmt.Errorf("expected Status of type StorageAccounts_TableServices_Table_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesResource = &StorageAccountsTableServicesTable{} // AzureName returns the Azure name of the resource @@ -540,31 +543,6 @@ func (table *StorageAccounts_TableServices_Table_Spec) AssignProperties_To_Stora return nil } -// Initialize_From_StorageAccounts_TableServices_Table_STATUS populates our StorageAccounts_TableServices_Table_Spec from the provided source StorageAccounts_TableServices_Table_STATUS -func (table *StorageAccounts_TableServices_Table_Spec) Initialize_From_StorageAccounts_TableServices_Table_STATUS(source *StorageAccounts_TableServices_Table_STATUS) error { - - // SignedIdentifiers - if source.SignedIdentifiers != nil { - signedIdentifierList := make([]TableSignedIdentifier, len(source.SignedIdentifiers)) - for signedIdentifierIndex, signedIdentifierItem := range source.SignedIdentifiers { - // Shadow the loop variable to avoid aliasing - signedIdentifierItem := signedIdentifierItem - var signedIdentifier TableSignedIdentifier - err := signedIdentifier.Initialize_From_TableSignedIdentifier_STATUS(&signedIdentifierItem) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_TableSignedIdentifier_STATUS() to populate field SignedIdentifiers") - } - signedIdentifierList[signedIdentifierIndex] = signedIdentifier - } - table.SignedIdentifiers = signedIdentifierList - } else { - table.SignedIdentifiers = nil - } - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (table *StorageAccounts_TableServices_Table_Spec) OriginalVersion() string { return GroupVersion.Version @@ -928,33 +906,6 @@ func (identifier *TableSignedIdentifier) AssignProperties_To_TableSignedIdentifi return nil } -// Initialize_From_TableSignedIdentifier_STATUS populates our TableSignedIdentifier from the provided source TableSignedIdentifier_STATUS -func (identifier *TableSignedIdentifier) Initialize_From_TableSignedIdentifier_STATUS(source *TableSignedIdentifier_STATUS) error { - - // AccessPolicy - if source.AccessPolicy != nil { - var accessPolicy TableAccessPolicy - err := accessPolicy.Initialize_From_TableAccessPolicy_STATUS(source.AccessPolicy) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_TableAccessPolicy_STATUS() to populate field AccessPolicy") - } - identifier.AccessPolicy = &accessPolicy - } else { - identifier.AccessPolicy = nil - } - - // Reference - if source.Id != nil { - reference := genruntime.CreateResourceReferenceFromARMID(*source.Id) - identifier.Reference = &reference - } else { - identifier.Reference = nil - } - - // No error - return nil -} - // Object to set Table Access Policy. type TableSignedIdentifier_STATUS struct { // AccessPolicy: Access policy @@ -1169,22 +1120,6 @@ func (policy *TableAccessPolicy) AssignProperties_To_TableAccessPolicy(destinati return nil } -// Initialize_From_TableAccessPolicy_STATUS populates our TableAccessPolicy from the provided source TableAccessPolicy_STATUS -func (policy *TableAccessPolicy) Initialize_From_TableAccessPolicy_STATUS(source *TableAccessPolicy_STATUS) error { - - // ExpiryTime - policy.ExpiryTime = genruntime.ClonePointerToString(source.ExpiryTime) - - // Permission - policy.Permission = genruntime.ClonePointerToString(source.Permission) - - // StartTime - policy.StartTime = genruntime.ClonePointerToString(source.StartTime) - - // No error - return nil -} - // Table Access Policy Properties Object. type TableAccessPolicy_STATUS struct { // ExpiryTime: Expiry time of the access policy diff --git a/v2/api/storage/v1api20220901/storage_accounts_table_services_table_types_gen_test.go b/v2/api/storage/v1api20220901/storage_accounts_table_services_table_types_gen_test.go index c457f1e31f2..e5890741557 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_table_services_table_types_gen_test.go +++ b/v2/api/storage/v1api20220901/storage_accounts_table_services_table_types_gen_test.go @@ -6,6 +6,7 @@ package v1api20220901 import ( "encoding/json" v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForStorageAccountsTableServicesTable(subject Stora copied := subject.DeepCopy() // Convert to our hub version - var hub v20220901s.StorageAccountsTableServicesTable + var hub v20230101s.StorageAccountsTableServicesTable err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/storage/v1api20230101/doc.go b/v2/api/storage/v1api20230101/doc.go new file mode 100644 index 00000000000..aa8b7980be9 --- /dev/null +++ b/v2/api/storage/v1api20230101/doc.go @@ -0,0 +1,10 @@ +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by azure-service-operator-codegen. DO NOT EDIT. + +// Package v1api20230101 contains API Schema definitions for the storage v1api20230101 API group +// +groupName=storage.azure.com +package v1api20230101 diff --git a/v2/api/storage/v1api20230101/groupversion_info_gen.go b/v2/api/storage/v1api20230101/groupversion_info_gen.go new file mode 100644 index 00000000000..1466f7bfb0b --- /dev/null +++ b/v2/api/storage/v1api20230101/groupversion_info_gen.go @@ -0,0 +1,32 @@ +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by azure-service-operator-codegen. DO NOT EDIT. + +// Package v1api20230101 contains API Schema definitions for the storage v1api20230101 API group +// +kubebuilder:object:generate=true +// All object properties are optional by default, this will be overridden when needed: +// +kubebuilder:validation:Optional +// +groupName=storage.azure.com +// +versionName=v1api20230101 +package v1api20230101 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "storage.azure.com", Version: "v1api20230101"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme + + localSchemeBuilder = SchemeBuilder.SchemeBuilder +) diff --git a/v2/api/storage/v1api20230101/storage/groupversion_info_gen.go b/v2/api/storage/v1api20230101/storage/groupversion_info_gen.go new file mode 100644 index 00000000000..d3caa57ab65 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/groupversion_info_gen.go @@ -0,0 +1,32 @@ +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by azure-service-operator-codegen. DO NOT EDIT. + +// Package storage contains API Schema definitions for the storage storage API group +// +kubebuilder:object:generate=true +// All object properties are optional by default, this will be overridden when needed: +// +kubebuilder:validation:Optional +// +groupName=storage.azure.com +// +versionName=v1api20230101storage +package storage + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "storage.azure.com", Version: "v1api20230101storage"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme + + localSchemeBuilder = SchemeBuilder.SchemeBuilder +) diff --git a/v2/api/storage/v1api20230101/storage/storage_account_types_gen.go b/v2/api/storage/v1api20230101/storage/storage_account_types_gen.go new file mode 100644 index 00000000000..5bc6c12e101 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_account_types_gen.go @@ -0,0 +1,871 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "context" + "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" + "github.com/go-logr/logr" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccounts,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccounts/status,storageaccounts/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Storage version of v1api20230101.StorageAccount +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName} +type StorageAccount struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccount_Spec `json:"spec,omitempty"` + Status StorageAccount_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccount{} + +// GetConditions returns the conditions of the resource +func (account *StorageAccount) GetConditions() conditions.Conditions { + return account.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (account *StorageAccount) SetConditions(conditions conditions.Conditions) { + account.Status.Conditions = conditions +} + +var _ genruntime.KubernetesExporter = &StorageAccount{} + +// ExportKubernetesResources defines a resource which can create other resources in Kubernetes. +func (account *StorageAccount) ExportKubernetesResources(_ context.Context, _ genruntime.MetaObject, _ *genericarmclient.GenericClient, _ logr.Logger) ([]client.Object, error) { + collector := configmaps.NewCollector(account.Namespace) + if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil { + if account.Status.PrimaryEndpoints != nil { + if account.Status.PrimaryEndpoints.Blob != nil { + collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.BlobEndpoint, *account.Status.PrimaryEndpoints.Blob) + } + } + } + if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil { + if account.Status.PrimaryEndpoints != nil { + if account.Status.PrimaryEndpoints.Dfs != nil { + collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.DfsEndpoint, *account.Status.PrimaryEndpoints.Dfs) + } + } + } + if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil { + if account.Status.PrimaryEndpoints != nil { + if account.Status.PrimaryEndpoints.File != nil { + collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.FileEndpoint, *account.Status.PrimaryEndpoints.File) + } + } + } + if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil { + if account.Status.PrimaryEndpoints != nil { + if account.Status.PrimaryEndpoints.Queue != nil { + collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.QueueEndpoint, *account.Status.PrimaryEndpoints.Queue) + } + } + } + if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil { + if account.Status.PrimaryEndpoints != nil { + if account.Status.PrimaryEndpoints.Table != nil { + collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.TableEndpoint, *account.Status.PrimaryEndpoints.Table) + } + } + } + if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil { + if account.Status.PrimaryEndpoints != nil { + if account.Status.PrimaryEndpoints.Web != nil { + collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.WebEndpoint, *account.Status.PrimaryEndpoints.Web) + } + } + } + result, err := collector.Values() + if err != nil { + return nil, err + } + return configmaps.SliceToClientObjectSlice(result), nil +} + +var _ genruntime.KubernetesResource = &StorageAccount{} + +// AzureName returns the Azure name of the resource +func (account *StorageAccount) AzureName() string { + return account.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (account StorageAccount) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (account *StorageAccount) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (account *StorageAccount) GetSpec() genruntime.ConvertibleSpec { + return &account.Spec +} + +// GetStatus returns the status of this resource +func (account *StorageAccount) GetStatus() genruntime.ConvertibleStatus { + return &account.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (account *StorageAccount) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts" +func (account *StorageAccount) GetType() string { + return "Microsoft.Storage/storageAccounts" +} + +// NewEmptyStatus returns a new empty (blank) status +func (account *StorageAccount) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccount_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (account *StorageAccount) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(account.Spec) + return account.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (account *StorageAccount) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccount_STATUS); ok { + account.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccount_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + account.Status = st + return nil +} + +// Hub marks that this StorageAccount is the hub type for conversion +func (account *StorageAccount) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (account *StorageAccount) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: account.Spec.OriginalVersion, + Kind: "StorageAccount", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20230101.StorageAccount +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName} +type StorageAccountList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccount `json:"items"` +} + +// Storage version of v1api20230101.APIVersion +// +kubebuilder:validation:Enum={"2023-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2023-01-01") + +// Storage version of v1api20230101.StorageAccount_Spec +type StorageAccount_Spec struct { + AccessTier *string `json:"accessTier,omitempty"` + AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` + AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` + AllowedCopyScope *string `json:"allowedCopyScope,omitempty"` + AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + CustomDomain *CustomDomain `json:"customDomain,omitempty"` + DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + DnsEndpointType *string `json:"dnsEndpointType,omitempty"` + Encryption *Encryption `json:"encryption,omitempty"` + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + Identity *Identity `json:"identity,omitempty"` + ImmutableStorageWithVersioning *ImmutableStorageAccount `json:"immutableStorageWithVersioning,omitempty"` + IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` + IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` + IsNfsV3Enabled *bool `json:"isNfsV3Enabled,omitempty"` + IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + KeyPolicy *KeyPolicy `json:"keyPolicy,omitempty"` + Kind *string `json:"kind,omitempty"` + LargeFileSharesState *string `json:"largeFileSharesState,omitempty"` + Location *string `json:"location,omitempty"` + MinimumTlsVersion *string `json:"minimumTlsVersion,omitempty"` + NetworkAcls *NetworkRuleSet `json:"networkAcls,omitempty"` + OperatorSpec *StorageAccountOperatorSpec `json:"operatorSpec,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` + SasPolicy *SasPolicy `json:"sasPolicy,omitempty"` + Sku *Sku `json:"sku,omitempty"` + SupportsHttpsTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + Tags map[string]string `json:"tags,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &StorageAccount_Spec{} + +// ConvertSpecFrom populates our StorageAccount_Spec from the provided source +func (account *StorageAccount_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == account { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(account) +} + +// ConvertSpecTo populates the provided destination from our StorageAccount_Spec +func (account *StorageAccount_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == account { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(account) +} + +// Storage version of v1api20230101.StorageAccount_STATUS +// The storage account. +type StorageAccount_STATUS struct { + AccessTier *string `json:"accessTier,omitempty"` + AccountMigrationInProgress *bool `json:"accountMigrationInProgress,omitempty"` + AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` + AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` + AllowedCopyScope *string `json:"allowedCopyScope,omitempty"` + AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication_STATUS `json:"azureFilesIdentityBasedAuthentication,omitempty"` + BlobRestoreStatus *BlobRestoreStatus_STATUS `json:"blobRestoreStatus,omitempty"` + Conditions []conditions.Condition `json:"conditions,omitempty"` + CreationTime *string `json:"creationTime,omitempty"` + CustomDomain *CustomDomain_STATUS `json:"customDomain,omitempty"` + DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + DnsEndpointType *string `json:"dnsEndpointType,omitempty"` + Encryption *Encryption_STATUS `json:"encryption,omitempty"` + ExtendedLocation *ExtendedLocation_STATUS `json:"extendedLocation,omitempty"` + FailoverInProgress *bool `json:"failoverInProgress,omitempty"` + GeoReplicationStats *GeoReplicationStats_STATUS `json:"geoReplicationStats,omitempty"` + Id *string `json:"id,omitempty"` + Identity *Identity_STATUS `json:"identity,omitempty"` + ImmutableStorageWithVersioning *ImmutableStorageAccount_STATUS `json:"immutableStorageWithVersioning,omitempty"` + IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` + IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` + IsNfsV3Enabled *bool `json:"isNfsV3Enabled,omitempty"` + IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + IsSkuConversionBlocked *bool `json:"isSkuConversionBlocked,omitempty"` + KeyCreationTime *KeyCreationTime_STATUS `json:"keyCreationTime,omitempty"` + KeyPolicy *KeyPolicy_STATUS `json:"keyPolicy,omitempty"` + Kind *string `json:"kind,omitempty"` + LargeFileSharesState *string `json:"largeFileSharesState,omitempty"` + LastGeoFailoverTime *string `json:"lastGeoFailoverTime,omitempty"` + Location *string `json:"location,omitempty"` + MinimumTlsVersion *string `json:"minimumTlsVersion,omitempty"` + Name *string `json:"name,omitempty"` + NetworkAcls *NetworkRuleSet_STATUS `json:"networkAcls,omitempty"` + PrimaryEndpoints *Endpoints_STATUS `json:"primaryEndpoints,omitempty"` + PrimaryLocation *string `json:"primaryLocation,omitempty"` + PrivateEndpointConnections []PrivateEndpointConnection_STATUS `json:"privateEndpointConnections,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + RoutingPreference *RoutingPreference_STATUS `json:"routingPreference,omitempty"` + SasPolicy *SasPolicy_STATUS `json:"sasPolicy,omitempty"` + SecondaryEndpoints *Endpoints_STATUS `json:"secondaryEndpoints,omitempty"` + SecondaryLocation *string `json:"secondaryLocation,omitempty"` + Sku *Sku_STATUS `json:"sku,omitempty"` + StatusOfPrimary *string `json:"statusOfPrimary,omitempty"` + StatusOfSecondary *string `json:"statusOfSecondary,omitempty"` + StorageAccountSkuConversionStatus *StorageAccountSkuConversionStatus_STATUS `json:"storageAccountSkuConversionStatus,omitempty"` + SupportsHttpsTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + Tags map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccount_STATUS{} + +// ConvertStatusFrom populates our StorageAccount_STATUS from the provided source +func (account *StorageAccount_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == account { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(account) +} + +// ConvertStatusTo populates the provided destination from our StorageAccount_STATUS +func (account *StorageAccount_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == account { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(account) +} + +// Storage version of v1api20230101.AzureFilesIdentityBasedAuthentication +// Settings for Azure Files identity based authentication. +type AzureFilesIdentityBasedAuthentication struct { + ActiveDirectoryProperties *ActiveDirectoryProperties `json:"activeDirectoryProperties,omitempty"` + DefaultSharePermission *string `json:"defaultSharePermission,omitempty"` + DirectoryServiceOptions *string `json:"directoryServiceOptions,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.AzureFilesIdentityBasedAuthentication_STATUS +// Settings for Azure Files identity based authentication. +type AzureFilesIdentityBasedAuthentication_STATUS struct { + ActiveDirectoryProperties *ActiveDirectoryProperties_STATUS `json:"activeDirectoryProperties,omitempty"` + DefaultSharePermission *string `json:"defaultSharePermission,omitempty"` + DirectoryServiceOptions *string `json:"directoryServiceOptions,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.BlobRestoreStatus_STATUS +// Blob restore status. +type BlobRestoreStatus_STATUS struct { + FailureReason *string `json:"failureReason,omitempty"` + Parameters *BlobRestoreParameters_STATUS `json:"parameters,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RestoreId *string `json:"restoreId,omitempty"` + Status *string `json:"status,omitempty"` +} + +// Storage version of v1api20230101.CustomDomain +// The custom domain assigned to this storage account. This can be set via Update. +type CustomDomain struct { + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + UseSubDomainName *bool `json:"useSubDomainName,omitempty"` +} + +// Storage version of v1api20230101.CustomDomain_STATUS +// The custom domain assigned to this storage account. This can be set via Update. +type CustomDomain_STATUS struct { + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + UseSubDomainName *bool `json:"useSubDomainName,omitempty"` +} + +// Storage version of v1api20230101.Encryption +// The encryption settings on the storage account. +type Encryption struct { + Identity *EncryptionIdentity `json:"identity,omitempty"` + KeySource *string `json:"keySource,omitempty"` + Keyvaultproperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` + Services *EncryptionServices `json:"services,omitempty"` +} + +// Storage version of v1api20230101.Encryption_STATUS +// The encryption settings on the storage account. +type Encryption_STATUS struct { + Identity *EncryptionIdentity_STATUS `json:"identity,omitempty"` + KeySource *string `json:"keySource,omitempty"` + Keyvaultproperties *KeyVaultProperties_STATUS `json:"keyvaultproperties,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` + Services *EncryptionServices_STATUS `json:"services,omitempty"` +} + +// Storage version of v1api20230101.Endpoints_STATUS +// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object. +type Endpoints_STATUS struct { + Blob *string `json:"blob,omitempty"` + Dfs *string `json:"dfs,omitempty"` + File *string `json:"file,omitempty"` + InternetEndpoints *StorageAccountInternetEndpoints_STATUS `json:"internetEndpoints,omitempty"` + MicrosoftEndpoints *StorageAccountMicrosoftEndpoints_STATUS `json:"microsoftEndpoints,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Queue *string `json:"queue,omitempty"` + Table *string `json:"table,omitempty"` + Web *string `json:"web,omitempty"` +} + +// Storage version of v1api20230101.ExtendedLocation +// The complex type of the extended location. +type ExtendedLocation struct { + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` +} + +// Storage version of v1api20230101.ExtendedLocation_STATUS +// The complex type of the extended location. +type ExtendedLocation_STATUS struct { + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` +} + +// Storage version of v1api20230101.GeoReplicationStats_STATUS +// Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when +// geo-redundant replication is enabled for the storage account. +type GeoReplicationStats_STATUS struct { + CanFailover *bool `json:"canFailover,omitempty"` + CanPlannedFailover *bool `json:"canPlannedFailover,omitempty"` + LastSyncTime *string `json:"lastSyncTime,omitempty"` + PostFailoverRedundancy *string `json:"postFailoverRedundancy,omitempty"` + PostPlannedFailoverRedundancy *string `json:"postPlannedFailoverRedundancy,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Status *string `json:"status,omitempty"` +} + +// Storage version of v1api20230101.Identity +// Identity for the resource. +type Identity struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` + UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"` +} + +// Storage version of v1api20230101.Identity_STATUS +// Identity for the resource. +type Identity_STATUS struct { + PrincipalId *string `json:"principalId,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TenantId *string `json:"tenantId,omitempty"` + Type *string `json:"type,omitempty"` + UserAssignedIdentities map[string]UserAssignedIdentity_STATUS `json:"userAssignedIdentities,omitempty"` +} + +// Storage version of v1api20230101.ImmutableStorageAccount +// This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. +type ImmutableStorageAccount struct { + Enabled *bool `json:"enabled,omitempty"` + ImmutabilityPolicy *AccountImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.ImmutableStorageAccount_STATUS +// This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. +type ImmutableStorageAccount_STATUS struct { + Enabled *bool `json:"enabled,omitempty"` + ImmutabilityPolicy *AccountImmutabilityPolicyProperties_STATUS `json:"immutabilityPolicy,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.KeyCreationTime_STATUS +// Storage account keys creation time. +type KeyCreationTime_STATUS struct { + Key1 *string `json:"key1,omitempty"` + Key2 *string `json:"key2,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.KeyPolicy +// KeyPolicy assigned to the storage account. +type KeyPolicy struct { + KeyExpirationPeriodInDays *int `json:"keyExpirationPeriodInDays,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.KeyPolicy_STATUS +// KeyPolicy assigned to the storage account. +type KeyPolicy_STATUS struct { + KeyExpirationPeriodInDays *int `json:"keyExpirationPeriodInDays,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.NetworkRuleSet +// Network rule set +type NetworkRuleSet struct { + Bypass *string `json:"bypass,omitempty"` + DefaultAction *string `json:"defaultAction,omitempty"` + IpRules []IPRule `json:"ipRules,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ResourceAccessRules []ResourceAccessRule `json:"resourceAccessRules,omitempty"` + VirtualNetworkRules []VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` +} + +// Storage version of v1api20230101.NetworkRuleSet_STATUS +// Network rule set +type NetworkRuleSet_STATUS struct { + Bypass *string `json:"bypass,omitempty"` + DefaultAction *string `json:"defaultAction,omitempty"` + IpRules []IPRule_STATUS `json:"ipRules,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ResourceAccessRules []ResourceAccessRule_STATUS `json:"resourceAccessRules,omitempty"` + VirtualNetworkRules []VirtualNetworkRule_STATUS `json:"virtualNetworkRules,omitempty"` +} + +// Storage version of v1api20230101.PrivateEndpointConnection_STATUS +// The Private Endpoint Connection resource. +type PrivateEndpointConnection_STATUS struct { + Id *string `json:"id,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.RoutingPreference +// Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user +// data, the default option is microsoft routing +type RoutingPreference struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` + PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` + RoutingChoice *string `json:"routingChoice,omitempty"` +} + +// Storage version of v1api20230101.RoutingPreference_STATUS +// Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user +// data, the default option is microsoft routing +type RoutingPreference_STATUS struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` + PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` + RoutingChoice *string `json:"routingChoice,omitempty"` +} + +// Storage version of v1api20230101.SasPolicy +// SasPolicy assigned to the storage account. +type SasPolicy struct { + ExpirationAction *string `json:"expirationAction,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"` +} + +// Storage version of v1api20230101.SasPolicy_STATUS +// SasPolicy assigned to the storage account. +type SasPolicy_STATUS struct { + ExpirationAction *string `json:"expirationAction,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"` +} + +// Storage version of v1api20230101.Sku +// The SKU of the storage account. +type Sku struct { + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Tier *string `json:"tier,omitempty"` +} + +// Storage version of v1api20230101.Sku_STATUS +// The SKU of the storage account. +type Sku_STATUS struct { + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Tier *string `json:"tier,omitempty"` +} + +// Storage version of v1api20230101.StorageAccountOperatorSpec +// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure +type StorageAccountOperatorSpec struct { + ConfigMaps *StorageAccountOperatorConfigMaps `json:"configMaps,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Secrets *StorageAccountOperatorSecrets `json:"secrets,omitempty"` +} + +// Storage version of v1api20230101.StorageAccountSkuConversionStatus_STATUS +// This defines the sku conversion status object for asynchronous sku conversions. +type StorageAccountSkuConversionStatus_STATUS struct { + EndTime *string `json:"endTime,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SkuConversionStatus *string `json:"skuConversionStatus,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TargetSkuName *string `json:"targetSkuName,omitempty"` +} + +// Storage version of v1api20230101.AccountImmutabilityPolicyProperties +// This defines account-level immutability policy properties. +type AccountImmutabilityPolicyProperties struct { + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + State *string `json:"state,omitempty"` +} + +// Storage version of v1api20230101.AccountImmutabilityPolicyProperties_STATUS +// This defines account-level immutability policy properties. +type AccountImmutabilityPolicyProperties_STATUS struct { + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + State *string `json:"state,omitempty"` +} + +// Storage version of v1api20230101.ActiveDirectoryProperties +// Settings properties for Active Directory (AD). +type ActiveDirectoryProperties struct { + AccountType *string `json:"accountType,omitempty"` + AzureStorageSid *string `json:"azureStorageSid,omitempty"` + DomainGuid *string `json:"domainGuid,omitempty"` + DomainName *string `json:"domainName,omitempty"` + DomainSid *string `json:"domainSid,omitempty"` + ForestName *string `json:"forestName,omitempty"` + NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SamAccountName *string `json:"samAccountName,omitempty"` +} + +// Storage version of v1api20230101.ActiveDirectoryProperties_STATUS +// Settings properties for Active Directory (AD). +type ActiveDirectoryProperties_STATUS struct { + AccountType *string `json:"accountType,omitempty"` + AzureStorageSid *string `json:"azureStorageSid,omitempty"` + DomainGuid *string `json:"domainGuid,omitempty"` + DomainName *string `json:"domainName,omitempty"` + DomainSid *string `json:"domainSid,omitempty"` + ForestName *string `json:"forestName,omitempty"` + NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SamAccountName *string `json:"samAccountName,omitempty"` +} + +// Storage version of v1api20230101.BlobRestoreParameters_STATUS +// Blob restore parameters +type BlobRestoreParameters_STATUS struct { + BlobRanges []BlobRestoreRange_STATUS `json:"blobRanges,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TimeToRestore *string `json:"timeToRestore,omitempty"` +} + +// Storage version of v1api20230101.EncryptionIdentity +// Encryption identity for the storage account. +type EncryptionIdentity struct { + FederatedIdentityClientId *string `json:"federatedIdentityClientId,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + + // UserAssignedIdentityReference: Resource identifier of the UserAssigned identity to be associated with server-side + // encryption on the storage account. + UserAssignedIdentityReference *genruntime.ResourceReference `armReference:"UserAssignedIdentity" json:"userAssignedIdentityReference,omitempty"` +} + +// Storage version of v1api20230101.EncryptionIdentity_STATUS +// Encryption identity for the storage account. +type EncryptionIdentity_STATUS struct { + FederatedIdentityClientId *string `json:"federatedIdentityClientId,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` +} + +// Storage version of v1api20230101.EncryptionServices +// A list of services that support encryption. +type EncryptionServices struct { + Blob *EncryptionService `json:"blob,omitempty"` + File *EncryptionService `json:"file,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Queue *EncryptionService `json:"queue,omitempty"` + Table *EncryptionService `json:"table,omitempty"` +} + +// Storage version of v1api20230101.EncryptionServices_STATUS +// A list of services that support encryption. +type EncryptionServices_STATUS struct { + Blob *EncryptionService_STATUS `json:"blob,omitempty"` + File *EncryptionService_STATUS `json:"file,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Queue *EncryptionService_STATUS `json:"queue,omitempty"` + Table *EncryptionService_STATUS `json:"table,omitempty"` +} + +// Storage version of v1api20230101.IPRule +// IP rule with specific IP or IP range in CIDR format. +type IPRule struct { + Action *string `json:"action,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Value *string `json:"value,omitempty"` +} + +// Storage version of v1api20230101.IPRule_STATUS +// IP rule with specific IP or IP range in CIDR format. +type IPRule_STATUS struct { + Action *string `json:"action,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Value *string `json:"value,omitempty"` +} + +// Storage version of v1api20230101.KeyVaultProperties +// Properties of key vault. +type KeyVaultProperties struct { + Keyname *string `json:"keyname,omitempty"` + Keyvaulturi *string `json:"keyvaulturi,omitempty"` + Keyversion *string `json:"keyversion,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.KeyVaultProperties_STATUS +// Properties of key vault. +type KeyVaultProperties_STATUS struct { + CurrentVersionedKeyExpirationTimestamp *string `json:"currentVersionedKeyExpirationTimestamp,omitempty"` + CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"` + Keyname *string `json:"keyname,omitempty"` + Keyvaulturi *string `json:"keyvaulturi,omitempty"` + Keyversion *string `json:"keyversion,omitempty"` + LastKeyRotationTimestamp *string `json:"lastKeyRotationTimestamp,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.ResourceAccessRule +// Resource Access Rule. +type ResourceAccessRule struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + + // ResourceReference: Resource Id + ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"` + TenantId *string `json:"tenantId,omitempty"` +} + +// Storage version of v1api20230101.ResourceAccessRule_STATUS +// Resource Access Rule. +type ResourceAccessRule_STATUS struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ResourceId *string `json:"resourceId,omitempty"` + TenantId *string `json:"tenantId,omitempty"` +} + +// Storage version of v1api20230101.StorageAccountInternetEndpoints_STATUS +// The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint. +type StorageAccountInternetEndpoints_STATUS struct { + Blob *string `json:"blob,omitempty"` + Dfs *string `json:"dfs,omitempty"` + File *string `json:"file,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Web *string `json:"web,omitempty"` +} + +// Storage version of v1api20230101.StorageAccountMicrosoftEndpoints_STATUS +// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object via a microsoft routing +// endpoint. +type StorageAccountMicrosoftEndpoints_STATUS struct { + Blob *string `json:"blob,omitempty"` + Dfs *string `json:"dfs,omitempty"` + File *string `json:"file,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Queue *string `json:"queue,omitempty"` + Table *string `json:"table,omitempty"` + Web *string `json:"web,omitempty"` +} + +// Storage version of v1api20230101.StorageAccountOperatorConfigMaps +type StorageAccountOperatorConfigMaps struct { + BlobEndpoint *genruntime.ConfigMapDestination `json:"blobEndpoint,omitempty"` + DfsEndpoint *genruntime.ConfigMapDestination `json:"dfsEndpoint,omitempty"` + FileEndpoint *genruntime.ConfigMapDestination `json:"fileEndpoint,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + QueueEndpoint *genruntime.ConfigMapDestination `json:"queueEndpoint,omitempty"` + TableEndpoint *genruntime.ConfigMapDestination `json:"tableEndpoint,omitempty"` + WebEndpoint *genruntime.ConfigMapDestination `json:"webEndpoint,omitempty"` +} + +// Storage version of v1api20230101.StorageAccountOperatorSecrets +type StorageAccountOperatorSecrets struct { + BlobEndpoint *genruntime.SecretDestination `json:"blobEndpoint,omitempty"` + DfsEndpoint *genruntime.SecretDestination `json:"dfsEndpoint,omitempty"` + FileEndpoint *genruntime.SecretDestination `json:"fileEndpoint,omitempty"` + Key1 *genruntime.SecretDestination `json:"key1,omitempty"` + Key2 *genruntime.SecretDestination `json:"key2,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + QueueEndpoint *genruntime.SecretDestination `json:"queueEndpoint,omitempty"` + TableEndpoint *genruntime.SecretDestination `json:"tableEndpoint,omitempty"` + WebEndpoint *genruntime.SecretDestination `json:"webEndpoint,omitempty"` +} + +// Storage version of v1api20230101.UserAssignedIdentity_STATUS +// UserAssignedIdentity for the resource. +type UserAssignedIdentity_STATUS struct { + ClientId *string `json:"clientId,omitempty"` + PrincipalId *string `json:"principalId,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.UserAssignedIdentityDetails +// Information about the user assigned identity for the resource +type UserAssignedIdentityDetails struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` +} + +// Storage version of v1api20230101.VirtualNetworkRule +// Virtual Network rule. +type VirtualNetworkRule struct { + Action *string `json:"action,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + + // +kubebuilder:validation:Required + // Reference: Resource ID of a subnet, for example: + // /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` + State *string `json:"state,omitempty"` +} + +// Storage version of v1api20230101.VirtualNetworkRule_STATUS +// Virtual Network rule. +type VirtualNetworkRule_STATUS struct { + Action *string `json:"action,omitempty"` + Id *string `json:"id,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + State *string `json:"state,omitempty"` +} + +// Storage version of v1api20230101.BlobRestoreRange_STATUS +// Blob range +type BlobRestoreRange_STATUS struct { + EndRange *string `json:"endRange,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + StartRange *string `json:"startRange,omitempty"` +} + +// Storage version of v1api20230101.EncryptionService +// A service that allows server-side encryption to be used. +type EncryptionService struct { + Enabled *bool `json:"enabled,omitempty"` + KeyType *string `json:"keyType,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.EncryptionService_STATUS +// A service that allows server-side encryption to be used. +type EncryptionService_STATUS struct { + Enabled *bool `json:"enabled,omitempty"` + KeyType *string `json:"keyType,omitempty"` + LastEnabledTime *string `json:"lastEnabledTime,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +func init() { + SchemeBuilder.Register(&StorageAccount{}, &StorageAccountList{}) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_account_types_gen_test.go b/v2/api/storage/v1api20230101/storage/storage_account_types_gen_test.go new file mode 100644 index 00000000000..9f8d1def3f1 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_account_types_gen_test.go @@ -0,0 +1,3855 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccount_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccount via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccount, StorageAccountGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccount runs a test to see if a specific instance of StorageAccount round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccount(subject StorageAccount) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccount + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccount instances for property testing - lazily instantiated by StorageAccountGenerator() +var storageAccountGenerator gopter.Gen + +// StorageAccountGenerator returns a generator of StorageAccount instances for property testing. +func StorageAccountGenerator() gopter.Gen { + if storageAccountGenerator != nil { + return storageAccountGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccount(generators) + storageAccountGenerator = gen.Struct(reflect.TypeOf(StorageAccount{}), generators) + + return storageAccountGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccount is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccount(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccount_SpecGenerator() + gens["Status"] = StorageAccount_STATUSGenerator() +} + +func Test_StorageAccount_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccount_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccount_Spec, StorageAccount_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccount_Spec runs a test to see if a specific instance of StorageAccount_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccount_Spec(subject StorageAccount_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccount_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccount_Spec instances for property testing - lazily instantiated by +// StorageAccount_SpecGenerator() +var storageAccount_SpecGenerator gopter.Gen + +// StorageAccount_SpecGenerator returns a generator of StorageAccount_Spec instances for property testing. +// We first initialize storageAccount_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccount_SpecGenerator() gopter.Gen { + if storageAccount_SpecGenerator != nil { + return storageAccount_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccount_Spec(generators) + storageAccount_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccount_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccount_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccount_Spec(generators) + storageAccount_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccount_Spec{}), generators) + + return storageAccount_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccount_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccount_Spec(gens map[string]gopter.Gen) { + gens["AccessTier"] = gen.PtrOf(gen.AlphaString()) + gens["AllowBlobPublicAccess"] = gen.PtrOf(gen.Bool()) + gens["AllowCrossTenantReplication"] = gen.PtrOf(gen.Bool()) + gens["AllowSharedKeyAccess"] = gen.PtrOf(gen.Bool()) + gens["AllowedCopyScope"] = gen.PtrOf(gen.AlphaString()) + gens["AzureName"] = gen.AlphaString() + gens["DefaultToOAuthAuthentication"] = gen.PtrOf(gen.Bool()) + gens["DnsEndpointType"] = gen.PtrOf(gen.AlphaString()) + gens["IsHnsEnabled"] = gen.PtrOf(gen.Bool()) + gens["IsLocalUserEnabled"] = gen.PtrOf(gen.Bool()) + gens["IsNfsV3Enabled"] = gen.PtrOf(gen.Bool()) + gens["IsSftpEnabled"] = gen.PtrOf(gen.Bool()) + gens["Kind"] = gen.PtrOf(gen.AlphaString()) + gens["LargeFileSharesState"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["MinimumTlsVersion"] = gen.PtrOf(gen.AlphaString()) + gens["OriginalVersion"] = gen.AlphaString() + gens["PublicNetworkAccess"] = gen.PtrOf(gen.AlphaString()) + gens["SupportsHttpsTrafficOnly"] = gen.PtrOf(gen.Bool()) + gens["Tags"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccount_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccount_Spec(gens map[string]gopter.Gen) { + gens["AzureFilesIdentityBasedAuthentication"] = gen.PtrOf(AzureFilesIdentityBasedAuthenticationGenerator()) + gens["CustomDomain"] = gen.PtrOf(CustomDomainGenerator()) + gens["Encryption"] = gen.PtrOf(EncryptionGenerator()) + gens["ExtendedLocation"] = gen.PtrOf(ExtendedLocationGenerator()) + gens["Identity"] = gen.PtrOf(IdentityGenerator()) + gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageAccountGenerator()) + gens["KeyPolicy"] = gen.PtrOf(KeyPolicyGenerator()) + gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSetGenerator()) + gens["OperatorSpec"] = gen.PtrOf(StorageAccountOperatorSpecGenerator()) + gens["RoutingPreference"] = gen.PtrOf(RoutingPreferenceGenerator()) + gens["SasPolicy"] = gen.PtrOf(SasPolicyGenerator()) + gens["Sku"] = gen.PtrOf(SkuGenerator()) +} + +func Test_StorageAccount_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccount_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccount_STATUS, StorageAccount_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccount_STATUS runs a test to see if a specific instance of StorageAccount_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccount_STATUS(subject StorageAccount_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccount_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccount_STATUS instances for property testing - lazily instantiated by +// StorageAccount_STATUSGenerator() +var storageAccount_STATUSGenerator gopter.Gen + +// StorageAccount_STATUSGenerator returns a generator of StorageAccount_STATUS instances for property testing. +func StorageAccount_STATUSGenerator() gopter.Gen { + if storageAccount_STATUSGenerator != nil { + return storageAccount_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccount_STATUS(generators) + storageAccount_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccount_STATUS{}), generators) + + return storageAccount_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccount_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccount_STATUS(gens map[string]gopter.Gen) { + gens["AzureFilesIdentityBasedAuthentication"] = gen.PtrOf(AzureFilesIdentityBasedAuthentication_STATUSGenerator()) + gens["BlobRestoreStatus"] = gen.PtrOf(BlobRestoreStatus_STATUSGenerator()) + gens["CustomDomain"] = gen.PtrOf(CustomDomain_STATUSGenerator()) + gens["Encryption"] = gen.PtrOf(Encryption_STATUSGenerator()) + gens["ExtendedLocation"] = gen.PtrOf(ExtendedLocation_STATUSGenerator()) + gens["GeoReplicationStats"] = gen.PtrOf(GeoReplicationStats_STATUSGenerator()) + gens["Identity"] = gen.PtrOf(Identity_STATUSGenerator()) + gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageAccount_STATUSGenerator()) + gens["KeyCreationTime"] = gen.PtrOf(KeyCreationTime_STATUSGenerator()) + gens["KeyPolicy"] = gen.PtrOf(KeyPolicy_STATUSGenerator()) + gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSet_STATUSGenerator()) + gens["PrimaryEndpoints"] = gen.PtrOf(Endpoints_STATUSGenerator()) + gens["PrivateEndpointConnections"] = gen.SliceOf(PrivateEndpointConnection_STATUSGenerator()) + gens["RoutingPreference"] = gen.PtrOf(RoutingPreference_STATUSGenerator()) + gens["SasPolicy"] = gen.PtrOf(SasPolicy_STATUSGenerator()) + gens["SecondaryEndpoints"] = gen.PtrOf(Endpoints_STATUSGenerator()) + gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator()) + gens["StorageAccountSkuConversionStatus"] = gen.PtrOf(StorageAccountSkuConversionStatus_STATUSGenerator()) +} + +func Test_AzureFilesIdentityBasedAuthentication_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AzureFilesIdentityBasedAuthentication via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication, AzureFilesIdentityBasedAuthenticationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication runs a test to see if a specific instance of AzureFilesIdentityBasedAuthentication round trips to JSON and back losslessly +func RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication(subject AzureFilesIdentityBasedAuthentication) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AzureFilesIdentityBasedAuthentication + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AzureFilesIdentityBasedAuthentication instances for property testing - lazily instantiated by +// AzureFilesIdentityBasedAuthenticationGenerator() +var azureFilesIdentityBasedAuthenticationGenerator gopter.Gen + +// AzureFilesIdentityBasedAuthenticationGenerator returns a generator of AzureFilesIdentityBasedAuthentication instances for property testing. +// We first initialize azureFilesIdentityBasedAuthenticationGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func AzureFilesIdentityBasedAuthenticationGenerator() gopter.Gen { + if azureFilesIdentityBasedAuthenticationGenerator != nil { + return azureFilesIdentityBasedAuthenticationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication(generators) + azureFilesIdentityBasedAuthenticationGenerator = gen.Struct(reflect.TypeOf(AzureFilesIdentityBasedAuthentication{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication(generators) + AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication(generators) + azureFilesIdentityBasedAuthenticationGenerator = gen.Struct(reflect.TypeOf(AzureFilesIdentityBasedAuthentication{}), generators) + + return azureFilesIdentityBasedAuthenticationGenerator +} + +// AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication(gens map[string]gopter.Gen) { + gens["DefaultSharePermission"] = gen.PtrOf(gen.AlphaString()) + gens["DirectoryServiceOptions"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication(gens map[string]gopter.Gen) { + gens["ActiveDirectoryProperties"] = gen.PtrOf(ActiveDirectoryPropertiesGenerator()) +} + +func Test_AzureFilesIdentityBasedAuthentication_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AzureFilesIdentityBasedAuthentication_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication_STATUS, AzureFilesIdentityBasedAuthentication_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication_STATUS runs a test to see if a specific instance of AzureFilesIdentityBasedAuthentication_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication_STATUS(subject AzureFilesIdentityBasedAuthentication_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AzureFilesIdentityBasedAuthentication_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AzureFilesIdentityBasedAuthentication_STATUS instances for property testing - lazily instantiated by +// AzureFilesIdentityBasedAuthentication_STATUSGenerator() +var azureFilesIdentityBasedAuthentication_STATUSGenerator gopter.Gen + +// AzureFilesIdentityBasedAuthentication_STATUSGenerator returns a generator of AzureFilesIdentityBasedAuthentication_STATUS instances for property testing. +// We first initialize azureFilesIdentityBasedAuthentication_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func AzureFilesIdentityBasedAuthentication_STATUSGenerator() gopter.Gen { + if azureFilesIdentityBasedAuthentication_STATUSGenerator != nil { + return azureFilesIdentityBasedAuthentication_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS(generators) + azureFilesIdentityBasedAuthentication_STATUSGenerator = gen.Struct(reflect.TypeOf(AzureFilesIdentityBasedAuthentication_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS(generators) + AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS(generators) + azureFilesIdentityBasedAuthentication_STATUSGenerator = gen.Struct(reflect.TypeOf(AzureFilesIdentityBasedAuthentication_STATUS{}), generators) + + return azureFilesIdentityBasedAuthentication_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS(gens map[string]gopter.Gen) { + gens["DefaultSharePermission"] = gen.PtrOf(gen.AlphaString()) + gens["DirectoryServiceOptions"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS(gens map[string]gopter.Gen) { + gens["ActiveDirectoryProperties"] = gen.PtrOf(ActiveDirectoryProperties_STATUSGenerator()) +} + +func Test_BlobRestoreStatus_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of BlobRestoreStatus_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForBlobRestoreStatus_STATUS, BlobRestoreStatus_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForBlobRestoreStatus_STATUS runs a test to see if a specific instance of BlobRestoreStatus_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForBlobRestoreStatus_STATUS(subject BlobRestoreStatus_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual BlobRestoreStatus_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of BlobRestoreStatus_STATUS instances for property testing - lazily instantiated by +// BlobRestoreStatus_STATUSGenerator() +var blobRestoreStatus_STATUSGenerator gopter.Gen + +// BlobRestoreStatus_STATUSGenerator returns a generator of BlobRestoreStatus_STATUS instances for property testing. +// We first initialize blobRestoreStatus_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func BlobRestoreStatus_STATUSGenerator() gopter.Gen { + if blobRestoreStatus_STATUSGenerator != nil { + return blobRestoreStatus_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreStatus_STATUS(generators) + blobRestoreStatus_STATUSGenerator = gen.Struct(reflect.TypeOf(BlobRestoreStatus_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreStatus_STATUS(generators) + AddRelatedPropertyGeneratorsForBlobRestoreStatus_STATUS(generators) + blobRestoreStatus_STATUSGenerator = gen.Struct(reflect.TypeOf(BlobRestoreStatus_STATUS{}), generators) + + return blobRestoreStatus_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForBlobRestoreStatus_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForBlobRestoreStatus_STATUS(gens map[string]gopter.Gen) { + gens["FailureReason"] = gen.PtrOf(gen.AlphaString()) + gens["RestoreId"] = gen.PtrOf(gen.AlphaString()) + gens["Status"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForBlobRestoreStatus_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForBlobRestoreStatus_STATUS(gens map[string]gopter.Gen) { + gens["Parameters"] = gen.PtrOf(BlobRestoreParameters_STATUSGenerator()) +} + +func Test_CustomDomain_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CustomDomain via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCustomDomain, CustomDomainGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCustomDomain runs a test to see if a specific instance of CustomDomain round trips to JSON and back losslessly +func RunJSONSerializationTestForCustomDomain(subject CustomDomain) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CustomDomain + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CustomDomain instances for property testing - lazily instantiated by CustomDomainGenerator() +var customDomainGenerator gopter.Gen + +// CustomDomainGenerator returns a generator of CustomDomain instances for property testing. +func CustomDomainGenerator() gopter.Gen { + if customDomainGenerator != nil { + return customDomainGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCustomDomain(generators) + customDomainGenerator = gen.Struct(reflect.TypeOf(CustomDomain{}), generators) + + return customDomainGenerator +} + +// AddIndependentPropertyGeneratorsForCustomDomain is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCustomDomain(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["UseSubDomainName"] = gen.PtrOf(gen.Bool()) +} + +func Test_CustomDomain_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CustomDomain_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCustomDomain_STATUS, CustomDomain_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCustomDomain_STATUS runs a test to see if a specific instance of CustomDomain_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForCustomDomain_STATUS(subject CustomDomain_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CustomDomain_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CustomDomain_STATUS instances for property testing - lazily instantiated by +// CustomDomain_STATUSGenerator() +var customDomain_STATUSGenerator gopter.Gen + +// CustomDomain_STATUSGenerator returns a generator of CustomDomain_STATUS instances for property testing. +func CustomDomain_STATUSGenerator() gopter.Gen { + if customDomain_STATUSGenerator != nil { + return customDomain_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCustomDomain_STATUS(generators) + customDomain_STATUSGenerator = gen.Struct(reflect.TypeOf(CustomDomain_STATUS{}), generators) + + return customDomain_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForCustomDomain_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCustomDomain_STATUS(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["UseSubDomainName"] = gen.PtrOf(gen.Bool()) +} + +func Test_Encryption_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Encryption via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryption, EncryptionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryption runs a test to see if a specific instance of Encryption round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryption(subject Encryption) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Encryption + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Encryption instances for property testing - lazily instantiated by EncryptionGenerator() +var encryptionGenerator gopter.Gen + +// EncryptionGenerator returns a generator of Encryption instances for property testing. +// We first initialize encryptionGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func EncryptionGenerator() gopter.Gen { + if encryptionGenerator != nil { + return encryptionGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryption(generators) + encryptionGenerator = gen.Struct(reflect.TypeOf(Encryption{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryption(generators) + AddRelatedPropertyGeneratorsForEncryption(generators) + encryptionGenerator = gen.Struct(reflect.TypeOf(Encryption{}), generators) + + return encryptionGenerator +} + +// AddIndependentPropertyGeneratorsForEncryption is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryption(gens map[string]gopter.Gen) { + gens["KeySource"] = gen.PtrOf(gen.AlphaString()) + gens["RequireInfrastructureEncryption"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForEncryption is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryption(gens map[string]gopter.Gen) { + gens["Identity"] = gen.PtrOf(EncryptionIdentityGenerator()) + gens["Keyvaultproperties"] = gen.PtrOf(KeyVaultPropertiesGenerator()) + gens["Services"] = gen.PtrOf(EncryptionServicesGenerator()) +} + +func Test_Encryption_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Encryption_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryption_STATUS, Encryption_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryption_STATUS runs a test to see if a specific instance of Encryption_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryption_STATUS(subject Encryption_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Encryption_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Encryption_STATUS instances for property testing - lazily instantiated by Encryption_STATUSGenerator() +var encryption_STATUSGenerator gopter.Gen + +// Encryption_STATUSGenerator returns a generator of Encryption_STATUS instances for property testing. +// We first initialize encryption_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Encryption_STATUSGenerator() gopter.Gen { + if encryption_STATUSGenerator != nil { + return encryption_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryption_STATUS(generators) + encryption_STATUSGenerator = gen.Struct(reflect.TypeOf(Encryption_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryption_STATUS(generators) + AddRelatedPropertyGeneratorsForEncryption_STATUS(generators) + encryption_STATUSGenerator = gen.Struct(reflect.TypeOf(Encryption_STATUS{}), generators) + + return encryption_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForEncryption_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryption_STATUS(gens map[string]gopter.Gen) { + gens["KeySource"] = gen.PtrOf(gen.AlphaString()) + gens["RequireInfrastructureEncryption"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForEncryption_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryption_STATUS(gens map[string]gopter.Gen) { + gens["Identity"] = gen.PtrOf(EncryptionIdentity_STATUSGenerator()) + gens["Keyvaultproperties"] = gen.PtrOf(KeyVaultProperties_STATUSGenerator()) + gens["Services"] = gen.PtrOf(EncryptionServices_STATUSGenerator()) +} + +func Test_Endpoints_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Endpoints_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEndpoints_STATUS, Endpoints_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEndpoints_STATUS runs a test to see if a specific instance of Endpoints_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEndpoints_STATUS(subject Endpoints_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Endpoints_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Endpoints_STATUS instances for property testing - lazily instantiated by Endpoints_STATUSGenerator() +var endpoints_STATUSGenerator gopter.Gen + +// Endpoints_STATUSGenerator returns a generator of Endpoints_STATUS instances for property testing. +// We first initialize endpoints_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Endpoints_STATUSGenerator() gopter.Gen { + if endpoints_STATUSGenerator != nil { + return endpoints_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEndpoints_STATUS(generators) + endpoints_STATUSGenerator = gen.Struct(reflect.TypeOf(Endpoints_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEndpoints_STATUS(generators) + AddRelatedPropertyGeneratorsForEndpoints_STATUS(generators) + endpoints_STATUSGenerator = gen.Struct(reflect.TypeOf(Endpoints_STATUS{}), generators) + + return endpoints_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForEndpoints_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEndpoints_STATUS(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(gen.AlphaString()) + gens["Dfs"] = gen.PtrOf(gen.AlphaString()) + gens["File"] = gen.PtrOf(gen.AlphaString()) + gens["Queue"] = gen.PtrOf(gen.AlphaString()) + gens["Table"] = gen.PtrOf(gen.AlphaString()) + gens["Web"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForEndpoints_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEndpoints_STATUS(gens map[string]gopter.Gen) { + gens["InternetEndpoints"] = gen.PtrOf(StorageAccountInternetEndpoints_STATUSGenerator()) + gens["MicrosoftEndpoints"] = gen.PtrOf(StorageAccountMicrosoftEndpoints_STATUSGenerator()) +} + +func Test_ExtendedLocation_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ExtendedLocation via JSON returns original", + prop.ForAll(RunJSONSerializationTestForExtendedLocation, ExtendedLocationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForExtendedLocation runs a test to see if a specific instance of ExtendedLocation round trips to JSON and back losslessly +func RunJSONSerializationTestForExtendedLocation(subject ExtendedLocation) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ExtendedLocation + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ExtendedLocation instances for property testing - lazily instantiated by ExtendedLocationGenerator() +var extendedLocationGenerator gopter.Gen + +// ExtendedLocationGenerator returns a generator of ExtendedLocation instances for property testing. +func ExtendedLocationGenerator() gopter.Gen { + if extendedLocationGenerator != nil { + return extendedLocationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForExtendedLocation(generators) + extendedLocationGenerator = gen.Struct(reflect.TypeOf(ExtendedLocation{}), generators) + + return extendedLocationGenerator +} + +// AddIndependentPropertyGeneratorsForExtendedLocation is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForExtendedLocation(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ExtendedLocation_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ExtendedLocation_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForExtendedLocation_STATUS, ExtendedLocation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForExtendedLocation_STATUS runs a test to see if a specific instance of ExtendedLocation_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForExtendedLocation_STATUS(subject ExtendedLocation_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ExtendedLocation_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ExtendedLocation_STATUS instances for property testing - lazily instantiated by +// ExtendedLocation_STATUSGenerator() +var extendedLocation_STATUSGenerator gopter.Gen + +// ExtendedLocation_STATUSGenerator returns a generator of ExtendedLocation_STATUS instances for property testing. +func ExtendedLocation_STATUSGenerator() gopter.Gen { + if extendedLocation_STATUSGenerator != nil { + return extendedLocation_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForExtendedLocation_STATUS(generators) + extendedLocation_STATUSGenerator = gen.Struct(reflect.TypeOf(ExtendedLocation_STATUS{}), generators) + + return extendedLocation_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForExtendedLocation_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForExtendedLocation_STATUS(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_GeoReplicationStats_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of GeoReplicationStats_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForGeoReplicationStats_STATUS, GeoReplicationStats_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForGeoReplicationStats_STATUS runs a test to see if a specific instance of GeoReplicationStats_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForGeoReplicationStats_STATUS(subject GeoReplicationStats_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual GeoReplicationStats_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of GeoReplicationStats_STATUS instances for property testing - lazily instantiated by +// GeoReplicationStats_STATUSGenerator() +var geoReplicationStats_STATUSGenerator gopter.Gen + +// GeoReplicationStats_STATUSGenerator returns a generator of GeoReplicationStats_STATUS instances for property testing. +func GeoReplicationStats_STATUSGenerator() gopter.Gen { + if geoReplicationStats_STATUSGenerator != nil { + return geoReplicationStats_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForGeoReplicationStats_STATUS(generators) + geoReplicationStats_STATUSGenerator = gen.Struct(reflect.TypeOf(GeoReplicationStats_STATUS{}), generators) + + return geoReplicationStats_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForGeoReplicationStats_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForGeoReplicationStats_STATUS(gens map[string]gopter.Gen) { + gens["CanFailover"] = gen.PtrOf(gen.Bool()) + gens["CanPlannedFailover"] = gen.PtrOf(gen.Bool()) + gens["LastSyncTime"] = gen.PtrOf(gen.AlphaString()) + gens["PostFailoverRedundancy"] = gen.PtrOf(gen.AlphaString()) + gens["PostPlannedFailoverRedundancy"] = gen.PtrOf(gen.AlphaString()) + gens["Status"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_Identity_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Identity via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIdentity, IdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIdentity runs a test to see if a specific instance of Identity round trips to JSON and back losslessly +func RunJSONSerializationTestForIdentity(subject Identity) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Identity + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Identity instances for property testing - lazily instantiated by IdentityGenerator() +var identityGenerator gopter.Gen + +// IdentityGenerator returns a generator of Identity instances for property testing. +// We first initialize identityGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func IdentityGenerator() gopter.Gen { + if identityGenerator != nil { + return identityGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity(generators) + identityGenerator = gen.Struct(reflect.TypeOf(Identity{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity(generators) + AddRelatedPropertyGeneratorsForIdentity(generators) + identityGenerator = gen.Struct(reflect.TypeOf(Identity{}), generators) + + return identityGenerator +} + +// AddIndependentPropertyGeneratorsForIdentity is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIdentity(gens map[string]gopter.Gen) { + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForIdentity is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForIdentity(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.SliceOf(UserAssignedIdentityDetailsGenerator()) +} + +func Test_Identity_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Identity_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIdentity_STATUS, Identity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIdentity_STATUS runs a test to see if a specific instance of Identity_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForIdentity_STATUS(subject Identity_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Identity_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Identity_STATUS instances for property testing - lazily instantiated by Identity_STATUSGenerator() +var identity_STATUSGenerator gopter.Gen + +// Identity_STATUSGenerator returns a generator of Identity_STATUS instances for property testing. +// We first initialize identity_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Identity_STATUSGenerator() gopter.Gen { + if identity_STATUSGenerator != nil { + return identity_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_STATUS(generators) + identity_STATUSGenerator = gen.Struct(reflect.TypeOf(Identity_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_STATUS(generators) + AddRelatedPropertyGeneratorsForIdentity_STATUS(generators) + identity_STATUSGenerator = gen.Struct(reflect.TypeOf(Identity_STATUS{}), generators) + + return identity_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForIdentity_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIdentity_STATUS(gens map[string]gopter.Gen) { + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForIdentity_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForIdentity_STATUS(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.MapOf(gen.AlphaString(), UserAssignedIdentity_STATUSGenerator()) +} + +func Test_ImmutableStorageAccount_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutableStorageAccount via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutableStorageAccount, ImmutableStorageAccountGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutableStorageAccount runs a test to see if a specific instance of ImmutableStorageAccount round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutableStorageAccount(subject ImmutableStorageAccount) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutableStorageAccount + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutableStorageAccount instances for property testing - lazily instantiated by +// ImmutableStorageAccountGenerator() +var immutableStorageAccountGenerator gopter.Gen + +// ImmutableStorageAccountGenerator returns a generator of ImmutableStorageAccount instances for property testing. +// We first initialize immutableStorageAccountGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ImmutableStorageAccountGenerator() gopter.Gen { + if immutableStorageAccountGenerator != nil { + return immutableStorageAccountGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageAccount(generators) + immutableStorageAccountGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageAccount{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageAccount(generators) + AddRelatedPropertyGeneratorsForImmutableStorageAccount(generators) + immutableStorageAccountGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageAccount{}), generators) + + return immutableStorageAccountGenerator +} + +// AddIndependentPropertyGeneratorsForImmutableStorageAccount is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutableStorageAccount(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForImmutableStorageAccount is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForImmutableStorageAccount(gens map[string]gopter.Gen) { + gens["ImmutabilityPolicy"] = gen.PtrOf(AccountImmutabilityPolicyPropertiesGenerator()) +} + +func Test_ImmutableStorageAccount_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutableStorageAccount_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutableStorageAccount_STATUS, ImmutableStorageAccount_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutableStorageAccount_STATUS runs a test to see if a specific instance of ImmutableStorageAccount_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutableStorageAccount_STATUS(subject ImmutableStorageAccount_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutableStorageAccount_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutableStorageAccount_STATUS instances for property testing - lazily instantiated by +// ImmutableStorageAccount_STATUSGenerator() +var immutableStorageAccount_STATUSGenerator gopter.Gen + +// ImmutableStorageAccount_STATUSGenerator returns a generator of ImmutableStorageAccount_STATUS instances for property testing. +// We first initialize immutableStorageAccount_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ImmutableStorageAccount_STATUSGenerator() gopter.Gen { + if immutableStorageAccount_STATUSGenerator != nil { + return immutableStorageAccount_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageAccount_STATUS(generators) + immutableStorageAccount_STATUSGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageAccount_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageAccount_STATUS(generators) + AddRelatedPropertyGeneratorsForImmutableStorageAccount_STATUS(generators) + immutableStorageAccount_STATUSGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageAccount_STATUS{}), generators) + + return immutableStorageAccount_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForImmutableStorageAccount_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutableStorageAccount_STATUS(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForImmutableStorageAccount_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForImmutableStorageAccount_STATUS(gens map[string]gopter.Gen) { + gens["ImmutabilityPolicy"] = gen.PtrOf(AccountImmutabilityPolicyProperties_STATUSGenerator()) +} + +func Test_KeyCreationTime_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyCreationTime_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyCreationTime_STATUS, KeyCreationTime_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyCreationTime_STATUS runs a test to see if a specific instance of KeyCreationTime_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyCreationTime_STATUS(subject KeyCreationTime_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyCreationTime_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyCreationTime_STATUS instances for property testing - lazily instantiated by +// KeyCreationTime_STATUSGenerator() +var keyCreationTime_STATUSGenerator gopter.Gen + +// KeyCreationTime_STATUSGenerator returns a generator of KeyCreationTime_STATUS instances for property testing. +func KeyCreationTime_STATUSGenerator() gopter.Gen { + if keyCreationTime_STATUSGenerator != nil { + return keyCreationTime_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyCreationTime_STATUS(generators) + keyCreationTime_STATUSGenerator = gen.Struct(reflect.TypeOf(KeyCreationTime_STATUS{}), generators) + + return keyCreationTime_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForKeyCreationTime_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyCreationTime_STATUS(gens map[string]gopter.Gen) { + gens["Key1"] = gen.PtrOf(gen.AlphaString()) + gens["Key2"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_KeyPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyPolicy, KeyPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyPolicy runs a test to see if a specific instance of KeyPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyPolicy(subject KeyPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyPolicy instances for property testing - lazily instantiated by KeyPolicyGenerator() +var keyPolicyGenerator gopter.Gen + +// KeyPolicyGenerator returns a generator of KeyPolicy instances for property testing. +func KeyPolicyGenerator() gopter.Gen { + if keyPolicyGenerator != nil { + return keyPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyPolicy(generators) + keyPolicyGenerator = gen.Struct(reflect.TypeOf(KeyPolicy{}), generators) + + return keyPolicyGenerator +} + +// AddIndependentPropertyGeneratorsForKeyPolicy is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyPolicy(gens map[string]gopter.Gen) { + gens["KeyExpirationPeriodInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_KeyPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyPolicy_STATUS, KeyPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyPolicy_STATUS runs a test to see if a specific instance of KeyPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyPolicy_STATUS(subject KeyPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyPolicy_STATUS instances for property testing - lazily instantiated by KeyPolicy_STATUSGenerator() +var keyPolicy_STATUSGenerator gopter.Gen + +// KeyPolicy_STATUSGenerator returns a generator of KeyPolicy_STATUS instances for property testing. +func KeyPolicy_STATUSGenerator() gopter.Gen { + if keyPolicy_STATUSGenerator != nil { + return keyPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyPolicy_STATUS(generators) + keyPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(KeyPolicy_STATUS{}), generators) + + return keyPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForKeyPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyPolicy_STATUS(gens map[string]gopter.Gen) { + gens["KeyExpirationPeriodInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_NetworkRuleSet_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of NetworkRuleSet via JSON returns original", + prop.ForAll(RunJSONSerializationTestForNetworkRuleSet, NetworkRuleSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForNetworkRuleSet runs a test to see if a specific instance of NetworkRuleSet round trips to JSON and back losslessly +func RunJSONSerializationTestForNetworkRuleSet(subject NetworkRuleSet) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual NetworkRuleSet + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of NetworkRuleSet instances for property testing - lazily instantiated by NetworkRuleSetGenerator() +var networkRuleSetGenerator gopter.Gen + +// NetworkRuleSetGenerator returns a generator of NetworkRuleSet instances for property testing. +// We first initialize networkRuleSetGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func NetworkRuleSetGenerator() gopter.Gen { + if networkRuleSetGenerator != nil { + return networkRuleSetGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet(generators) + networkRuleSetGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet(generators) + AddRelatedPropertyGeneratorsForNetworkRuleSet(generators) + networkRuleSetGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet{}), generators) + + return networkRuleSetGenerator +} + +// AddIndependentPropertyGeneratorsForNetworkRuleSet is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForNetworkRuleSet(gens map[string]gopter.Gen) { + gens["Bypass"] = gen.PtrOf(gen.AlphaString()) + gens["DefaultAction"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForNetworkRuleSet is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForNetworkRuleSet(gens map[string]gopter.Gen) { + gens["IpRules"] = gen.SliceOf(IPRuleGenerator()) + gens["ResourceAccessRules"] = gen.SliceOf(ResourceAccessRuleGenerator()) + gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRuleGenerator()) +} + +func Test_NetworkRuleSet_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of NetworkRuleSet_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForNetworkRuleSet_STATUS, NetworkRuleSet_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForNetworkRuleSet_STATUS runs a test to see if a specific instance of NetworkRuleSet_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForNetworkRuleSet_STATUS(subject NetworkRuleSet_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual NetworkRuleSet_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of NetworkRuleSet_STATUS instances for property testing - lazily instantiated by +// NetworkRuleSet_STATUSGenerator() +var networkRuleSet_STATUSGenerator gopter.Gen + +// NetworkRuleSet_STATUSGenerator returns a generator of NetworkRuleSet_STATUS instances for property testing. +// We first initialize networkRuleSet_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func NetworkRuleSet_STATUSGenerator() gopter.Gen { + if networkRuleSet_STATUSGenerator != nil { + return networkRuleSet_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS(generators) + networkRuleSet_STATUSGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS(generators) + AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS(generators) + networkRuleSet_STATUSGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS{}), generators) + + return networkRuleSet_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS(gens map[string]gopter.Gen) { + gens["Bypass"] = gen.PtrOf(gen.AlphaString()) + gens["DefaultAction"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS(gens map[string]gopter.Gen) { + gens["IpRules"] = gen.SliceOf(IPRule_STATUSGenerator()) + gens["ResourceAccessRules"] = gen.SliceOf(ResourceAccessRule_STATUSGenerator()) + gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRule_STATUSGenerator()) +} + +func Test_PrivateEndpointConnection_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of PrivateEndpointConnection_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPrivateEndpointConnection_STATUS, PrivateEndpointConnection_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPrivateEndpointConnection_STATUS runs a test to see if a specific instance of PrivateEndpointConnection_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForPrivateEndpointConnection_STATUS(subject PrivateEndpointConnection_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual PrivateEndpointConnection_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of PrivateEndpointConnection_STATUS instances for property testing - lazily instantiated by +// PrivateEndpointConnection_STATUSGenerator() +var privateEndpointConnection_STATUSGenerator gopter.Gen + +// PrivateEndpointConnection_STATUSGenerator returns a generator of PrivateEndpointConnection_STATUS instances for property testing. +func PrivateEndpointConnection_STATUSGenerator() gopter.Gen { + if privateEndpointConnection_STATUSGenerator != nil { + return privateEndpointConnection_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpointConnection_STATUS(generators) + privateEndpointConnection_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnection_STATUS{}), generators) + + return privateEndpointConnection_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForPrivateEndpointConnection_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPrivateEndpointConnection_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_RoutingPreference_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RoutingPreference via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRoutingPreference, RoutingPreferenceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRoutingPreference runs a test to see if a specific instance of RoutingPreference round trips to JSON and back losslessly +func RunJSONSerializationTestForRoutingPreference(subject RoutingPreference) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RoutingPreference + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RoutingPreference instances for property testing - lazily instantiated by RoutingPreferenceGenerator() +var routingPreferenceGenerator gopter.Gen + +// RoutingPreferenceGenerator returns a generator of RoutingPreference instances for property testing. +func RoutingPreferenceGenerator() gopter.Gen { + if routingPreferenceGenerator != nil { + return routingPreferenceGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRoutingPreference(generators) + routingPreferenceGenerator = gen.Struct(reflect.TypeOf(RoutingPreference{}), generators) + + return routingPreferenceGenerator +} + +// AddIndependentPropertyGeneratorsForRoutingPreference is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRoutingPreference(gens map[string]gopter.Gen) { + gens["PublishInternetEndpoints"] = gen.PtrOf(gen.Bool()) + gens["PublishMicrosoftEndpoints"] = gen.PtrOf(gen.Bool()) + gens["RoutingChoice"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_RoutingPreference_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RoutingPreference_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRoutingPreference_STATUS, RoutingPreference_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRoutingPreference_STATUS runs a test to see if a specific instance of RoutingPreference_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForRoutingPreference_STATUS(subject RoutingPreference_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RoutingPreference_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RoutingPreference_STATUS instances for property testing - lazily instantiated by +// RoutingPreference_STATUSGenerator() +var routingPreference_STATUSGenerator gopter.Gen + +// RoutingPreference_STATUSGenerator returns a generator of RoutingPreference_STATUS instances for property testing. +func RoutingPreference_STATUSGenerator() gopter.Gen { + if routingPreference_STATUSGenerator != nil { + return routingPreference_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRoutingPreference_STATUS(generators) + routingPreference_STATUSGenerator = gen.Struct(reflect.TypeOf(RoutingPreference_STATUS{}), generators) + + return routingPreference_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForRoutingPreference_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRoutingPreference_STATUS(gens map[string]gopter.Gen) { + gens["PublishInternetEndpoints"] = gen.PtrOf(gen.Bool()) + gens["PublishMicrosoftEndpoints"] = gen.PtrOf(gen.Bool()) + gens["RoutingChoice"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_SasPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SasPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSasPolicy, SasPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSasPolicy runs a test to see if a specific instance of SasPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForSasPolicy(subject SasPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SasPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SasPolicy instances for property testing - lazily instantiated by SasPolicyGenerator() +var sasPolicyGenerator gopter.Gen + +// SasPolicyGenerator returns a generator of SasPolicy instances for property testing. +func SasPolicyGenerator() gopter.Gen { + if sasPolicyGenerator != nil { + return sasPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSasPolicy(generators) + sasPolicyGenerator = gen.Struct(reflect.TypeOf(SasPolicy{}), generators) + + return sasPolicyGenerator +} + +// AddIndependentPropertyGeneratorsForSasPolicy is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSasPolicy(gens map[string]gopter.Gen) { + gens["ExpirationAction"] = gen.PtrOf(gen.AlphaString()) + gens["SasExpirationPeriod"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_SasPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SasPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSasPolicy_STATUS, SasPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSasPolicy_STATUS runs a test to see if a specific instance of SasPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSasPolicy_STATUS(subject SasPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SasPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SasPolicy_STATUS instances for property testing - lazily instantiated by SasPolicy_STATUSGenerator() +var sasPolicy_STATUSGenerator gopter.Gen + +// SasPolicy_STATUSGenerator returns a generator of SasPolicy_STATUS instances for property testing. +func SasPolicy_STATUSGenerator() gopter.Gen { + if sasPolicy_STATUSGenerator != nil { + return sasPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSasPolicy_STATUS(generators) + sasPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(SasPolicy_STATUS{}), generators) + + return sasPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSasPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSasPolicy_STATUS(gens map[string]gopter.Gen) { + gens["ExpirationAction"] = gen.PtrOf(gen.AlphaString()) + gens["SasExpirationPeriod"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_Sku_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Sku via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSku, SkuGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSku runs a test to see if a specific instance of Sku round trips to JSON and back losslessly +func RunJSONSerializationTestForSku(subject Sku) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Sku + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Sku instances for property testing - lazily instantiated by SkuGenerator() +var skuGenerator gopter.Gen + +// SkuGenerator returns a generator of Sku instances for property testing. +func SkuGenerator() gopter.Gen { + if skuGenerator != nil { + return skuGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSku(generators) + skuGenerator = gen.Struct(reflect.TypeOf(Sku{}), generators) + + return skuGenerator +} + +// AddIndependentPropertyGeneratorsForSku is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSku(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Tier"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_Sku_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Sku_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSku_STATUS, Sku_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSku_STATUS runs a test to see if a specific instance of Sku_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSku_STATUS(subject Sku_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Sku_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Sku_STATUS instances for property testing - lazily instantiated by Sku_STATUSGenerator() +var sku_STATUSGenerator gopter.Gen + +// Sku_STATUSGenerator returns a generator of Sku_STATUS instances for property testing. +func Sku_STATUSGenerator() gopter.Gen { + if sku_STATUSGenerator != nil { + return sku_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSku_STATUS(generators) + sku_STATUSGenerator = gen.Struct(reflect.TypeOf(Sku_STATUS{}), generators) + + return sku_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSku_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSku_STATUS(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Tier"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_StorageAccountOperatorSpec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountOperatorSpec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountOperatorSpec, StorageAccountOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountOperatorSpec runs a test to see if a specific instance of StorageAccountOperatorSpec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountOperatorSpec(subject StorageAccountOperatorSpec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountOperatorSpec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountOperatorSpec instances for property testing - lazily instantiated by +// StorageAccountOperatorSpecGenerator() +var storageAccountOperatorSpecGenerator gopter.Gen + +// StorageAccountOperatorSpecGenerator returns a generator of StorageAccountOperatorSpec instances for property testing. +func StorageAccountOperatorSpecGenerator() gopter.Gen { + if storageAccountOperatorSpecGenerator != nil { + return storageAccountOperatorSpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountOperatorSpec(generators) + storageAccountOperatorSpecGenerator = gen.Struct(reflect.TypeOf(StorageAccountOperatorSpec{}), generators) + + return storageAccountOperatorSpecGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountOperatorSpec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountOperatorSpec(gens map[string]gopter.Gen) { + gens["ConfigMaps"] = gen.PtrOf(StorageAccountOperatorConfigMapsGenerator()) + gens["Secrets"] = gen.PtrOf(StorageAccountOperatorSecretsGenerator()) +} + +func Test_StorageAccountSkuConversionStatus_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountSkuConversionStatus_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountSkuConversionStatus_STATUS, StorageAccountSkuConversionStatus_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountSkuConversionStatus_STATUS runs a test to see if a specific instance of StorageAccountSkuConversionStatus_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountSkuConversionStatus_STATUS(subject StorageAccountSkuConversionStatus_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountSkuConversionStatus_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountSkuConversionStatus_STATUS instances for property testing - lazily instantiated by +// StorageAccountSkuConversionStatus_STATUSGenerator() +var storageAccountSkuConversionStatus_STATUSGenerator gopter.Gen + +// StorageAccountSkuConversionStatus_STATUSGenerator returns a generator of StorageAccountSkuConversionStatus_STATUS instances for property testing. +func StorageAccountSkuConversionStatus_STATUSGenerator() gopter.Gen { + if storageAccountSkuConversionStatus_STATUSGenerator != nil { + return storageAccountSkuConversionStatus_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountSkuConversionStatus_STATUS(generators) + storageAccountSkuConversionStatus_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccountSkuConversionStatus_STATUS{}), generators) + + return storageAccountSkuConversionStatus_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccountSkuConversionStatus_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccountSkuConversionStatus_STATUS(gens map[string]gopter.Gen) { + gens["EndTime"] = gen.PtrOf(gen.AlphaString()) + gens["SkuConversionStatus"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) + gens["TargetSkuName"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_AccountImmutabilityPolicyProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccountImmutabilityPolicyProperties via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccountImmutabilityPolicyProperties, AccountImmutabilityPolicyPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccountImmutabilityPolicyProperties runs a test to see if a specific instance of AccountImmutabilityPolicyProperties round trips to JSON and back losslessly +func RunJSONSerializationTestForAccountImmutabilityPolicyProperties(subject AccountImmutabilityPolicyProperties) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccountImmutabilityPolicyProperties + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccountImmutabilityPolicyProperties instances for property testing - lazily instantiated by +// AccountImmutabilityPolicyPropertiesGenerator() +var accountImmutabilityPolicyPropertiesGenerator gopter.Gen + +// AccountImmutabilityPolicyPropertiesGenerator returns a generator of AccountImmutabilityPolicyProperties instances for property testing. +func AccountImmutabilityPolicyPropertiesGenerator() gopter.Gen { + if accountImmutabilityPolicyPropertiesGenerator != nil { + return accountImmutabilityPolicyPropertiesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties(generators) + accountImmutabilityPolicyPropertiesGenerator = gen.Struct(reflect.TypeOf(AccountImmutabilityPolicyProperties{}), generators) + + return accountImmutabilityPolicyPropertiesGenerator +} + +// AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWrites"] = gen.PtrOf(gen.Bool()) + gens["ImmutabilityPeriodSinceCreationInDays"] = gen.PtrOf(gen.Int()) + gens["State"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_AccountImmutabilityPolicyProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccountImmutabilityPolicyProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccountImmutabilityPolicyProperties_STATUS, AccountImmutabilityPolicyProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccountImmutabilityPolicyProperties_STATUS runs a test to see if a specific instance of AccountImmutabilityPolicyProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForAccountImmutabilityPolicyProperties_STATUS(subject AccountImmutabilityPolicyProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccountImmutabilityPolicyProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccountImmutabilityPolicyProperties_STATUS instances for property testing - lazily instantiated by +// AccountImmutabilityPolicyProperties_STATUSGenerator() +var accountImmutabilityPolicyProperties_STATUSGenerator gopter.Gen + +// AccountImmutabilityPolicyProperties_STATUSGenerator returns a generator of AccountImmutabilityPolicyProperties_STATUS instances for property testing. +func AccountImmutabilityPolicyProperties_STATUSGenerator() gopter.Gen { + if accountImmutabilityPolicyProperties_STATUSGenerator != nil { + return accountImmutabilityPolicyProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_STATUS(generators) + accountImmutabilityPolicyProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(AccountImmutabilityPolicyProperties_STATUS{}), generators) + + return accountImmutabilityPolicyProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_STATUS(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWrites"] = gen.PtrOf(gen.Bool()) + gens["ImmutabilityPeriodSinceCreationInDays"] = gen.PtrOf(gen.Int()) + gens["State"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ActiveDirectoryProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ActiveDirectoryProperties via JSON returns original", + prop.ForAll(RunJSONSerializationTestForActiveDirectoryProperties, ActiveDirectoryPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForActiveDirectoryProperties runs a test to see if a specific instance of ActiveDirectoryProperties round trips to JSON and back losslessly +func RunJSONSerializationTestForActiveDirectoryProperties(subject ActiveDirectoryProperties) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ActiveDirectoryProperties + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ActiveDirectoryProperties instances for property testing - lazily instantiated by +// ActiveDirectoryPropertiesGenerator() +var activeDirectoryPropertiesGenerator gopter.Gen + +// ActiveDirectoryPropertiesGenerator returns a generator of ActiveDirectoryProperties instances for property testing. +func ActiveDirectoryPropertiesGenerator() gopter.Gen { + if activeDirectoryPropertiesGenerator != nil { + return activeDirectoryPropertiesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForActiveDirectoryProperties(generators) + activeDirectoryPropertiesGenerator = gen.Struct(reflect.TypeOf(ActiveDirectoryProperties{}), generators) + + return activeDirectoryPropertiesGenerator +} + +// AddIndependentPropertyGeneratorsForActiveDirectoryProperties is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForActiveDirectoryProperties(gens map[string]gopter.Gen) { + gens["AccountType"] = gen.PtrOf(gen.AlphaString()) + gens["AzureStorageSid"] = gen.PtrOf(gen.AlphaString()) + gens["DomainGuid"] = gen.PtrOf(gen.AlphaString()) + gens["DomainName"] = gen.PtrOf(gen.AlphaString()) + gens["DomainSid"] = gen.PtrOf(gen.AlphaString()) + gens["ForestName"] = gen.PtrOf(gen.AlphaString()) + gens["NetBiosDomainName"] = gen.PtrOf(gen.AlphaString()) + gens["SamAccountName"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ActiveDirectoryProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ActiveDirectoryProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForActiveDirectoryProperties_STATUS, ActiveDirectoryProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForActiveDirectoryProperties_STATUS runs a test to see if a specific instance of ActiveDirectoryProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForActiveDirectoryProperties_STATUS(subject ActiveDirectoryProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ActiveDirectoryProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ActiveDirectoryProperties_STATUS instances for property testing - lazily instantiated by +// ActiveDirectoryProperties_STATUSGenerator() +var activeDirectoryProperties_STATUSGenerator gopter.Gen + +// ActiveDirectoryProperties_STATUSGenerator returns a generator of ActiveDirectoryProperties_STATUS instances for property testing. +func ActiveDirectoryProperties_STATUSGenerator() gopter.Gen { + if activeDirectoryProperties_STATUSGenerator != nil { + return activeDirectoryProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForActiveDirectoryProperties_STATUS(generators) + activeDirectoryProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(ActiveDirectoryProperties_STATUS{}), generators) + + return activeDirectoryProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForActiveDirectoryProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForActiveDirectoryProperties_STATUS(gens map[string]gopter.Gen) { + gens["AccountType"] = gen.PtrOf(gen.AlphaString()) + gens["AzureStorageSid"] = gen.PtrOf(gen.AlphaString()) + gens["DomainGuid"] = gen.PtrOf(gen.AlphaString()) + gens["DomainName"] = gen.PtrOf(gen.AlphaString()) + gens["DomainSid"] = gen.PtrOf(gen.AlphaString()) + gens["ForestName"] = gen.PtrOf(gen.AlphaString()) + gens["NetBiosDomainName"] = gen.PtrOf(gen.AlphaString()) + gens["SamAccountName"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_BlobRestoreParameters_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of BlobRestoreParameters_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForBlobRestoreParameters_STATUS, BlobRestoreParameters_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForBlobRestoreParameters_STATUS runs a test to see if a specific instance of BlobRestoreParameters_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForBlobRestoreParameters_STATUS(subject BlobRestoreParameters_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual BlobRestoreParameters_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of BlobRestoreParameters_STATUS instances for property testing - lazily instantiated by +// BlobRestoreParameters_STATUSGenerator() +var blobRestoreParameters_STATUSGenerator gopter.Gen + +// BlobRestoreParameters_STATUSGenerator returns a generator of BlobRestoreParameters_STATUS instances for property testing. +// We first initialize blobRestoreParameters_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func BlobRestoreParameters_STATUSGenerator() gopter.Gen { + if blobRestoreParameters_STATUSGenerator != nil { + return blobRestoreParameters_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreParameters_STATUS(generators) + blobRestoreParameters_STATUSGenerator = gen.Struct(reflect.TypeOf(BlobRestoreParameters_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreParameters_STATUS(generators) + AddRelatedPropertyGeneratorsForBlobRestoreParameters_STATUS(generators) + blobRestoreParameters_STATUSGenerator = gen.Struct(reflect.TypeOf(BlobRestoreParameters_STATUS{}), generators) + + return blobRestoreParameters_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForBlobRestoreParameters_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForBlobRestoreParameters_STATUS(gens map[string]gopter.Gen) { + gens["TimeToRestore"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForBlobRestoreParameters_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForBlobRestoreParameters_STATUS(gens map[string]gopter.Gen) { + gens["BlobRanges"] = gen.SliceOf(BlobRestoreRange_STATUSGenerator()) +} + +func Test_EncryptionIdentity_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionIdentity via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionIdentity, EncryptionIdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionIdentity runs a test to see if a specific instance of EncryptionIdentity round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionIdentity(subject EncryptionIdentity) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionIdentity + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionIdentity instances for property testing - lazily instantiated by EncryptionIdentityGenerator() +var encryptionIdentityGenerator gopter.Gen + +// EncryptionIdentityGenerator returns a generator of EncryptionIdentity instances for property testing. +func EncryptionIdentityGenerator() gopter.Gen { + if encryptionIdentityGenerator != nil { + return encryptionIdentityGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionIdentity(generators) + encryptionIdentityGenerator = gen.Struct(reflect.TypeOf(EncryptionIdentity{}), generators) + + return encryptionIdentityGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionIdentity is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionIdentity(gens map[string]gopter.Gen) { + gens["FederatedIdentityClientId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionIdentity_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionIdentity_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionIdentity_STATUS, EncryptionIdentity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionIdentity_STATUS runs a test to see if a specific instance of EncryptionIdentity_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionIdentity_STATUS(subject EncryptionIdentity_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionIdentity_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionIdentity_STATUS instances for property testing - lazily instantiated by +// EncryptionIdentity_STATUSGenerator() +var encryptionIdentity_STATUSGenerator gopter.Gen + +// EncryptionIdentity_STATUSGenerator returns a generator of EncryptionIdentity_STATUS instances for property testing. +func EncryptionIdentity_STATUSGenerator() gopter.Gen { + if encryptionIdentity_STATUSGenerator != nil { + return encryptionIdentity_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionIdentity_STATUS(generators) + encryptionIdentity_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionIdentity_STATUS{}), generators) + + return encryptionIdentity_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionIdentity_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionIdentity_STATUS(gens map[string]gopter.Gen) { + gens["FederatedIdentityClientId"] = gen.PtrOf(gen.AlphaString()) + gens["UserAssignedIdentity"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionServices_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionServices via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionServices, EncryptionServicesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionServices runs a test to see if a specific instance of EncryptionServices round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionServices(subject EncryptionServices) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionServices + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionServices instances for property testing - lazily instantiated by EncryptionServicesGenerator() +var encryptionServicesGenerator gopter.Gen + +// EncryptionServicesGenerator returns a generator of EncryptionServices instances for property testing. +func EncryptionServicesGenerator() gopter.Gen { + if encryptionServicesGenerator != nil { + return encryptionServicesGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForEncryptionServices(generators) + encryptionServicesGenerator = gen.Struct(reflect.TypeOf(EncryptionServices{}), generators) + + return encryptionServicesGenerator +} + +// AddRelatedPropertyGeneratorsForEncryptionServices is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionServices(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(EncryptionServiceGenerator()) + gens["File"] = gen.PtrOf(EncryptionServiceGenerator()) + gens["Queue"] = gen.PtrOf(EncryptionServiceGenerator()) + gens["Table"] = gen.PtrOf(EncryptionServiceGenerator()) +} + +func Test_EncryptionServices_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionServices_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionServices_STATUS, EncryptionServices_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionServices_STATUS runs a test to see if a specific instance of EncryptionServices_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionServices_STATUS(subject EncryptionServices_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionServices_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionServices_STATUS instances for property testing - lazily instantiated by +// EncryptionServices_STATUSGenerator() +var encryptionServices_STATUSGenerator gopter.Gen + +// EncryptionServices_STATUSGenerator returns a generator of EncryptionServices_STATUS instances for property testing. +func EncryptionServices_STATUSGenerator() gopter.Gen { + if encryptionServices_STATUSGenerator != nil { + return encryptionServices_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForEncryptionServices_STATUS(generators) + encryptionServices_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionServices_STATUS{}), generators) + + return encryptionServices_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForEncryptionServices_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionServices_STATUS(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(EncryptionService_STATUSGenerator()) + gens["File"] = gen.PtrOf(EncryptionService_STATUSGenerator()) + gens["Queue"] = gen.PtrOf(EncryptionService_STATUSGenerator()) + gens["Table"] = gen.PtrOf(EncryptionService_STATUSGenerator()) +} + +func Test_IPRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of IPRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIPRule, IPRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIPRule runs a test to see if a specific instance of IPRule round trips to JSON and back losslessly +func RunJSONSerializationTestForIPRule(subject IPRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual IPRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of IPRule instances for property testing - lazily instantiated by IPRuleGenerator() +var ipRuleGenerator gopter.Gen + +// IPRuleGenerator returns a generator of IPRule instances for property testing. +func IPRuleGenerator() gopter.Gen { + if ipRuleGenerator != nil { + return ipRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIPRule(generators) + ipRuleGenerator = gen.Struct(reflect.TypeOf(IPRule{}), generators) + + return ipRuleGenerator +} + +// AddIndependentPropertyGeneratorsForIPRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIPRule(gens map[string]gopter.Gen) { + gens["Action"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_IPRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of IPRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIPRule_STATUS, IPRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIPRule_STATUS runs a test to see if a specific instance of IPRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForIPRule_STATUS(subject IPRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual IPRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of IPRule_STATUS instances for property testing - lazily instantiated by IPRule_STATUSGenerator() +var ipRule_STATUSGenerator gopter.Gen + +// IPRule_STATUSGenerator returns a generator of IPRule_STATUS instances for property testing. +func IPRule_STATUSGenerator() gopter.Gen { + if ipRule_STATUSGenerator != nil { + return ipRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIPRule_STATUS(generators) + ipRule_STATUSGenerator = gen.Struct(reflect.TypeOf(IPRule_STATUS{}), generators) + + return ipRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForIPRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIPRule_STATUS(gens map[string]gopter.Gen) { + gens["Action"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_KeyVaultProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyVaultProperties via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyVaultProperties, KeyVaultPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyVaultProperties runs a test to see if a specific instance of KeyVaultProperties round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyVaultProperties(subject KeyVaultProperties) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyVaultProperties + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyVaultProperties instances for property testing - lazily instantiated by KeyVaultPropertiesGenerator() +var keyVaultPropertiesGenerator gopter.Gen + +// KeyVaultPropertiesGenerator returns a generator of KeyVaultProperties instances for property testing. +func KeyVaultPropertiesGenerator() gopter.Gen { + if keyVaultPropertiesGenerator != nil { + return keyVaultPropertiesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyVaultProperties(generators) + keyVaultPropertiesGenerator = gen.Struct(reflect.TypeOf(KeyVaultProperties{}), generators) + + return keyVaultPropertiesGenerator +} + +// AddIndependentPropertyGeneratorsForKeyVaultProperties is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyVaultProperties(gens map[string]gopter.Gen) { + gens["Keyname"] = gen.PtrOf(gen.AlphaString()) + gens["Keyvaulturi"] = gen.PtrOf(gen.AlphaString()) + gens["Keyversion"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_KeyVaultProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyVaultProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyVaultProperties_STATUS, KeyVaultProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyVaultProperties_STATUS runs a test to see if a specific instance of KeyVaultProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyVaultProperties_STATUS(subject KeyVaultProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyVaultProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyVaultProperties_STATUS instances for property testing - lazily instantiated by +// KeyVaultProperties_STATUSGenerator() +var keyVaultProperties_STATUSGenerator gopter.Gen + +// KeyVaultProperties_STATUSGenerator returns a generator of KeyVaultProperties_STATUS instances for property testing. +func KeyVaultProperties_STATUSGenerator() gopter.Gen { + if keyVaultProperties_STATUSGenerator != nil { + return keyVaultProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyVaultProperties_STATUS(generators) + keyVaultProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(KeyVaultProperties_STATUS{}), generators) + + return keyVaultProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForKeyVaultProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyVaultProperties_STATUS(gens map[string]gopter.Gen) { + gens["CurrentVersionedKeyExpirationTimestamp"] = gen.PtrOf(gen.AlphaString()) + gens["CurrentVersionedKeyIdentifier"] = gen.PtrOf(gen.AlphaString()) + gens["Keyname"] = gen.PtrOf(gen.AlphaString()) + gens["Keyvaulturi"] = gen.PtrOf(gen.AlphaString()) + gens["Keyversion"] = gen.PtrOf(gen.AlphaString()) + gens["LastKeyRotationTimestamp"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ResourceAccessRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ResourceAccessRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForResourceAccessRule, ResourceAccessRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForResourceAccessRule runs a test to see if a specific instance of ResourceAccessRule round trips to JSON and back losslessly +func RunJSONSerializationTestForResourceAccessRule(subject ResourceAccessRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ResourceAccessRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ResourceAccessRule instances for property testing - lazily instantiated by ResourceAccessRuleGenerator() +var resourceAccessRuleGenerator gopter.Gen + +// ResourceAccessRuleGenerator returns a generator of ResourceAccessRule instances for property testing. +func ResourceAccessRuleGenerator() gopter.Gen { + if resourceAccessRuleGenerator != nil { + return resourceAccessRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForResourceAccessRule(generators) + resourceAccessRuleGenerator = gen.Struct(reflect.TypeOf(ResourceAccessRule{}), generators) + + return resourceAccessRuleGenerator +} + +// AddIndependentPropertyGeneratorsForResourceAccessRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForResourceAccessRule(gens map[string]gopter.Gen) { + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ResourceAccessRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ResourceAccessRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForResourceAccessRule_STATUS, ResourceAccessRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForResourceAccessRule_STATUS runs a test to see if a specific instance of ResourceAccessRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForResourceAccessRule_STATUS(subject ResourceAccessRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ResourceAccessRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ResourceAccessRule_STATUS instances for property testing - lazily instantiated by +// ResourceAccessRule_STATUSGenerator() +var resourceAccessRule_STATUSGenerator gopter.Gen + +// ResourceAccessRule_STATUSGenerator returns a generator of ResourceAccessRule_STATUS instances for property testing. +func ResourceAccessRule_STATUSGenerator() gopter.Gen { + if resourceAccessRule_STATUSGenerator != nil { + return resourceAccessRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForResourceAccessRule_STATUS(generators) + resourceAccessRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ResourceAccessRule_STATUS{}), generators) + + return resourceAccessRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForResourceAccessRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForResourceAccessRule_STATUS(gens map[string]gopter.Gen) { + gens["ResourceId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_StorageAccountInternetEndpoints_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountInternetEndpoints_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountInternetEndpoints_STATUS, StorageAccountInternetEndpoints_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountInternetEndpoints_STATUS runs a test to see if a specific instance of StorageAccountInternetEndpoints_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountInternetEndpoints_STATUS(subject StorageAccountInternetEndpoints_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountInternetEndpoints_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountInternetEndpoints_STATUS instances for property testing - lazily instantiated by +// StorageAccountInternetEndpoints_STATUSGenerator() +var storageAccountInternetEndpoints_STATUSGenerator gopter.Gen + +// StorageAccountInternetEndpoints_STATUSGenerator returns a generator of StorageAccountInternetEndpoints_STATUS instances for property testing. +func StorageAccountInternetEndpoints_STATUSGenerator() gopter.Gen { + if storageAccountInternetEndpoints_STATUSGenerator != nil { + return storageAccountInternetEndpoints_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountInternetEndpoints_STATUS(generators) + storageAccountInternetEndpoints_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccountInternetEndpoints_STATUS{}), generators) + + return storageAccountInternetEndpoints_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccountInternetEndpoints_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccountInternetEndpoints_STATUS(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(gen.AlphaString()) + gens["Dfs"] = gen.PtrOf(gen.AlphaString()) + gens["File"] = gen.PtrOf(gen.AlphaString()) + gens["Web"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_StorageAccountMicrosoftEndpoints_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountMicrosoftEndpoints_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountMicrosoftEndpoints_STATUS, StorageAccountMicrosoftEndpoints_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountMicrosoftEndpoints_STATUS runs a test to see if a specific instance of StorageAccountMicrosoftEndpoints_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountMicrosoftEndpoints_STATUS(subject StorageAccountMicrosoftEndpoints_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountMicrosoftEndpoints_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountMicrosoftEndpoints_STATUS instances for property testing - lazily instantiated by +// StorageAccountMicrosoftEndpoints_STATUSGenerator() +var storageAccountMicrosoftEndpoints_STATUSGenerator gopter.Gen + +// StorageAccountMicrosoftEndpoints_STATUSGenerator returns a generator of StorageAccountMicrosoftEndpoints_STATUS instances for property testing. +func StorageAccountMicrosoftEndpoints_STATUSGenerator() gopter.Gen { + if storageAccountMicrosoftEndpoints_STATUSGenerator != nil { + return storageAccountMicrosoftEndpoints_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountMicrosoftEndpoints_STATUS(generators) + storageAccountMicrosoftEndpoints_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccountMicrosoftEndpoints_STATUS{}), generators) + + return storageAccountMicrosoftEndpoints_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccountMicrosoftEndpoints_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccountMicrosoftEndpoints_STATUS(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(gen.AlphaString()) + gens["Dfs"] = gen.PtrOf(gen.AlphaString()) + gens["File"] = gen.PtrOf(gen.AlphaString()) + gens["Queue"] = gen.PtrOf(gen.AlphaString()) + gens["Table"] = gen.PtrOf(gen.AlphaString()) + gens["Web"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_StorageAccountOperatorConfigMaps_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountOperatorConfigMaps via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountOperatorConfigMaps, StorageAccountOperatorConfigMapsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountOperatorConfigMaps runs a test to see if a specific instance of StorageAccountOperatorConfigMaps round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountOperatorConfigMaps(subject StorageAccountOperatorConfigMaps) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountOperatorConfigMaps + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountOperatorConfigMaps instances for property testing - lazily instantiated by +// StorageAccountOperatorConfigMapsGenerator() +var storageAccountOperatorConfigMapsGenerator gopter.Gen + +// StorageAccountOperatorConfigMapsGenerator returns a generator of StorageAccountOperatorConfigMaps instances for property testing. +func StorageAccountOperatorConfigMapsGenerator() gopter.Gen { + if storageAccountOperatorConfigMapsGenerator != nil { + return storageAccountOperatorConfigMapsGenerator + } + + generators := make(map[string]gopter.Gen) + storageAccountOperatorConfigMapsGenerator = gen.Struct(reflect.TypeOf(StorageAccountOperatorConfigMaps{}), generators) + + return storageAccountOperatorConfigMapsGenerator +} + +func Test_StorageAccountOperatorSecrets_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountOperatorSecrets via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountOperatorSecrets, StorageAccountOperatorSecretsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountOperatorSecrets runs a test to see if a specific instance of StorageAccountOperatorSecrets round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountOperatorSecrets(subject StorageAccountOperatorSecrets) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountOperatorSecrets + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountOperatorSecrets instances for property testing - lazily instantiated by +// StorageAccountOperatorSecretsGenerator() +var storageAccountOperatorSecretsGenerator gopter.Gen + +// StorageAccountOperatorSecretsGenerator returns a generator of StorageAccountOperatorSecrets instances for property testing. +func StorageAccountOperatorSecretsGenerator() gopter.Gen { + if storageAccountOperatorSecretsGenerator != nil { + return storageAccountOperatorSecretsGenerator + } + + generators := make(map[string]gopter.Gen) + storageAccountOperatorSecretsGenerator = gen.Struct(reflect.TypeOf(StorageAccountOperatorSecrets{}), generators) + + return storageAccountOperatorSecretsGenerator +} + +func Test_UserAssignedIdentity_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of UserAssignedIdentity_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserAssignedIdentity_STATUS, UserAssignedIdentity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserAssignedIdentity_STATUS runs a test to see if a specific instance of UserAssignedIdentity_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForUserAssignedIdentity_STATUS(subject UserAssignedIdentity_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserAssignedIdentity_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of UserAssignedIdentity_STATUS instances for property testing - lazily instantiated by +// UserAssignedIdentity_STATUSGenerator() +var userAssignedIdentity_STATUSGenerator gopter.Gen + +// UserAssignedIdentity_STATUSGenerator returns a generator of UserAssignedIdentity_STATUS instances for property testing. +func UserAssignedIdentity_STATUSGenerator() gopter.Gen { + if userAssignedIdentity_STATUSGenerator != nil { + return userAssignedIdentity_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForUserAssignedIdentity_STATUS(generators) + userAssignedIdentity_STATUSGenerator = gen.Struct(reflect.TypeOf(UserAssignedIdentity_STATUS{}), generators) + + return userAssignedIdentity_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForUserAssignedIdentity_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForUserAssignedIdentity_STATUS(gens map[string]gopter.Gen) { + gens["ClientId"] = gen.PtrOf(gen.AlphaString()) + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_UserAssignedIdentityDetails_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of UserAssignedIdentityDetails via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserAssignedIdentityDetails runs a test to see if a specific instance of UserAssignedIdentityDetails round trips to JSON and back losslessly +func RunJSONSerializationTestForUserAssignedIdentityDetails(subject UserAssignedIdentityDetails) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserAssignedIdentityDetails + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of UserAssignedIdentityDetails instances for property testing - lazily instantiated by +// UserAssignedIdentityDetailsGenerator() +var userAssignedIdentityDetailsGenerator gopter.Gen + +// UserAssignedIdentityDetailsGenerator returns a generator of UserAssignedIdentityDetails instances for property testing. +func UserAssignedIdentityDetailsGenerator() gopter.Gen { + if userAssignedIdentityDetailsGenerator != nil { + return userAssignedIdentityDetailsGenerator + } + + generators := make(map[string]gopter.Gen) + userAssignedIdentityDetailsGenerator = gen.Struct(reflect.TypeOf(UserAssignedIdentityDetails{}), generators) + + return userAssignedIdentityDetailsGenerator +} + +func Test_VirtualNetworkRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VirtualNetworkRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule, VirtualNetworkRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVirtualNetworkRule runs a test to see if a specific instance of VirtualNetworkRule round trips to JSON and back losslessly +func RunJSONSerializationTestForVirtualNetworkRule(subject VirtualNetworkRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VirtualNetworkRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VirtualNetworkRule instances for property testing - lazily instantiated by VirtualNetworkRuleGenerator() +var virtualNetworkRuleGenerator gopter.Gen + +// VirtualNetworkRuleGenerator returns a generator of VirtualNetworkRule instances for property testing. +func VirtualNetworkRuleGenerator() gopter.Gen { + if virtualNetworkRuleGenerator != nil { + return virtualNetworkRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVirtualNetworkRule(generators) + virtualNetworkRuleGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule{}), generators) + + return virtualNetworkRuleGenerator +} + +// AddIndependentPropertyGeneratorsForVirtualNetworkRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVirtualNetworkRule(gens map[string]gopter.Gen) { + gens["Action"] = gen.PtrOf(gen.AlphaString()) + gens["State"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_VirtualNetworkRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VirtualNetworkRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule_STATUS, VirtualNetworkRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVirtualNetworkRule_STATUS runs a test to see if a specific instance of VirtualNetworkRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForVirtualNetworkRule_STATUS(subject VirtualNetworkRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VirtualNetworkRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VirtualNetworkRule_STATUS instances for property testing - lazily instantiated by +// VirtualNetworkRule_STATUSGenerator() +var virtualNetworkRule_STATUSGenerator gopter.Gen + +// VirtualNetworkRule_STATUSGenerator returns a generator of VirtualNetworkRule_STATUS instances for property testing. +func VirtualNetworkRule_STATUSGenerator() gopter.Gen { + if virtualNetworkRule_STATUSGenerator != nil { + return virtualNetworkRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS(generators) + virtualNetworkRule_STATUSGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule_STATUS{}), generators) + + return virtualNetworkRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS(gens map[string]gopter.Gen) { + gens["Action"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["State"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_BlobRestoreRange_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of BlobRestoreRange_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForBlobRestoreRange_STATUS, BlobRestoreRange_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForBlobRestoreRange_STATUS runs a test to see if a specific instance of BlobRestoreRange_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForBlobRestoreRange_STATUS(subject BlobRestoreRange_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual BlobRestoreRange_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of BlobRestoreRange_STATUS instances for property testing - lazily instantiated by +// BlobRestoreRange_STATUSGenerator() +var blobRestoreRange_STATUSGenerator gopter.Gen + +// BlobRestoreRange_STATUSGenerator returns a generator of BlobRestoreRange_STATUS instances for property testing. +func BlobRestoreRange_STATUSGenerator() gopter.Gen { + if blobRestoreRange_STATUSGenerator != nil { + return blobRestoreRange_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreRange_STATUS(generators) + blobRestoreRange_STATUSGenerator = gen.Struct(reflect.TypeOf(BlobRestoreRange_STATUS{}), generators) + + return blobRestoreRange_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForBlobRestoreRange_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForBlobRestoreRange_STATUS(gens map[string]gopter.Gen) { + gens["EndRange"] = gen.PtrOf(gen.AlphaString()) + gens["StartRange"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionService via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionService, EncryptionServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionService runs a test to see if a specific instance of EncryptionService round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionService(subject EncryptionService) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionService + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionService instances for property testing - lazily instantiated by EncryptionServiceGenerator() +var encryptionServiceGenerator gopter.Gen + +// EncryptionServiceGenerator returns a generator of EncryptionService instances for property testing. +func EncryptionServiceGenerator() gopter.Gen { + if encryptionServiceGenerator != nil { + return encryptionServiceGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionService(generators) + encryptionServiceGenerator = gen.Struct(reflect.TypeOf(EncryptionService{}), generators) + + return encryptionServiceGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionService is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionService(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["KeyType"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionService_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionService_STATUS, EncryptionService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionService_STATUS runs a test to see if a specific instance of EncryptionService_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionService_STATUS(subject EncryptionService_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionService_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionService_STATUS instances for property testing - lazily instantiated by +// EncryptionService_STATUSGenerator() +var encryptionService_STATUSGenerator gopter.Gen + +// EncryptionService_STATUSGenerator returns a generator of EncryptionService_STATUS instances for property testing. +func EncryptionService_STATUSGenerator() gopter.Gen { + if encryptionService_STATUSGenerator != nil { + return encryptionService_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionService_STATUS(generators) + encryptionService_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionService_STATUS{}), generators) + + return encryptionService_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionService_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionService_STATUS(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["KeyType"] = gen.PtrOf(gen.AlphaString()) + gens["LastEnabledTime"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_blob_service_types_gen.go b/v2/api/storage/v1api20230101/storage/storage_accounts_blob_service_types_gen.go new file mode 100644 index 00000000000..0a0c76026d5 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_blob_service_types_gen.go @@ -0,0 +1,330 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsblobservices,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsblobservices/status,storageaccountsblobservices/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Storage version of v1api20230101.StorageAccountsBlobService +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/blob.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default +type StorageAccountsBlobService struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_BlobService_Spec `json:"spec,omitempty"` + Status StorageAccounts_BlobService_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsBlobService{} + +// GetConditions returns the conditions of the resource +func (service *StorageAccountsBlobService) GetConditions() conditions.Conditions { + return service.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (service *StorageAccountsBlobService) SetConditions(conditions conditions.Conditions) { + service.Status.Conditions = conditions +} + +var _ genruntime.KubernetesResource = &StorageAccountsBlobService{} + +// AzureName returns the Azure name of the resource (always "default") +func (service *StorageAccountsBlobService) AzureName() string { + return "default" +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (service StorageAccountsBlobService) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (service *StorageAccountsBlobService) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (service *StorageAccountsBlobService) GetSpec() genruntime.ConvertibleSpec { + return &service.Spec +} + +// GetStatus returns the status of this resource +func (service *StorageAccountsBlobService) GetStatus() genruntime.ConvertibleStatus { + return &service.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (service *StorageAccountsBlobService) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/blobServices" +func (service *StorageAccountsBlobService) GetType() string { + return "Microsoft.Storage/storageAccounts/blobServices" +} + +// NewEmptyStatus returns a new empty (blank) status +func (service *StorageAccountsBlobService) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_BlobService_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (service *StorageAccountsBlobService) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(service.Spec) + return service.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (service *StorageAccountsBlobService) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_BlobService_STATUS); ok { + service.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_BlobService_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + service.Status = st + return nil +} + +// Hub marks that this StorageAccountsBlobService is the hub type for conversion +func (service *StorageAccountsBlobService) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (service *StorageAccountsBlobService) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: service.Spec.OriginalVersion, + Kind: "StorageAccountsBlobService", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20230101.StorageAccountsBlobService +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/blob.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default +type StorageAccountsBlobServiceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsBlobService `json:"items"` +} + +// Storage version of v1api20230101.StorageAccounts_BlobService_Spec +type StorageAccounts_BlobService_Spec struct { + AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` + ChangeFeed *ChangeFeed `json:"changeFeed,omitempty"` + ContainerDeleteRetentionPolicy *DeleteRetentionPolicy `json:"containerDeleteRetentionPolicy,omitempty"` + Cors *CorsRules `json:"cors,omitempty"` + DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"` + DeleteRetentionPolicy *DeleteRetentionPolicy `json:"deleteRetentionPolicy,omitempty"` + IsVersioningEnabled *bool `json:"isVersioningEnabled,omitempty"` + LastAccessTimeTrackingPolicy *LastAccessTimeTrackingPolicy `json:"lastAccessTimeTrackingPolicy,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccount resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccount"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RestorePolicy *RestorePolicyProperties `json:"restorePolicy,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_BlobService_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_BlobService_Spec from the provided source +func (service *StorageAccounts_BlobService_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(service) +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_BlobService_Spec +func (service *StorageAccounts_BlobService_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(service) +} + +// Storage version of v1api20230101.StorageAccounts_BlobService_STATUS +type StorageAccounts_BlobService_STATUS struct { + AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` + ChangeFeed *ChangeFeed_STATUS `json:"changeFeed,omitempty"` + Conditions []conditions.Condition `json:"conditions,omitempty"` + ContainerDeleteRetentionPolicy *DeleteRetentionPolicy_STATUS `json:"containerDeleteRetentionPolicy,omitempty"` + Cors *CorsRules_STATUS `json:"cors,omitempty"` + DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"` + DeleteRetentionPolicy *DeleteRetentionPolicy_STATUS `json:"deleteRetentionPolicy,omitempty"` + Id *string `json:"id,omitempty"` + IsVersioningEnabled *bool `json:"isVersioningEnabled,omitempty"` + LastAccessTimeTrackingPolicy *LastAccessTimeTrackingPolicy_STATUS `json:"lastAccessTimeTrackingPolicy,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RestorePolicy *RestorePolicyProperties_STATUS `json:"restorePolicy,omitempty"` + Sku *Sku_STATUS `json:"sku,omitempty"` + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_BlobService_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_BlobService_STATUS from the provided source +func (service *StorageAccounts_BlobService_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(service) +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_BlobService_STATUS +func (service *StorageAccounts_BlobService_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(service) +} + +// Storage version of v1api20230101.ChangeFeed +// The blob service properties for change feed events. +type ChangeFeed struct { + Enabled *bool `json:"enabled,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RetentionInDays *int `json:"retentionInDays,omitempty"` +} + +// Storage version of v1api20230101.ChangeFeed_STATUS +// The blob service properties for change feed events. +type ChangeFeed_STATUS struct { + Enabled *bool `json:"enabled,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RetentionInDays *int `json:"retentionInDays,omitempty"` +} + +// Storage version of v1api20230101.CorsRules +// Sets the CORS rules. You can include up to five CorsRule elements in the request. +type CorsRules struct { + CorsRules []CorsRule `json:"corsRules,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.CorsRules_STATUS +// Sets the CORS rules. You can include up to five CorsRule elements in the request. +type CorsRules_STATUS struct { + CorsRules []CorsRule_STATUS `json:"corsRules,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.DeleteRetentionPolicy +// The service properties for soft delete. +type DeleteRetentionPolicy struct { + AllowPermanentDelete *bool `json:"allowPermanentDelete,omitempty"` + Days *int `json:"days,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.DeleteRetentionPolicy_STATUS +// The service properties for soft delete. +type DeleteRetentionPolicy_STATUS struct { + AllowPermanentDelete *bool `json:"allowPermanentDelete,omitempty"` + Days *int `json:"days,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.LastAccessTimeTrackingPolicy +// The blob service properties for Last access time based tracking policy. +type LastAccessTimeTrackingPolicy struct { + BlobType []string `json:"blobType,omitempty"` + Enable *bool `json:"enable,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TrackingGranularityInDays *int `json:"trackingGranularityInDays,omitempty"` +} + +// Storage version of v1api20230101.LastAccessTimeTrackingPolicy_STATUS +// The blob service properties for Last access time based tracking policy. +type LastAccessTimeTrackingPolicy_STATUS struct { + BlobType []string `json:"blobType,omitempty"` + Enable *bool `json:"enable,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TrackingGranularityInDays *int `json:"trackingGranularityInDays,omitempty"` +} + +// Storage version of v1api20230101.RestorePolicyProperties +// The blob service properties for blob restore policy +type RestorePolicyProperties struct { + Days *int `json:"days,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.RestorePolicyProperties_STATUS +// The blob service properties for blob restore policy +type RestorePolicyProperties_STATUS struct { + Days *int `json:"days,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + LastEnabledTime *string `json:"lastEnabledTime,omitempty"` + MinRestoreTime *string `json:"minRestoreTime,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.CorsRule +// Specifies a CORS rule for the Blob service. +type CorsRule struct { + AllowedHeaders []string `json:"allowedHeaders,omitempty"` + AllowedMethods []string `json:"allowedMethods,omitempty"` + AllowedOrigins []string `json:"allowedOrigins,omitempty"` + ExposedHeaders []string `json:"exposedHeaders,omitempty"` + MaxAgeInSeconds *int `json:"maxAgeInSeconds,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.CorsRule_STATUS +// Specifies a CORS rule for the Blob service. +type CorsRule_STATUS struct { + AllowedHeaders []string `json:"allowedHeaders,omitempty"` + AllowedMethods []string `json:"allowedMethods,omitempty"` + AllowedOrigins []string `json:"allowedOrigins,omitempty"` + ExposedHeaders []string `json:"exposedHeaders,omitempty"` + MaxAgeInSeconds *int `json:"maxAgeInSeconds,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +func init() { + SchemeBuilder.Register(&StorageAccountsBlobService{}, &StorageAccountsBlobServiceList{}) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_blob_service_types_gen_test.go b/v2/api/storage/v1api20230101/storage/storage_accounts_blob_service_types_gen_test.go new file mode 100644 index 00000000000..88c166a46ab --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_blob_service_types_gen_test.go @@ -0,0 +1,999 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsBlobService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsBlobService via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsBlobService, StorageAccountsBlobServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsBlobService runs a test to see if a specific instance of StorageAccountsBlobService round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsBlobService(subject StorageAccountsBlobService) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsBlobService + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsBlobService instances for property testing - lazily instantiated by +// StorageAccountsBlobServiceGenerator() +var storageAccountsBlobServiceGenerator gopter.Gen + +// StorageAccountsBlobServiceGenerator returns a generator of StorageAccountsBlobService instances for property testing. +func StorageAccountsBlobServiceGenerator() gopter.Gen { + if storageAccountsBlobServiceGenerator != nil { + return storageAccountsBlobServiceGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsBlobService(generators) + storageAccountsBlobServiceGenerator = gen.Struct(reflect.TypeOf(StorageAccountsBlobService{}), generators) + + return storageAccountsBlobServiceGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsBlobService is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsBlobService(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_BlobService_SpecGenerator() + gens["Status"] = StorageAccounts_BlobService_STATUSGenerator() +} + +func Test_StorageAccounts_BlobService_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobService_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobService_Spec, StorageAccounts_BlobService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobService_Spec runs a test to see if a specific instance of StorageAccounts_BlobService_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobService_Spec(subject StorageAccounts_BlobService_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobService_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobService_Spec instances for property testing - lazily instantiated by +// StorageAccounts_BlobService_SpecGenerator() +var storageAccounts_BlobService_SpecGenerator gopter.Gen + +// StorageAccounts_BlobService_SpecGenerator returns a generator of StorageAccounts_BlobService_Spec instances for property testing. +// We first initialize storageAccounts_BlobService_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobService_SpecGenerator() gopter.Gen { + if storageAccounts_BlobService_SpecGenerator != nil { + return storageAccounts_BlobService_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Spec(generators) + storageAccounts_BlobService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Spec(generators) + storageAccounts_BlobService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_Spec{}), generators) + + return storageAccounts_BlobService_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Spec(gens map[string]gopter.Gen) { + gens["AutomaticSnapshotPolicyEnabled"] = gen.PtrOf(gen.Bool()) + gens["DefaultServiceVersion"] = gen.PtrOf(gen.AlphaString()) + gens["IsVersioningEnabled"] = gen.PtrOf(gen.Bool()) + gens["OriginalVersion"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Spec(gens map[string]gopter.Gen) { + gens["ChangeFeed"] = gen.PtrOf(ChangeFeedGenerator()) + gens["ContainerDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicyGenerator()) + gens["Cors"] = gen.PtrOf(CorsRulesGenerator()) + gens["DeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicyGenerator()) + gens["LastAccessTimeTrackingPolicy"] = gen.PtrOf(LastAccessTimeTrackingPolicyGenerator()) + gens["RestorePolicy"] = gen.PtrOf(RestorePolicyPropertiesGenerator()) +} + +func Test_StorageAccounts_BlobService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobService_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobService_STATUS, StorageAccounts_BlobService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobService_STATUS runs a test to see if a specific instance of StorageAccounts_BlobService_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobService_STATUS(subject StorageAccounts_BlobService_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobService_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobService_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_BlobService_STATUSGenerator() +var storageAccounts_BlobService_STATUSGenerator gopter.Gen + +// StorageAccounts_BlobService_STATUSGenerator returns a generator of StorageAccounts_BlobService_STATUS instances for property testing. +// We first initialize storageAccounts_BlobService_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobService_STATUSGenerator() gopter.Gen { + if storageAccounts_BlobService_STATUSGenerator != nil { + return storageAccounts_BlobService_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_STATUS(generators) + storageAccounts_BlobService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_STATUS(generators) + storageAccounts_BlobService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_STATUS{}), generators) + + return storageAccounts_BlobService_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_STATUS(gens map[string]gopter.Gen) { + gens["AutomaticSnapshotPolicyEnabled"] = gen.PtrOf(gen.Bool()) + gens["DefaultServiceVersion"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["IsVersioningEnabled"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_STATUS(gens map[string]gopter.Gen) { + gens["ChangeFeed"] = gen.PtrOf(ChangeFeed_STATUSGenerator()) + gens["ContainerDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicy_STATUSGenerator()) + gens["Cors"] = gen.PtrOf(CorsRules_STATUSGenerator()) + gens["DeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicy_STATUSGenerator()) + gens["LastAccessTimeTrackingPolicy"] = gen.PtrOf(LastAccessTimeTrackingPolicy_STATUSGenerator()) + gens["RestorePolicy"] = gen.PtrOf(RestorePolicyProperties_STATUSGenerator()) + gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator()) +} + +func Test_ChangeFeed_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ChangeFeed via JSON returns original", + prop.ForAll(RunJSONSerializationTestForChangeFeed, ChangeFeedGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForChangeFeed runs a test to see if a specific instance of ChangeFeed round trips to JSON and back losslessly +func RunJSONSerializationTestForChangeFeed(subject ChangeFeed) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ChangeFeed + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ChangeFeed instances for property testing - lazily instantiated by ChangeFeedGenerator() +var changeFeedGenerator gopter.Gen + +// ChangeFeedGenerator returns a generator of ChangeFeed instances for property testing. +func ChangeFeedGenerator() gopter.Gen { + if changeFeedGenerator != nil { + return changeFeedGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForChangeFeed(generators) + changeFeedGenerator = gen.Struct(reflect.TypeOf(ChangeFeed{}), generators) + + return changeFeedGenerator +} + +// AddIndependentPropertyGeneratorsForChangeFeed is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForChangeFeed(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["RetentionInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_ChangeFeed_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ChangeFeed_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForChangeFeed_STATUS, ChangeFeed_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForChangeFeed_STATUS runs a test to see if a specific instance of ChangeFeed_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForChangeFeed_STATUS(subject ChangeFeed_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ChangeFeed_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ChangeFeed_STATUS instances for property testing - lazily instantiated by ChangeFeed_STATUSGenerator() +var changeFeed_STATUSGenerator gopter.Gen + +// ChangeFeed_STATUSGenerator returns a generator of ChangeFeed_STATUS instances for property testing. +func ChangeFeed_STATUSGenerator() gopter.Gen { + if changeFeed_STATUSGenerator != nil { + return changeFeed_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForChangeFeed_STATUS(generators) + changeFeed_STATUSGenerator = gen.Struct(reflect.TypeOf(ChangeFeed_STATUS{}), generators) + + return changeFeed_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForChangeFeed_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForChangeFeed_STATUS(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["RetentionInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_CorsRules_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CorsRules via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCorsRules, CorsRulesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCorsRules runs a test to see if a specific instance of CorsRules round trips to JSON and back losslessly +func RunJSONSerializationTestForCorsRules(subject CorsRules) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CorsRules + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CorsRules instances for property testing - lazily instantiated by CorsRulesGenerator() +var corsRulesGenerator gopter.Gen + +// CorsRulesGenerator returns a generator of CorsRules instances for property testing. +func CorsRulesGenerator() gopter.Gen { + if corsRulesGenerator != nil { + return corsRulesGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForCorsRules(generators) + corsRulesGenerator = gen.Struct(reflect.TypeOf(CorsRules{}), generators) + + return corsRulesGenerator +} + +// AddRelatedPropertyGeneratorsForCorsRules is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForCorsRules(gens map[string]gopter.Gen) { + gens["CorsRules"] = gen.SliceOf(CorsRuleGenerator()) +} + +func Test_CorsRules_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CorsRules_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCorsRules_STATUS, CorsRules_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCorsRules_STATUS runs a test to see if a specific instance of CorsRules_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForCorsRules_STATUS(subject CorsRules_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CorsRules_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CorsRules_STATUS instances for property testing - lazily instantiated by CorsRules_STATUSGenerator() +var corsRules_STATUSGenerator gopter.Gen + +// CorsRules_STATUSGenerator returns a generator of CorsRules_STATUS instances for property testing. +func CorsRules_STATUSGenerator() gopter.Gen { + if corsRules_STATUSGenerator != nil { + return corsRules_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForCorsRules_STATUS(generators) + corsRules_STATUSGenerator = gen.Struct(reflect.TypeOf(CorsRules_STATUS{}), generators) + + return corsRules_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForCorsRules_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForCorsRules_STATUS(gens map[string]gopter.Gen) { + gens["CorsRules"] = gen.SliceOf(CorsRule_STATUSGenerator()) +} + +func Test_DeleteRetentionPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DeleteRetentionPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDeleteRetentionPolicy, DeleteRetentionPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDeleteRetentionPolicy runs a test to see if a specific instance of DeleteRetentionPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForDeleteRetentionPolicy(subject DeleteRetentionPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DeleteRetentionPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DeleteRetentionPolicy instances for property testing - lazily instantiated by +// DeleteRetentionPolicyGenerator() +var deleteRetentionPolicyGenerator gopter.Gen + +// DeleteRetentionPolicyGenerator returns a generator of DeleteRetentionPolicy instances for property testing. +func DeleteRetentionPolicyGenerator() gopter.Gen { + if deleteRetentionPolicyGenerator != nil { + return deleteRetentionPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDeleteRetentionPolicy(generators) + deleteRetentionPolicyGenerator = gen.Struct(reflect.TypeOf(DeleteRetentionPolicy{}), generators) + + return deleteRetentionPolicyGenerator +} + +// AddIndependentPropertyGeneratorsForDeleteRetentionPolicy is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDeleteRetentionPolicy(gens map[string]gopter.Gen) { + gens["AllowPermanentDelete"] = gen.PtrOf(gen.Bool()) + gens["Days"] = gen.PtrOf(gen.Int()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_DeleteRetentionPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DeleteRetentionPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDeleteRetentionPolicy_STATUS, DeleteRetentionPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDeleteRetentionPolicy_STATUS runs a test to see if a specific instance of DeleteRetentionPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForDeleteRetentionPolicy_STATUS(subject DeleteRetentionPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DeleteRetentionPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DeleteRetentionPolicy_STATUS instances for property testing - lazily instantiated by +// DeleteRetentionPolicy_STATUSGenerator() +var deleteRetentionPolicy_STATUSGenerator gopter.Gen + +// DeleteRetentionPolicy_STATUSGenerator returns a generator of DeleteRetentionPolicy_STATUS instances for property testing. +func DeleteRetentionPolicy_STATUSGenerator() gopter.Gen { + if deleteRetentionPolicy_STATUSGenerator != nil { + return deleteRetentionPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_STATUS(generators) + deleteRetentionPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(DeleteRetentionPolicy_STATUS{}), generators) + + return deleteRetentionPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_STATUS(gens map[string]gopter.Gen) { + gens["AllowPermanentDelete"] = gen.PtrOf(gen.Bool()) + gens["Days"] = gen.PtrOf(gen.Int()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_LastAccessTimeTrackingPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of LastAccessTimeTrackingPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForLastAccessTimeTrackingPolicy, LastAccessTimeTrackingPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForLastAccessTimeTrackingPolicy runs a test to see if a specific instance of LastAccessTimeTrackingPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForLastAccessTimeTrackingPolicy(subject LastAccessTimeTrackingPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual LastAccessTimeTrackingPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of LastAccessTimeTrackingPolicy instances for property testing - lazily instantiated by +// LastAccessTimeTrackingPolicyGenerator() +var lastAccessTimeTrackingPolicyGenerator gopter.Gen + +// LastAccessTimeTrackingPolicyGenerator returns a generator of LastAccessTimeTrackingPolicy instances for property testing. +func LastAccessTimeTrackingPolicyGenerator() gopter.Gen { + if lastAccessTimeTrackingPolicyGenerator != nil { + return lastAccessTimeTrackingPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy(generators) + lastAccessTimeTrackingPolicyGenerator = gen.Struct(reflect.TypeOf(LastAccessTimeTrackingPolicy{}), generators) + + return lastAccessTimeTrackingPolicyGenerator +} + +// AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy(gens map[string]gopter.Gen) { + gens["BlobType"] = gen.SliceOf(gen.AlphaString()) + gens["Enable"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["TrackingGranularityInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_LastAccessTimeTrackingPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of LastAccessTimeTrackingPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForLastAccessTimeTrackingPolicy_STATUS, LastAccessTimeTrackingPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForLastAccessTimeTrackingPolicy_STATUS runs a test to see if a specific instance of LastAccessTimeTrackingPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForLastAccessTimeTrackingPolicy_STATUS(subject LastAccessTimeTrackingPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual LastAccessTimeTrackingPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of LastAccessTimeTrackingPolicy_STATUS instances for property testing - lazily instantiated by +// LastAccessTimeTrackingPolicy_STATUSGenerator() +var lastAccessTimeTrackingPolicy_STATUSGenerator gopter.Gen + +// LastAccessTimeTrackingPolicy_STATUSGenerator returns a generator of LastAccessTimeTrackingPolicy_STATUS instances for property testing. +func LastAccessTimeTrackingPolicy_STATUSGenerator() gopter.Gen { + if lastAccessTimeTrackingPolicy_STATUSGenerator != nil { + return lastAccessTimeTrackingPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_STATUS(generators) + lastAccessTimeTrackingPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(LastAccessTimeTrackingPolicy_STATUS{}), generators) + + return lastAccessTimeTrackingPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_STATUS(gens map[string]gopter.Gen) { + gens["BlobType"] = gen.SliceOf(gen.AlphaString()) + gens["Enable"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["TrackingGranularityInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_RestorePolicyProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RestorePolicyProperties via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRestorePolicyProperties, RestorePolicyPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRestorePolicyProperties runs a test to see if a specific instance of RestorePolicyProperties round trips to JSON and back losslessly +func RunJSONSerializationTestForRestorePolicyProperties(subject RestorePolicyProperties) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RestorePolicyProperties + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RestorePolicyProperties instances for property testing - lazily instantiated by +// RestorePolicyPropertiesGenerator() +var restorePolicyPropertiesGenerator gopter.Gen + +// RestorePolicyPropertiesGenerator returns a generator of RestorePolicyProperties instances for property testing. +func RestorePolicyPropertiesGenerator() gopter.Gen { + if restorePolicyPropertiesGenerator != nil { + return restorePolicyPropertiesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRestorePolicyProperties(generators) + restorePolicyPropertiesGenerator = gen.Struct(reflect.TypeOf(RestorePolicyProperties{}), generators) + + return restorePolicyPropertiesGenerator +} + +// AddIndependentPropertyGeneratorsForRestorePolicyProperties is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRestorePolicyProperties(gens map[string]gopter.Gen) { + gens["Days"] = gen.PtrOf(gen.Int()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_RestorePolicyProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RestorePolicyProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRestorePolicyProperties_STATUS, RestorePolicyProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRestorePolicyProperties_STATUS runs a test to see if a specific instance of RestorePolicyProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForRestorePolicyProperties_STATUS(subject RestorePolicyProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RestorePolicyProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RestorePolicyProperties_STATUS instances for property testing - lazily instantiated by +// RestorePolicyProperties_STATUSGenerator() +var restorePolicyProperties_STATUSGenerator gopter.Gen + +// RestorePolicyProperties_STATUSGenerator returns a generator of RestorePolicyProperties_STATUS instances for property testing. +func RestorePolicyProperties_STATUSGenerator() gopter.Gen { + if restorePolicyProperties_STATUSGenerator != nil { + return restorePolicyProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRestorePolicyProperties_STATUS(generators) + restorePolicyProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(RestorePolicyProperties_STATUS{}), generators) + + return restorePolicyProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForRestorePolicyProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRestorePolicyProperties_STATUS(gens map[string]gopter.Gen) { + gens["Days"] = gen.PtrOf(gen.Int()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["LastEnabledTime"] = gen.PtrOf(gen.AlphaString()) + gens["MinRestoreTime"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_CorsRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CorsRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCorsRule, CorsRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCorsRule runs a test to see if a specific instance of CorsRule round trips to JSON and back losslessly +func RunJSONSerializationTestForCorsRule(subject CorsRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CorsRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CorsRule instances for property testing - lazily instantiated by CorsRuleGenerator() +var corsRuleGenerator gopter.Gen + +// CorsRuleGenerator returns a generator of CorsRule instances for property testing. +func CorsRuleGenerator() gopter.Gen { + if corsRuleGenerator != nil { + return corsRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCorsRule(generators) + corsRuleGenerator = gen.Struct(reflect.TypeOf(CorsRule{}), generators) + + return corsRuleGenerator +} + +// AddIndependentPropertyGeneratorsForCorsRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCorsRule(gens map[string]gopter.Gen) { + gens["AllowedHeaders"] = gen.SliceOf(gen.AlphaString()) + gens["AllowedMethods"] = gen.SliceOf(gen.AlphaString()) + gens["AllowedOrigins"] = gen.SliceOf(gen.AlphaString()) + gens["ExposedHeaders"] = gen.SliceOf(gen.AlphaString()) + gens["MaxAgeInSeconds"] = gen.PtrOf(gen.Int()) +} + +func Test_CorsRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CorsRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCorsRule_STATUS, CorsRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCorsRule_STATUS runs a test to see if a specific instance of CorsRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForCorsRule_STATUS(subject CorsRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CorsRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CorsRule_STATUS instances for property testing - lazily instantiated by CorsRule_STATUSGenerator() +var corsRule_STATUSGenerator gopter.Gen + +// CorsRule_STATUSGenerator returns a generator of CorsRule_STATUS instances for property testing. +func CorsRule_STATUSGenerator() gopter.Gen { + if corsRule_STATUSGenerator != nil { + return corsRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCorsRule_STATUS(generators) + corsRule_STATUSGenerator = gen.Struct(reflect.TypeOf(CorsRule_STATUS{}), generators) + + return corsRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForCorsRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCorsRule_STATUS(gens map[string]gopter.Gen) { + gens["AllowedHeaders"] = gen.SliceOf(gen.AlphaString()) + gens["AllowedMethods"] = gen.SliceOf(gen.AlphaString()) + gens["AllowedOrigins"] = gen.SliceOf(gen.AlphaString()) + gens["ExposedHeaders"] = gen.SliceOf(gen.AlphaString()) + gens["MaxAgeInSeconds"] = gen.PtrOf(gen.Int()) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_blob_services_container_types_gen.go b/v2/api/storage/v1api20230101/storage/storage_accounts_blob_services_container_types_gen.go new file mode 100644 index 00000000000..8dd07a4fe29 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_blob_services_container_types_gen.go @@ -0,0 +1,304 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsblobservicescontainers,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsblobservicescontainers/status,storageaccountsblobservicescontainers/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Storage version of v1api20230101.StorageAccountsBlobServicesContainer +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/blob.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName} +type StorageAccountsBlobServicesContainer struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_BlobServices_Container_Spec `json:"spec,omitempty"` + Status StorageAccounts_BlobServices_Container_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsBlobServicesContainer{} + +// GetConditions returns the conditions of the resource +func (container *StorageAccountsBlobServicesContainer) GetConditions() conditions.Conditions { + return container.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (container *StorageAccountsBlobServicesContainer) SetConditions(conditions conditions.Conditions) { + container.Status.Conditions = conditions +} + +var _ genruntime.KubernetesResource = &StorageAccountsBlobServicesContainer{} + +// AzureName returns the Azure name of the resource +func (container *StorageAccountsBlobServicesContainer) AzureName() string { + return container.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (container StorageAccountsBlobServicesContainer) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (container *StorageAccountsBlobServicesContainer) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (container *StorageAccountsBlobServicesContainer) GetSpec() genruntime.ConvertibleSpec { + return &container.Spec +} + +// GetStatus returns the status of this resource +func (container *StorageAccountsBlobServicesContainer) GetStatus() genruntime.ConvertibleStatus { + return &container.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (container *StorageAccountsBlobServicesContainer) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/blobServices/containers" +func (container *StorageAccountsBlobServicesContainer) GetType() string { + return "Microsoft.Storage/storageAccounts/blobServices/containers" +} + +// NewEmptyStatus returns a new empty (blank) status +func (container *StorageAccountsBlobServicesContainer) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_BlobServices_Container_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (container *StorageAccountsBlobServicesContainer) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(container.Spec) + return container.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (container *StorageAccountsBlobServicesContainer) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_BlobServices_Container_STATUS); ok { + container.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_BlobServices_Container_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + container.Status = st + return nil +} + +// Hub marks that this StorageAccountsBlobServicesContainer is the hub type for conversion +func (container *StorageAccountsBlobServicesContainer) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (container *StorageAccountsBlobServicesContainer) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: container.Spec.OriginalVersion, + Kind: "StorageAccountsBlobServicesContainer", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20230101.StorageAccountsBlobServicesContainer +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/blob.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName} +type StorageAccountsBlobServicesContainerList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsBlobServicesContainer `json:"items"` +} + +// Storage version of v1api20230101.StorageAccounts_BlobServices_Container_Spec +type StorageAccounts_BlobServices_Container_Spec struct { + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + DefaultEncryptionScope *string `json:"defaultEncryptionScope,omitempty"` + DenyEncryptionScopeOverride *bool `json:"denyEncryptionScopeOverride,omitempty"` + EnableNfsV3AllSquash *bool `json:"enableNfsV3AllSquash,omitempty"` + EnableNfsV3RootSquash *bool `json:"enableNfsV3RootSquash,omitempty"` + ImmutableStorageWithVersioning *ImmutableStorageWithVersioning `json:"immutableStorageWithVersioning,omitempty"` + Metadata map[string]string `json:"metadata,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccountsBlobService resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccountsBlobService"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + PublicAccess *string `json:"publicAccess,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_BlobServices_Container_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_BlobServices_Container_Spec from the provided source +func (container *StorageAccounts_BlobServices_Container_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == container { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(container) +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_BlobServices_Container_Spec +func (container *StorageAccounts_BlobServices_Container_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == container { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(container) +} + +// Storage version of v1api20230101.StorageAccounts_BlobServices_Container_STATUS +type StorageAccounts_BlobServices_Container_STATUS struct { + Conditions []conditions.Condition `json:"conditions,omitempty"` + DefaultEncryptionScope *string `json:"defaultEncryptionScope,omitempty"` + Deleted *bool `json:"deleted,omitempty"` + DeletedTime *string `json:"deletedTime,omitempty"` + DenyEncryptionScopeOverride *bool `json:"denyEncryptionScopeOverride,omitempty"` + EnableNfsV3AllSquash *bool `json:"enableNfsV3AllSquash,omitempty"` + EnableNfsV3RootSquash *bool `json:"enableNfsV3RootSquash,omitempty"` + Etag *string `json:"etag,omitempty"` + HasImmutabilityPolicy *bool `json:"hasImmutabilityPolicy,omitempty"` + HasLegalHold *bool `json:"hasLegalHold,omitempty"` + Id *string `json:"id,omitempty"` + ImmutabilityPolicy *ImmutabilityPolicyProperties_STATUS `json:"immutabilityPolicy,omitempty"` + ImmutableStorageWithVersioning *ImmutableStorageWithVersioning_STATUS `json:"immutableStorageWithVersioning,omitempty"` + LastModifiedTime *string `json:"lastModifiedTime,omitempty"` + LeaseDuration *string `json:"leaseDuration,omitempty"` + LeaseState *string `json:"leaseState,omitempty"` + LeaseStatus *string `json:"leaseStatus,omitempty"` + LegalHold *LegalHoldProperties_STATUS `json:"legalHold,omitempty"` + Metadata map[string]string `json:"metadata,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + PublicAccess *string `json:"publicAccess,omitempty"` + RemainingRetentionDays *int `json:"remainingRetentionDays,omitempty"` + Type *string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_BlobServices_Container_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_BlobServices_Container_STATUS from the provided source +func (container *StorageAccounts_BlobServices_Container_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == container { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(container) +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_BlobServices_Container_STATUS +func (container *StorageAccounts_BlobServices_Container_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == container { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(container) +} + +// Storage version of v1api20230101.ImmutabilityPolicyProperties_STATUS +// The properties of an ImmutabilityPolicy of a blob container. +type ImmutabilityPolicyProperties_STATUS struct { + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + Etag *string `json:"etag,omitempty"` + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + State *string `json:"state,omitempty"` + UpdateHistory []UpdateHistoryProperty_STATUS `json:"updateHistory,omitempty"` +} + +// Storage version of v1api20230101.ImmutableStorageWithVersioning +// Object level immutability properties of the container. +type ImmutableStorageWithVersioning struct { + Enabled *bool `json:"enabled,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.ImmutableStorageWithVersioning_STATUS +// Object level immutability properties of the container. +type ImmutableStorageWithVersioning_STATUS struct { + Enabled *bool `json:"enabled,omitempty"` + MigrationState *string `json:"migrationState,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// Storage version of v1api20230101.LegalHoldProperties_STATUS +// The LegalHold property of a blob container. +type LegalHoldProperties_STATUS struct { + HasLegalHold *bool `json:"hasLegalHold,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ProtectedAppendWritesHistory *ProtectedAppendWritesHistory_STATUS `json:"protectedAppendWritesHistory,omitempty"` + Tags []TagProperty_STATUS `json:"tags,omitempty"` +} + +// Storage version of v1api20230101.ProtectedAppendWritesHistory_STATUS +// Protected append writes history setting for the blob container with Legal holds. +type ProtectedAppendWritesHistory_STATUS struct { + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Timestamp *string `json:"timestamp,omitempty"` +} + +// Storage version of v1api20230101.TagProperty_STATUS +// A tag of the LegalHold of a blob container. +type TagProperty_STATUS struct { + ObjectIdentifier *string `json:"objectIdentifier,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Tag *string `json:"tag,omitempty"` + TenantId *string `json:"tenantId,omitempty"` + Timestamp *string `json:"timestamp,omitempty"` + Upn *string `json:"upn,omitempty"` +} + +// Storage version of v1api20230101.UpdateHistoryProperty_STATUS +// An update history of the ImmutabilityPolicy of a blob container. +type UpdateHistoryProperty_STATUS struct { + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + ObjectIdentifier *string `json:"objectIdentifier,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TenantId *string `json:"tenantId,omitempty"` + Timestamp *string `json:"timestamp,omitempty"` + Update *string `json:"update,omitempty"` + Upn *string `json:"upn,omitempty"` +} + +func init() { + SchemeBuilder.Register(&StorageAccountsBlobServicesContainer{}, &StorageAccountsBlobServicesContainerList{}) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_blob_services_container_types_gen_test.go b/v2/api/storage/v1api20230101/storage/storage_accounts_blob_services_container_types_gen_test.go new file mode 100644 index 00000000000..d1ad76598c6 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_blob_services_container_types_gen_test.go @@ -0,0 +1,731 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsBlobServicesContainer_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsBlobServicesContainer via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsBlobServicesContainer, StorageAccountsBlobServicesContainerGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsBlobServicesContainer runs a test to see if a specific instance of StorageAccountsBlobServicesContainer round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsBlobServicesContainer(subject StorageAccountsBlobServicesContainer) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsBlobServicesContainer + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsBlobServicesContainer instances for property testing - lazily instantiated by +// StorageAccountsBlobServicesContainerGenerator() +var storageAccountsBlobServicesContainerGenerator gopter.Gen + +// StorageAccountsBlobServicesContainerGenerator returns a generator of StorageAccountsBlobServicesContainer instances for property testing. +func StorageAccountsBlobServicesContainerGenerator() gopter.Gen { + if storageAccountsBlobServicesContainerGenerator != nil { + return storageAccountsBlobServicesContainerGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsBlobServicesContainer(generators) + storageAccountsBlobServicesContainerGenerator = gen.Struct(reflect.TypeOf(StorageAccountsBlobServicesContainer{}), generators) + + return storageAccountsBlobServicesContainerGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsBlobServicesContainer is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsBlobServicesContainer(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_BlobServices_Container_SpecGenerator() + gens["Status"] = StorageAccounts_BlobServices_Container_STATUSGenerator() +} + +func Test_StorageAccounts_BlobServices_Container_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobServices_Container_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobServices_Container_Spec, StorageAccounts_BlobServices_Container_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobServices_Container_Spec runs a test to see if a specific instance of StorageAccounts_BlobServices_Container_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobServices_Container_Spec(subject StorageAccounts_BlobServices_Container_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobServices_Container_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobServices_Container_Spec instances for property testing - lazily instantiated by +// StorageAccounts_BlobServices_Container_SpecGenerator() +var storageAccounts_BlobServices_Container_SpecGenerator gopter.Gen + +// StorageAccounts_BlobServices_Container_SpecGenerator returns a generator of StorageAccounts_BlobServices_Container_Spec instances for property testing. +// We first initialize storageAccounts_BlobServices_Container_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobServices_Container_SpecGenerator() gopter.Gen { + if storageAccounts_BlobServices_Container_SpecGenerator != nil { + return storageAccounts_BlobServices_Container_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec(generators) + storageAccounts_BlobServices_Container_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobServices_Container_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec(generators) + storageAccounts_BlobServices_Container_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobServices_Container_Spec{}), generators) + + return storageAccounts_BlobServices_Container_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec(gens map[string]gopter.Gen) { + gens["AzureName"] = gen.AlphaString() + gens["DefaultEncryptionScope"] = gen.PtrOf(gen.AlphaString()) + gens["DenyEncryptionScopeOverride"] = gen.PtrOf(gen.Bool()) + gens["EnableNfsV3AllSquash"] = gen.PtrOf(gen.Bool()) + gens["EnableNfsV3RootSquash"] = gen.PtrOf(gen.Bool()) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["OriginalVersion"] = gen.AlphaString() + gens["PublicAccess"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec(gens map[string]gopter.Gen) { + gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageWithVersioningGenerator()) +} + +func Test_StorageAccounts_BlobServices_Container_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobServices_Container_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobServices_Container_STATUS, StorageAccounts_BlobServices_Container_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobServices_Container_STATUS runs a test to see if a specific instance of StorageAccounts_BlobServices_Container_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobServices_Container_STATUS(subject StorageAccounts_BlobServices_Container_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobServices_Container_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobServices_Container_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_BlobServices_Container_STATUSGenerator() +var storageAccounts_BlobServices_Container_STATUSGenerator gopter.Gen + +// StorageAccounts_BlobServices_Container_STATUSGenerator returns a generator of StorageAccounts_BlobServices_Container_STATUS instances for property testing. +// We first initialize storageAccounts_BlobServices_Container_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobServices_Container_STATUSGenerator() gopter.Gen { + if storageAccounts_BlobServices_Container_STATUSGenerator != nil { + return storageAccounts_BlobServices_Container_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS(generators) + storageAccounts_BlobServices_Container_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobServices_Container_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS(generators) + storageAccounts_BlobServices_Container_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobServices_Container_STATUS{}), generators) + + return storageAccounts_BlobServices_Container_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS(gens map[string]gopter.Gen) { + gens["DefaultEncryptionScope"] = gen.PtrOf(gen.AlphaString()) + gens["Deleted"] = gen.PtrOf(gen.Bool()) + gens["DeletedTime"] = gen.PtrOf(gen.AlphaString()) + gens["DenyEncryptionScopeOverride"] = gen.PtrOf(gen.Bool()) + gens["EnableNfsV3AllSquash"] = gen.PtrOf(gen.Bool()) + gens["EnableNfsV3RootSquash"] = gen.PtrOf(gen.Bool()) + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["HasImmutabilityPolicy"] = gen.PtrOf(gen.Bool()) + gens["HasLegalHold"] = gen.PtrOf(gen.Bool()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedTime"] = gen.PtrOf(gen.AlphaString()) + gens["LeaseDuration"] = gen.PtrOf(gen.AlphaString()) + gens["LeaseState"] = gen.PtrOf(gen.AlphaString()) + gens["LeaseStatus"] = gen.PtrOf(gen.AlphaString()) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["PublicAccess"] = gen.PtrOf(gen.AlphaString()) + gens["RemainingRetentionDays"] = gen.PtrOf(gen.Int()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) + gens["Version"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS(gens map[string]gopter.Gen) { + gens["ImmutabilityPolicy"] = gen.PtrOf(ImmutabilityPolicyProperties_STATUSGenerator()) + gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageWithVersioning_STATUSGenerator()) + gens["LegalHold"] = gen.PtrOf(LegalHoldProperties_STATUSGenerator()) +} + +func Test_ImmutabilityPolicyProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutabilityPolicyProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutabilityPolicyProperties_STATUS, ImmutabilityPolicyProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutabilityPolicyProperties_STATUS runs a test to see if a specific instance of ImmutabilityPolicyProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutabilityPolicyProperties_STATUS(subject ImmutabilityPolicyProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutabilityPolicyProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutabilityPolicyProperties_STATUS instances for property testing - lazily instantiated by +// ImmutabilityPolicyProperties_STATUSGenerator() +var immutabilityPolicyProperties_STATUSGenerator gopter.Gen + +// ImmutabilityPolicyProperties_STATUSGenerator returns a generator of ImmutabilityPolicyProperties_STATUS instances for property testing. +// We first initialize immutabilityPolicyProperties_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ImmutabilityPolicyProperties_STATUSGenerator() gopter.Gen { + if immutabilityPolicyProperties_STATUSGenerator != nil { + return immutabilityPolicyProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutabilityPolicyProperties_STATUS(generators) + immutabilityPolicyProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(ImmutabilityPolicyProperties_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutabilityPolicyProperties_STATUS(generators) + AddRelatedPropertyGeneratorsForImmutabilityPolicyProperties_STATUS(generators) + immutabilityPolicyProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(ImmutabilityPolicyProperties_STATUS{}), generators) + + return immutabilityPolicyProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForImmutabilityPolicyProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutabilityPolicyProperties_STATUS(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWrites"] = gen.PtrOf(gen.Bool()) + gens["AllowProtectedAppendWritesAll"] = gen.PtrOf(gen.Bool()) + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["ImmutabilityPeriodSinceCreationInDays"] = gen.PtrOf(gen.Int()) + gens["State"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForImmutabilityPolicyProperties_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForImmutabilityPolicyProperties_STATUS(gens map[string]gopter.Gen) { + gens["UpdateHistory"] = gen.SliceOf(UpdateHistoryProperty_STATUSGenerator()) +} + +func Test_ImmutableStorageWithVersioning_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutableStorageWithVersioning via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutableStorageWithVersioning, ImmutableStorageWithVersioningGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutableStorageWithVersioning runs a test to see if a specific instance of ImmutableStorageWithVersioning round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutableStorageWithVersioning(subject ImmutableStorageWithVersioning) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutableStorageWithVersioning + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutableStorageWithVersioning instances for property testing - lazily instantiated by +// ImmutableStorageWithVersioningGenerator() +var immutableStorageWithVersioningGenerator gopter.Gen + +// ImmutableStorageWithVersioningGenerator returns a generator of ImmutableStorageWithVersioning instances for property testing. +func ImmutableStorageWithVersioningGenerator() gopter.Gen { + if immutableStorageWithVersioningGenerator != nil { + return immutableStorageWithVersioningGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning(generators) + immutableStorageWithVersioningGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageWithVersioning{}), generators) + + return immutableStorageWithVersioningGenerator +} + +// AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_ImmutableStorageWithVersioning_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutableStorageWithVersioning_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutableStorageWithVersioning_STATUS, ImmutableStorageWithVersioning_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutableStorageWithVersioning_STATUS runs a test to see if a specific instance of ImmutableStorageWithVersioning_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutableStorageWithVersioning_STATUS(subject ImmutableStorageWithVersioning_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutableStorageWithVersioning_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutableStorageWithVersioning_STATUS instances for property testing - lazily instantiated by +// ImmutableStorageWithVersioning_STATUSGenerator() +var immutableStorageWithVersioning_STATUSGenerator gopter.Gen + +// ImmutableStorageWithVersioning_STATUSGenerator returns a generator of ImmutableStorageWithVersioning_STATUS instances for property testing. +func ImmutableStorageWithVersioning_STATUSGenerator() gopter.Gen { + if immutableStorageWithVersioning_STATUSGenerator != nil { + return immutableStorageWithVersioning_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_STATUS(generators) + immutableStorageWithVersioning_STATUSGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageWithVersioning_STATUS{}), generators) + + return immutableStorageWithVersioning_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_STATUS(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["MigrationState"] = gen.PtrOf(gen.AlphaString()) + gens["TimeStamp"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_LegalHoldProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of LegalHoldProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForLegalHoldProperties_STATUS, LegalHoldProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForLegalHoldProperties_STATUS runs a test to see if a specific instance of LegalHoldProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForLegalHoldProperties_STATUS(subject LegalHoldProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual LegalHoldProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of LegalHoldProperties_STATUS instances for property testing - lazily instantiated by +// LegalHoldProperties_STATUSGenerator() +var legalHoldProperties_STATUSGenerator gopter.Gen + +// LegalHoldProperties_STATUSGenerator returns a generator of LegalHoldProperties_STATUS instances for property testing. +// We first initialize legalHoldProperties_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func LegalHoldProperties_STATUSGenerator() gopter.Gen { + if legalHoldProperties_STATUSGenerator != nil { + return legalHoldProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForLegalHoldProperties_STATUS(generators) + legalHoldProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(LegalHoldProperties_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForLegalHoldProperties_STATUS(generators) + AddRelatedPropertyGeneratorsForLegalHoldProperties_STATUS(generators) + legalHoldProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(LegalHoldProperties_STATUS{}), generators) + + return legalHoldProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForLegalHoldProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForLegalHoldProperties_STATUS(gens map[string]gopter.Gen) { + gens["HasLegalHold"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForLegalHoldProperties_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForLegalHoldProperties_STATUS(gens map[string]gopter.Gen) { + gens["ProtectedAppendWritesHistory"] = gen.PtrOf(ProtectedAppendWritesHistory_STATUSGenerator()) + gens["Tags"] = gen.SliceOf(TagProperty_STATUSGenerator()) +} + +func Test_ProtectedAppendWritesHistory_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ProtectedAppendWritesHistory_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForProtectedAppendWritesHistory_STATUS, ProtectedAppendWritesHistory_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForProtectedAppendWritesHistory_STATUS runs a test to see if a specific instance of ProtectedAppendWritesHistory_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForProtectedAppendWritesHistory_STATUS(subject ProtectedAppendWritesHistory_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ProtectedAppendWritesHistory_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ProtectedAppendWritesHistory_STATUS instances for property testing - lazily instantiated by +// ProtectedAppendWritesHistory_STATUSGenerator() +var protectedAppendWritesHistory_STATUSGenerator gopter.Gen + +// ProtectedAppendWritesHistory_STATUSGenerator returns a generator of ProtectedAppendWritesHistory_STATUS instances for property testing. +func ProtectedAppendWritesHistory_STATUSGenerator() gopter.Gen { + if protectedAppendWritesHistory_STATUSGenerator != nil { + return protectedAppendWritesHistory_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForProtectedAppendWritesHistory_STATUS(generators) + protectedAppendWritesHistory_STATUSGenerator = gen.Struct(reflect.TypeOf(ProtectedAppendWritesHistory_STATUS{}), generators) + + return protectedAppendWritesHistory_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForProtectedAppendWritesHistory_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForProtectedAppendWritesHistory_STATUS(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWritesAll"] = gen.PtrOf(gen.Bool()) + gens["Timestamp"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_TagProperty_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TagProperty_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTagProperty_STATUS, TagProperty_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTagProperty_STATUS runs a test to see if a specific instance of TagProperty_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForTagProperty_STATUS(subject TagProperty_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TagProperty_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TagProperty_STATUS instances for property testing - lazily instantiated by TagProperty_STATUSGenerator() +var tagProperty_STATUSGenerator gopter.Gen + +// TagProperty_STATUSGenerator returns a generator of TagProperty_STATUS instances for property testing. +func TagProperty_STATUSGenerator() gopter.Gen { + if tagProperty_STATUSGenerator != nil { + return tagProperty_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTagProperty_STATUS(generators) + tagProperty_STATUSGenerator = gen.Struct(reflect.TypeOf(TagProperty_STATUS{}), generators) + + return tagProperty_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForTagProperty_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTagProperty_STATUS(gens map[string]gopter.Gen) { + gens["ObjectIdentifier"] = gen.PtrOf(gen.AlphaString()) + gens["Tag"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Timestamp"] = gen.PtrOf(gen.AlphaString()) + gens["Upn"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_UpdateHistoryProperty_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of UpdateHistoryProperty_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUpdateHistoryProperty_STATUS, UpdateHistoryProperty_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUpdateHistoryProperty_STATUS runs a test to see if a specific instance of UpdateHistoryProperty_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForUpdateHistoryProperty_STATUS(subject UpdateHistoryProperty_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UpdateHistoryProperty_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of UpdateHistoryProperty_STATUS instances for property testing - lazily instantiated by +// UpdateHistoryProperty_STATUSGenerator() +var updateHistoryProperty_STATUSGenerator gopter.Gen + +// UpdateHistoryProperty_STATUSGenerator returns a generator of UpdateHistoryProperty_STATUS instances for property testing. +func UpdateHistoryProperty_STATUSGenerator() gopter.Gen { + if updateHistoryProperty_STATUSGenerator != nil { + return updateHistoryProperty_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForUpdateHistoryProperty_STATUS(generators) + updateHistoryProperty_STATUSGenerator = gen.Struct(reflect.TypeOf(UpdateHistoryProperty_STATUS{}), generators) + + return updateHistoryProperty_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForUpdateHistoryProperty_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForUpdateHistoryProperty_STATUS(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWrites"] = gen.PtrOf(gen.Bool()) + gens["AllowProtectedAppendWritesAll"] = gen.PtrOf(gen.Bool()) + gens["ImmutabilityPeriodSinceCreationInDays"] = gen.PtrOf(gen.Int()) + gens["ObjectIdentifier"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Timestamp"] = gen.PtrOf(gen.AlphaString()) + gens["Update"] = gen.PtrOf(gen.AlphaString()) + gens["Upn"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_file_service_types_gen.go b/v2/api/storage/v1api20230101/storage/storage_accounts_file_service_types_gen.go new file mode 100644 index 00000000000..f05811cf8b6 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_file_service_types_gen.go @@ -0,0 +1,260 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsfileservices,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsfileservices/status,storageaccountsfileservices/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Storage version of v1api20230101.StorageAccountsFileService +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/file.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default +type StorageAccountsFileService struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_FileService_Spec `json:"spec,omitempty"` + Status StorageAccounts_FileService_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsFileService{} + +// GetConditions returns the conditions of the resource +func (service *StorageAccountsFileService) GetConditions() conditions.Conditions { + return service.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (service *StorageAccountsFileService) SetConditions(conditions conditions.Conditions) { + service.Status.Conditions = conditions +} + +var _ genruntime.KubernetesResource = &StorageAccountsFileService{} + +// AzureName returns the Azure name of the resource (always "default") +func (service *StorageAccountsFileService) AzureName() string { + return "default" +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (service StorageAccountsFileService) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (service *StorageAccountsFileService) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (service *StorageAccountsFileService) GetSpec() genruntime.ConvertibleSpec { + return &service.Spec +} + +// GetStatus returns the status of this resource +func (service *StorageAccountsFileService) GetStatus() genruntime.ConvertibleStatus { + return &service.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (service *StorageAccountsFileService) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/fileServices" +func (service *StorageAccountsFileService) GetType() string { + return "Microsoft.Storage/storageAccounts/fileServices" +} + +// NewEmptyStatus returns a new empty (blank) status +func (service *StorageAccountsFileService) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_FileService_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (service *StorageAccountsFileService) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(service.Spec) + return service.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (service *StorageAccountsFileService) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_FileService_STATUS); ok { + service.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_FileService_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + service.Status = st + return nil +} + +// Hub marks that this StorageAccountsFileService is the hub type for conversion +func (service *StorageAccountsFileService) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (service *StorageAccountsFileService) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: service.Spec.OriginalVersion, + Kind: "StorageAccountsFileService", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20230101.StorageAccountsFileService +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/file.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default +type StorageAccountsFileServiceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsFileService `json:"items"` +} + +// Storage version of v1api20230101.StorageAccounts_FileService_Spec +type StorageAccounts_FileService_Spec struct { + Cors *CorsRules `json:"cors,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccount resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccount"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ProtocolSettings *ProtocolSettings `json:"protocolSettings,omitempty"` + ShareDeleteRetentionPolicy *DeleteRetentionPolicy `json:"shareDeleteRetentionPolicy,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_FileService_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_FileService_Spec from the provided source +func (service *StorageAccounts_FileService_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(service) +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_FileService_Spec +func (service *StorageAccounts_FileService_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(service) +} + +// Storage version of v1api20230101.StorageAccounts_FileService_STATUS +type StorageAccounts_FileService_STATUS struct { + Conditions []conditions.Condition `json:"conditions,omitempty"` + Cors *CorsRules_STATUS `json:"cors,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ProtocolSettings *ProtocolSettings_STATUS `json:"protocolSettings,omitempty"` + ShareDeleteRetentionPolicy *DeleteRetentionPolicy_STATUS `json:"shareDeleteRetentionPolicy,omitempty"` + Sku *Sku_STATUS `json:"sku,omitempty"` + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_FileService_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_FileService_STATUS from the provided source +func (service *StorageAccounts_FileService_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(service) +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_FileService_STATUS +func (service *StorageAccounts_FileService_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(service) +} + +// Storage version of v1api20230101.ProtocolSettings +// Protocol settings for file service +type ProtocolSettings struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Smb *SmbSetting `json:"smb,omitempty"` +} + +// Storage version of v1api20230101.ProtocolSettings_STATUS +// Protocol settings for file service +type ProtocolSettings_STATUS struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Smb *SmbSetting_STATUS `json:"smb,omitempty"` +} + +// Storage version of v1api20230101.SmbSetting +// Setting for SMB protocol +type SmbSetting struct { + AuthenticationMethods *string `json:"authenticationMethods,omitempty"` + ChannelEncryption *string `json:"channelEncryption,omitempty"` + KerberosTicketEncryption *string `json:"kerberosTicketEncryption,omitempty"` + Multichannel *Multichannel `json:"multichannel,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Versions *string `json:"versions,omitempty"` +} + +// Storage version of v1api20230101.SmbSetting_STATUS +// Setting for SMB protocol +type SmbSetting_STATUS struct { + AuthenticationMethods *string `json:"authenticationMethods,omitempty"` + ChannelEncryption *string `json:"channelEncryption,omitempty"` + KerberosTicketEncryption *string `json:"kerberosTicketEncryption,omitempty"` + Multichannel *Multichannel_STATUS `json:"multichannel,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Versions *string `json:"versions,omitempty"` +} + +// Storage version of v1api20230101.Multichannel +// Multichannel setting. Applies to Premium FileStorage only. +type Multichannel struct { + Enabled *bool `json:"enabled,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.Multichannel_STATUS +// Multichannel setting. Applies to Premium FileStorage only. +type Multichannel_STATUS struct { + Enabled *bool `json:"enabled,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +func init() { + SchemeBuilder.Register(&StorageAccountsFileService{}, &StorageAccountsFileServiceList{}) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_file_service_types_gen_test.go b/v2/api/storage/v1api20230101/storage/storage_accounts_file_service_types_gen_test.go new file mode 100644 index 00000000000..5034b561ec1 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_file_service_types_gen_test.go @@ -0,0 +1,633 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsFileService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsFileService via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsFileService, StorageAccountsFileServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsFileService runs a test to see if a specific instance of StorageAccountsFileService round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsFileService(subject StorageAccountsFileService) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsFileService + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsFileService instances for property testing - lazily instantiated by +// StorageAccountsFileServiceGenerator() +var storageAccountsFileServiceGenerator gopter.Gen + +// StorageAccountsFileServiceGenerator returns a generator of StorageAccountsFileService instances for property testing. +func StorageAccountsFileServiceGenerator() gopter.Gen { + if storageAccountsFileServiceGenerator != nil { + return storageAccountsFileServiceGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsFileService(generators) + storageAccountsFileServiceGenerator = gen.Struct(reflect.TypeOf(StorageAccountsFileService{}), generators) + + return storageAccountsFileServiceGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsFileService is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsFileService(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_FileService_SpecGenerator() + gens["Status"] = StorageAccounts_FileService_STATUSGenerator() +} + +func Test_StorageAccounts_FileService_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileService_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileService_Spec, StorageAccounts_FileService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileService_Spec runs a test to see if a specific instance of StorageAccounts_FileService_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileService_Spec(subject StorageAccounts_FileService_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileService_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileService_Spec instances for property testing - lazily instantiated by +// StorageAccounts_FileService_SpecGenerator() +var storageAccounts_FileService_SpecGenerator gopter.Gen + +// StorageAccounts_FileService_SpecGenerator returns a generator of StorageAccounts_FileService_Spec instances for property testing. +// We first initialize storageAccounts_FileService_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_FileService_SpecGenerator() gopter.Gen { + if storageAccounts_FileService_SpecGenerator != nil { + return storageAccounts_FileService_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileService_Spec(generators) + storageAccounts_FileService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileService_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Spec(generators) + storageAccounts_FileService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_Spec{}), generators) + + return storageAccounts_FileService_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_FileService_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_FileService_Spec(gens map[string]gopter.Gen) { + gens["OriginalVersion"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Spec(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRulesGenerator()) + gens["ProtocolSettings"] = gen.PtrOf(ProtocolSettingsGenerator()) + gens["ShareDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicyGenerator()) +} + +func Test_StorageAccounts_FileService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileService_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileService_STATUS, StorageAccounts_FileService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileService_STATUS runs a test to see if a specific instance of StorageAccounts_FileService_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileService_STATUS(subject StorageAccounts_FileService_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileService_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileService_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_FileService_STATUSGenerator() +var storageAccounts_FileService_STATUSGenerator gopter.Gen + +// StorageAccounts_FileService_STATUSGenerator returns a generator of StorageAccounts_FileService_STATUS instances for property testing. +// We first initialize storageAccounts_FileService_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_FileService_STATUSGenerator() gopter.Gen { + if storageAccounts_FileService_STATUSGenerator != nil { + return storageAccounts_FileService_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileService_STATUS(generators) + storageAccounts_FileService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileService_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_FileService_STATUS(generators) + storageAccounts_FileService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_STATUS{}), generators) + + return storageAccounts_FileService_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_FileService_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_FileService_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileService_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileService_STATUS(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRules_STATUSGenerator()) + gens["ProtocolSettings"] = gen.PtrOf(ProtocolSettings_STATUSGenerator()) + gens["ShareDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicy_STATUSGenerator()) + gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator()) +} + +func Test_ProtocolSettings_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ProtocolSettings via JSON returns original", + prop.ForAll(RunJSONSerializationTestForProtocolSettings, ProtocolSettingsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForProtocolSettings runs a test to see if a specific instance of ProtocolSettings round trips to JSON and back losslessly +func RunJSONSerializationTestForProtocolSettings(subject ProtocolSettings) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ProtocolSettings + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ProtocolSettings instances for property testing - lazily instantiated by ProtocolSettingsGenerator() +var protocolSettingsGenerator gopter.Gen + +// ProtocolSettingsGenerator returns a generator of ProtocolSettings instances for property testing. +func ProtocolSettingsGenerator() gopter.Gen { + if protocolSettingsGenerator != nil { + return protocolSettingsGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForProtocolSettings(generators) + protocolSettingsGenerator = gen.Struct(reflect.TypeOf(ProtocolSettings{}), generators) + + return protocolSettingsGenerator +} + +// AddRelatedPropertyGeneratorsForProtocolSettings is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForProtocolSettings(gens map[string]gopter.Gen) { + gens["Smb"] = gen.PtrOf(SmbSettingGenerator()) +} + +func Test_ProtocolSettings_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ProtocolSettings_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForProtocolSettings_STATUS, ProtocolSettings_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForProtocolSettings_STATUS runs a test to see if a specific instance of ProtocolSettings_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForProtocolSettings_STATUS(subject ProtocolSettings_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ProtocolSettings_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ProtocolSettings_STATUS instances for property testing - lazily instantiated by +// ProtocolSettings_STATUSGenerator() +var protocolSettings_STATUSGenerator gopter.Gen + +// ProtocolSettings_STATUSGenerator returns a generator of ProtocolSettings_STATUS instances for property testing. +func ProtocolSettings_STATUSGenerator() gopter.Gen { + if protocolSettings_STATUSGenerator != nil { + return protocolSettings_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForProtocolSettings_STATUS(generators) + protocolSettings_STATUSGenerator = gen.Struct(reflect.TypeOf(ProtocolSettings_STATUS{}), generators) + + return protocolSettings_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForProtocolSettings_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForProtocolSettings_STATUS(gens map[string]gopter.Gen) { + gens["Smb"] = gen.PtrOf(SmbSetting_STATUSGenerator()) +} + +func Test_SmbSetting_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SmbSetting via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSmbSetting, SmbSettingGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSmbSetting runs a test to see if a specific instance of SmbSetting round trips to JSON and back losslessly +func RunJSONSerializationTestForSmbSetting(subject SmbSetting) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SmbSetting + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SmbSetting instances for property testing - lazily instantiated by SmbSettingGenerator() +var smbSettingGenerator gopter.Gen + +// SmbSettingGenerator returns a generator of SmbSetting instances for property testing. +// We first initialize smbSettingGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func SmbSettingGenerator() gopter.Gen { + if smbSettingGenerator != nil { + return smbSettingGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSmbSetting(generators) + smbSettingGenerator = gen.Struct(reflect.TypeOf(SmbSetting{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSmbSetting(generators) + AddRelatedPropertyGeneratorsForSmbSetting(generators) + smbSettingGenerator = gen.Struct(reflect.TypeOf(SmbSetting{}), generators) + + return smbSettingGenerator +} + +// AddIndependentPropertyGeneratorsForSmbSetting is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSmbSetting(gens map[string]gopter.Gen) { + gens["AuthenticationMethods"] = gen.PtrOf(gen.AlphaString()) + gens["ChannelEncryption"] = gen.PtrOf(gen.AlphaString()) + gens["KerberosTicketEncryption"] = gen.PtrOf(gen.AlphaString()) + gens["Versions"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForSmbSetting is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSmbSetting(gens map[string]gopter.Gen) { + gens["Multichannel"] = gen.PtrOf(MultichannelGenerator()) +} + +func Test_SmbSetting_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SmbSetting_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSmbSetting_STATUS, SmbSetting_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSmbSetting_STATUS runs a test to see if a specific instance of SmbSetting_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSmbSetting_STATUS(subject SmbSetting_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SmbSetting_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SmbSetting_STATUS instances for property testing - lazily instantiated by SmbSetting_STATUSGenerator() +var smbSetting_STATUSGenerator gopter.Gen + +// SmbSetting_STATUSGenerator returns a generator of SmbSetting_STATUS instances for property testing. +// We first initialize smbSetting_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func SmbSetting_STATUSGenerator() gopter.Gen { + if smbSetting_STATUSGenerator != nil { + return smbSetting_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSmbSetting_STATUS(generators) + smbSetting_STATUSGenerator = gen.Struct(reflect.TypeOf(SmbSetting_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSmbSetting_STATUS(generators) + AddRelatedPropertyGeneratorsForSmbSetting_STATUS(generators) + smbSetting_STATUSGenerator = gen.Struct(reflect.TypeOf(SmbSetting_STATUS{}), generators) + + return smbSetting_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSmbSetting_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSmbSetting_STATUS(gens map[string]gopter.Gen) { + gens["AuthenticationMethods"] = gen.PtrOf(gen.AlphaString()) + gens["ChannelEncryption"] = gen.PtrOf(gen.AlphaString()) + gens["KerberosTicketEncryption"] = gen.PtrOf(gen.AlphaString()) + gens["Versions"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForSmbSetting_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSmbSetting_STATUS(gens map[string]gopter.Gen) { + gens["Multichannel"] = gen.PtrOf(Multichannel_STATUSGenerator()) +} + +func Test_Multichannel_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Multichannel via JSON returns original", + prop.ForAll(RunJSONSerializationTestForMultichannel, MultichannelGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForMultichannel runs a test to see if a specific instance of Multichannel round trips to JSON and back losslessly +func RunJSONSerializationTestForMultichannel(subject Multichannel) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Multichannel + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Multichannel instances for property testing - lazily instantiated by MultichannelGenerator() +var multichannelGenerator gopter.Gen + +// MultichannelGenerator returns a generator of Multichannel instances for property testing. +func MultichannelGenerator() gopter.Gen { + if multichannelGenerator != nil { + return multichannelGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForMultichannel(generators) + multichannelGenerator = gen.Struct(reflect.TypeOf(Multichannel{}), generators) + + return multichannelGenerator +} + +// AddIndependentPropertyGeneratorsForMultichannel is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForMultichannel(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_Multichannel_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Multichannel_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForMultichannel_STATUS, Multichannel_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForMultichannel_STATUS runs a test to see if a specific instance of Multichannel_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForMultichannel_STATUS(subject Multichannel_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Multichannel_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Multichannel_STATUS instances for property testing - lazily instantiated by +// Multichannel_STATUSGenerator() +var multichannel_STATUSGenerator gopter.Gen + +// Multichannel_STATUSGenerator returns a generator of Multichannel_STATUS instances for property testing. +func Multichannel_STATUSGenerator() gopter.Gen { + if multichannel_STATUSGenerator != nil { + return multichannel_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForMultichannel_STATUS(generators) + multichannel_STATUSGenerator = gen.Struct(reflect.TypeOf(Multichannel_STATUS{}), generators) + + return multichannel_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForMultichannel_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForMultichannel_STATUS(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_file_services_share_types_gen.go b/v2/api/storage/v1api20230101/storage/storage_accounts_file_services_share_types_gen.go new file mode 100644 index 00000000000..fed77b5d00e --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_file_services_share_types_gen.go @@ -0,0 +1,265 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsfileservicesshares,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsfileservicesshares/status,storageaccountsfileservicesshares/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Storage version of v1api20230101.StorageAccountsFileServicesShare +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/file.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName} +type StorageAccountsFileServicesShare struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_FileServices_Share_Spec `json:"spec,omitempty"` + Status StorageAccounts_FileServices_Share_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsFileServicesShare{} + +// GetConditions returns the conditions of the resource +func (share *StorageAccountsFileServicesShare) GetConditions() conditions.Conditions { + return share.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (share *StorageAccountsFileServicesShare) SetConditions(conditions conditions.Conditions) { + share.Status.Conditions = conditions +} + +var _ genruntime.KubernetesResource = &StorageAccountsFileServicesShare{} + +// AzureName returns the Azure name of the resource +func (share *StorageAccountsFileServicesShare) AzureName() string { + return share.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (share StorageAccountsFileServicesShare) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (share *StorageAccountsFileServicesShare) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (share *StorageAccountsFileServicesShare) GetSpec() genruntime.ConvertibleSpec { + return &share.Spec +} + +// GetStatus returns the status of this resource +func (share *StorageAccountsFileServicesShare) GetStatus() genruntime.ConvertibleStatus { + return &share.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (share *StorageAccountsFileServicesShare) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/fileServices/shares" +func (share *StorageAccountsFileServicesShare) GetType() string { + return "Microsoft.Storage/storageAccounts/fileServices/shares" +} + +// NewEmptyStatus returns a new empty (blank) status +func (share *StorageAccountsFileServicesShare) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_FileServices_Share_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (share *StorageAccountsFileServicesShare) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(share.Spec) + return share.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (share *StorageAccountsFileServicesShare) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_FileServices_Share_STATUS); ok { + share.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_FileServices_Share_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + share.Status = st + return nil +} + +// Hub marks that this StorageAccountsFileServicesShare is the hub type for conversion +func (share *StorageAccountsFileServicesShare) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (share *StorageAccountsFileServicesShare) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: share.Spec.OriginalVersion, + Kind: "StorageAccountsFileServicesShare", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20230101.StorageAccountsFileServicesShare +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/file.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName} +type StorageAccountsFileServicesShareList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsFileServicesShare `json:"items"` +} + +// Storage version of v1api20230101.StorageAccounts_FileServices_Share_Spec +type StorageAccounts_FileServices_Share_Spec struct { + AccessTier *string `json:"accessTier,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + EnabledProtocols *string `json:"enabledProtocols,omitempty"` + Metadata map[string]string `json:"metadata,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccountsFileService resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccountsFileService"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RootSquash *string `json:"rootSquash,omitempty"` + ShareQuota *int `json:"shareQuota,omitempty"` + SignedIdentifiers []SignedIdentifier `json:"signedIdentifiers,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_FileServices_Share_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_FileServices_Share_Spec from the provided source +func (share *StorageAccounts_FileServices_Share_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == share { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(share) +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_FileServices_Share_Spec +func (share *StorageAccounts_FileServices_Share_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == share { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(share) +} + +// Storage version of v1api20230101.StorageAccounts_FileServices_Share_STATUS +type StorageAccounts_FileServices_Share_STATUS struct { + AccessTier *string `json:"accessTier,omitempty"` + AccessTierChangeTime *string `json:"accessTierChangeTime,omitempty"` + AccessTierStatus *string `json:"accessTierStatus,omitempty"` + Conditions []conditions.Condition `json:"conditions,omitempty"` + Deleted *bool `json:"deleted,omitempty"` + DeletedTime *string `json:"deletedTime,omitempty"` + EnabledProtocols *string `json:"enabledProtocols,omitempty"` + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + LastModifiedTime *string `json:"lastModifiedTime,omitempty"` + LeaseDuration *string `json:"leaseDuration,omitempty"` + LeaseState *string `json:"leaseState,omitempty"` + LeaseStatus *string `json:"leaseStatus,omitempty"` + Metadata map[string]string `json:"metadata,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RemainingRetentionDays *int `json:"remainingRetentionDays,omitempty"` + RootSquash *string `json:"rootSquash,omitempty"` + ShareQuota *int `json:"shareQuota,omitempty"` + ShareUsageBytes *int `json:"shareUsageBytes,omitempty"` + SignedIdentifiers []SignedIdentifier_STATUS `json:"signedIdentifiers,omitempty"` + SnapshotTime *string `json:"snapshotTime,omitempty"` + Type *string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_FileServices_Share_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_FileServices_Share_STATUS from the provided source +func (share *StorageAccounts_FileServices_Share_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == share { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(share) +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_FileServices_Share_STATUS +func (share *StorageAccounts_FileServices_Share_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == share { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(share) +} + +// Storage version of v1api20230101.SignedIdentifier +type SignedIdentifier struct { + AccessPolicy *AccessPolicy `json:"accessPolicy,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + + // Reference: An unique identifier of the stored access policy. + Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` +} + +// Storage version of v1api20230101.SignedIdentifier_STATUS +type SignedIdentifier_STATUS struct { + AccessPolicy *AccessPolicy_STATUS `json:"accessPolicy,omitempty"` + Id *string `json:"id,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.AccessPolicy +type AccessPolicy struct { + ExpiryTime *string `json:"expiryTime,omitempty"` + Permission *string `json:"permission,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + StartTime *string `json:"startTime,omitempty"` +} + +// Storage version of v1api20230101.AccessPolicy_STATUS +type AccessPolicy_STATUS struct { + ExpiryTime *string `json:"expiryTime,omitempty"` + Permission *string `json:"permission,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + StartTime *string `json:"startTime,omitempty"` +} + +func init() { + SchemeBuilder.Register(&StorageAccountsFileServicesShare{}, &StorageAccountsFileServicesShareList{}) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_file_services_share_types_gen_test.go b/v2/api/storage/v1api20230101/storage/storage_accounts_file_services_share_types_gen_test.go new file mode 100644 index 00000000000..3d41e41c791 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_file_services_share_types_gen_test.go @@ -0,0 +1,516 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsFileServicesShare_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsFileServicesShare via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsFileServicesShare, StorageAccountsFileServicesShareGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsFileServicesShare runs a test to see if a specific instance of StorageAccountsFileServicesShare round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsFileServicesShare(subject StorageAccountsFileServicesShare) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsFileServicesShare + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsFileServicesShare instances for property testing - lazily instantiated by +// StorageAccountsFileServicesShareGenerator() +var storageAccountsFileServicesShareGenerator gopter.Gen + +// StorageAccountsFileServicesShareGenerator returns a generator of StorageAccountsFileServicesShare instances for property testing. +func StorageAccountsFileServicesShareGenerator() gopter.Gen { + if storageAccountsFileServicesShareGenerator != nil { + return storageAccountsFileServicesShareGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsFileServicesShare(generators) + storageAccountsFileServicesShareGenerator = gen.Struct(reflect.TypeOf(StorageAccountsFileServicesShare{}), generators) + + return storageAccountsFileServicesShareGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsFileServicesShare is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsFileServicesShare(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_FileServices_Share_SpecGenerator() + gens["Status"] = StorageAccounts_FileServices_Share_STATUSGenerator() +} + +func Test_StorageAccounts_FileServices_Share_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileServices_Share_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileServices_Share_Spec, StorageAccounts_FileServices_Share_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileServices_Share_Spec runs a test to see if a specific instance of StorageAccounts_FileServices_Share_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileServices_Share_Spec(subject StorageAccounts_FileServices_Share_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileServices_Share_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileServices_Share_Spec instances for property testing - lazily instantiated by +// StorageAccounts_FileServices_Share_SpecGenerator() +var storageAccounts_FileServices_Share_SpecGenerator gopter.Gen + +// StorageAccounts_FileServices_Share_SpecGenerator returns a generator of StorageAccounts_FileServices_Share_Spec instances for property testing. +// We first initialize storageAccounts_FileServices_Share_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_FileServices_Share_SpecGenerator() gopter.Gen { + if storageAccounts_FileServices_Share_SpecGenerator != nil { + return storageAccounts_FileServices_Share_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec(generators) + storageAccounts_FileServices_Share_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileServices_Share_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec(generators) + storageAccounts_FileServices_Share_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileServices_Share_Spec{}), generators) + + return storageAccounts_FileServices_Share_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec(gens map[string]gopter.Gen) { + gens["AccessTier"] = gen.PtrOf(gen.AlphaString()) + gens["AzureName"] = gen.AlphaString() + gens["EnabledProtocols"] = gen.PtrOf(gen.AlphaString()) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["OriginalVersion"] = gen.AlphaString() + gens["RootSquash"] = gen.PtrOf(gen.AlphaString()) + gens["ShareQuota"] = gen.PtrOf(gen.Int()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec(gens map[string]gopter.Gen) { + gens["SignedIdentifiers"] = gen.SliceOf(SignedIdentifierGenerator()) +} + +func Test_StorageAccounts_FileServices_Share_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileServices_Share_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileServices_Share_STATUS, StorageAccounts_FileServices_Share_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileServices_Share_STATUS runs a test to see if a specific instance of StorageAccounts_FileServices_Share_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileServices_Share_STATUS(subject StorageAccounts_FileServices_Share_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileServices_Share_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileServices_Share_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_FileServices_Share_STATUSGenerator() +var storageAccounts_FileServices_Share_STATUSGenerator gopter.Gen + +// StorageAccounts_FileServices_Share_STATUSGenerator returns a generator of StorageAccounts_FileServices_Share_STATUS instances for property testing. +// We first initialize storageAccounts_FileServices_Share_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_FileServices_Share_STATUSGenerator() gopter.Gen { + if storageAccounts_FileServices_Share_STATUSGenerator != nil { + return storageAccounts_FileServices_Share_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS(generators) + storageAccounts_FileServices_Share_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileServices_Share_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS(generators) + storageAccounts_FileServices_Share_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileServices_Share_STATUS{}), generators) + + return storageAccounts_FileServices_Share_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS(gens map[string]gopter.Gen) { + gens["AccessTier"] = gen.PtrOf(gen.AlphaString()) + gens["AccessTierChangeTime"] = gen.PtrOf(gen.AlphaString()) + gens["AccessTierStatus"] = gen.PtrOf(gen.AlphaString()) + gens["Deleted"] = gen.PtrOf(gen.Bool()) + gens["DeletedTime"] = gen.PtrOf(gen.AlphaString()) + gens["EnabledProtocols"] = gen.PtrOf(gen.AlphaString()) + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedTime"] = gen.PtrOf(gen.AlphaString()) + gens["LeaseDuration"] = gen.PtrOf(gen.AlphaString()) + gens["LeaseState"] = gen.PtrOf(gen.AlphaString()) + gens["LeaseStatus"] = gen.PtrOf(gen.AlphaString()) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["RemainingRetentionDays"] = gen.PtrOf(gen.Int()) + gens["RootSquash"] = gen.PtrOf(gen.AlphaString()) + gens["ShareQuota"] = gen.PtrOf(gen.Int()) + gens["ShareUsageBytes"] = gen.PtrOf(gen.Int()) + gens["SnapshotTime"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) + gens["Version"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS(gens map[string]gopter.Gen) { + gens["SignedIdentifiers"] = gen.SliceOf(SignedIdentifier_STATUSGenerator()) +} + +func Test_SignedIdentifier_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SignedIdentifier via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSignedIdentifier, SignedIdentifierGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSignedIdentifier runs a test to see if a specific instance of SignedIdentifier round trips to JSON and back losslessly +func RunJSONSerializationTestForSignedIdentifier(subject SignedIdentifier) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SignedIdentifier + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SignedIdentifier instances for property testing - lazily instantiated by SignedIdentifierGenerator() +var signedIdentifierGenerator gopter.Gen + +// SignedIdentifierGenerator returns a generator of SignedIdentifier instances for property testing. +func SignedIdentifierGenerator() gopter.Gen { + if signedIdentifierGenerator != nil { + return signedIdentifierGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForSignedIdentifier(generators) + signedIdentifierGenerator = gen.Struct(reflect.TypeOf(SignedIdentifier{}), generators) + + return signedIdentifierGenerator +} + +// AddRelatedPropertyGeneratorsForSignedIdentifier is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSignedIdentifier(gens map[string]gopter.Gen) { + gens["AccessPolicy"] = gen.PtrOf(AccessPolicyGenerator()) +} + +func Test_SignedIdentifier_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SignedIdentifier_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSignedIdentifier_STATUS, SignedIdentifier_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSignedIdentifier_STATUS runs a test to see if a specific instance of SignedIdentifier_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSignedIdentifier_STATUS(subject SignedIdentifier_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SignedIdentifier_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SignedIdentifier_STATUS instances for property testing - lazily instantiated by +// SignedIdentifier_STATUSGenerator() +var signedIdentifier_STATUSGenerator gopter.Gen + +// SignedIdentifier_STATUSGenerator returns a generator of SignedIdentifier_STATUS instances for property testing. +// We first initialize signedIdentifier_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func SignedIdentifier_STATUSGenerator() gopter.Gen { + if signedIdentifier_STATUSGenerator != nil { + return signedIdentifier_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSignedIdentifier_STATUS(generators) + signedIdentifier_STATUSGenerator = gen.Struct(reflect.TypeOf(SignedIdentifier_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSignedIdentifier_STATUS(generators) + AddRelatedPropertyGeneratorsForSignedIdentifier_STATUS(generators) + signedIdentifier_STATUSGenerator = gen.Struct(reflect.TypeOf(SignedIdentifier_STATUS{}), generators) + + return signedIdentifier_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSignedIdentifier_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSignedIdentifier_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForSignedIdentifier_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSignedIdentifier_STATUS(gens map[string]gopter.Gen) { + gens["AccessPolicy"] = gen.PtrOf(AccessPolicy_STATUSGenerator()) +} + +func Test_AccessPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccessPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccessPolicy, AccessPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccessPolicy runs a test to see if a specific instance of AccessPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForAccessPolicy(subject AccessPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccessPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccessPolicy instances for property testing - lazily instantiated by AccessPolicyGenerator() +var accessPolicyGenerator gopter.Gen + +// AccessPolicyGenerator returns a generator of AccessPolicy instances for property testing. +func AccessPolicyGenerator() gopter.Gen { + if accessPolicyGenerator != nil { + return accessPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicy(generators) + accessPolicyGenerator = gen.Struct(reflect.TypeOf(AccessPolicy{}), generators) + + return accessPolicyGenerator +} + +// AddIndependentPropertyGeneratorsForAccessPolicy is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccessPolicy(gens map[string]gopter.Gen) { + gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString()) + gens["Permission"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_AccessPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccessPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccessPolicy_STATUS, AccessPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccessPolicy_STATUS runs a test to see if a specific instance of AccessPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForAccessPolicy_STATUS(subject AccessPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccessPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccessPolicy_STATUS instances for property testing - lazily instantiated by +// AccessPolicy_STATUSGenerator() +var accessPolicy_STATUSGenerator gopter.Gen + +// AccessPolicy_STATUSGenerator returns a generator of AccessPolicy_STATUS instances for property testing. +func AccessPolicy_STATUSGenerator() gopter.Gen { + if accessPolicy_STATUSGenerator != nil { + return accessPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicy_STATUS(generators) + accessPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(AccessPolicy_STATUS{}), generators) + + return accessPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForAccessPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccessPolicy_STATUS(gens map[string]gopter.Gen) { + gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString()) + gens["Permission"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_management_policy_types_gen.go b/v2/api/storage/v1api20230101/storage/storage_accounts_management_policy_types_gen.go new file mode 100644 index 00000000000..e42763455a8 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_management_policy_types_gen.go @@ -0,0 +1,427 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsmanagementpolicies,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsmanagementpolicies/status,storageaccountsmanagementpolicies/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Storage version of v1api20230101.StorageAccountsManagementPolicy +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/default +type StorageAccountsManagementPolicy struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_ManagementPolicy_Spec `json:"spec,omitempty"` + Status StorageAccounts_ManagementPolicy_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsManagementPolicy{} + +// GetConditions returns the conditions of the resource +func (policy *StorageAccountsManagementPolicy) GetConditions() conditions.Conditions { + return policy.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (policy *StorageAccountsManagementPolicy) SetConditions(conditions conditions.Conditions) { + policy.Status.Conditions = conditions +} + +var _ genruntime.KubernetesResource = &StorageAccountsManagementPolicy{} + +// AzureName returns the Azure name of the resource (always "default") +func (policy *StorageAccountsManagementPolicy) AzureName() string { + return "default" +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (policy StorageAccountsManagementPolicy) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (policy *StorageAccountsManagementPolicy) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (policy *StorageAccountsManagementPolicy) GetSpec() genruntime.ConvertibleSpec { + return &policy.Spec +} + +// GetStatus returns the status of this resource +func (policy *StorageAccountsManagementPolicy) GetStatus() genruntime.ConvertibleStatus { + return &policy.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (policy *StorageAccountsManagementPolicy) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/managementPolicies" +func (policy *StorageAccountsManagementPolicy) GetType() string { + return "Microsoft.Storage/storageAccounts/managementPolicies" +} + +// NewEmptyStatus returns a new empty (blank) status +func (policy *StorageAccountsManagementPolicy) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_ManagementPolicy_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (policy *StorageAccountsManagementPolicy) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(policy.Spec) + return policy.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (policy *StorageAccountsManagementPolicy) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_ManagementPolicy_STATUS); ok { + policy.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_ManagementPolicy_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + policy.Status = st + return nil +} + +// Hub marks that this StorageAccountsManagementPolicy is the hub type for conversion +func (policy *StorageAccountsManagementPolicy) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (policy *StorageAccountsManagementPolicy) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: policy.Spec.OriginalVersion, + Kind: "StorageAccountsManagementPolicy", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20230101.StorageAccountsManagementPolicy +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/default +type StorageAccountsManagementPolicyList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsManagementPolicy `json:"items"` +} + +// Storage version of v1api20230101.StorageAccounts_ManagementPolicy_Spec +type StorageAccounts_ManagementPolicy_Spec struct { + OriginalVersion string `json:"originalVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccount resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccount"` + Policy *ManagementPolicySchema `json:"policy,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_ManagementPolicy_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_ManagementPolicy_Spec from the provided source +func (policy *StorageAccounts_ManagementPolicy_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == policy { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(policy) +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_ManagementPolicy_Spec +func (policy *StorageAccounts_ManagementPolicy_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == policy { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(policy) +} + +// Storage version of v1api20230101.StorageAccounts_ManagementPolicy_STATUS +type StorageAccounts_ManagementPolicy_STATUS struct { + Conditions []conditions.Condition `json:"conditions,omitempty"` + Id *string `json:"id,omitempty"` + LastModifiedTime *string `json:"lastModifiedTime,omitempty"` + Name *string `json:"name,omitempty"` + Policy *ManagementPolicySchema_STATUS `json:"policy,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_ManagementPolicy_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_ManagementPolicy_STATUS from the provided source +func (policy *StorageAccounts_ManagementPolicy_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == policy { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(policy) +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_ManagementPolicy_STATUS +func (policy *StorageAccounts_ManagementPolicy_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == policy { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(policy) +} + +// Storage version of v1api20230101.ManagementPolicySchema +// The Storage Account ManagementPolicies Rules. See more details in: +// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. +type ManagementPolicySchema struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Rules []ManagementPolicyRule `json:"rules,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicySchema_STATUS +// The Storage Account ManagementPolicies Rules. See more details in: +// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. +type ManagementPolicySchema_STATUS struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Rules []ManagementPolicyRule_STATUS `json:"rules,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicyRule +// An object that wraps the Lifecycle rule. Each rule is uniquely defined by name. +type ManagementPolicyRule struct { + Definition *ManagementPolicyDefinition `json:"definition,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicyRule_STATUS +// An object that wraps the Lifecycle rule. Each rule is uniquely defined by name. +type ManagementPolicyRule_STATUS struct { + Definition *ManagementPolicyDefinition_STATUS `json:"definition,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicyDefinition +// An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set. +type ManagementPolicyDefinition struct { + Actions *ManagementPolicyAction `json:"actions,omitempty"` + Filters *ManagementPolicyFilter `json:"filters,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicyDefinition_STATUS +// An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set. +type ManagementPolicyDefinition_STATUS struct { + Actions *ManagementPolicyAction_STATUS `json:"actions,omitempty"` + Filters *ManagementPolicyFilter_STATUS `json:"filters,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicyAction +// Actions are applied to the filtered blobs when the execution condition is met. +type ManagementPolicyAction struct { + BaseBlob *ManagementPolicyBaseBlob `json:"baseBlob,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Snapshot *ManagementPolicySnapShot `json:"snapshot,omitempty"` + Version *ManagementPolicyVersion `json:"version,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicyAction_STATUS +// Actions are applied to the filtered blobs when the execution condition is met. +type ManagementPolicyAction_STATUS struct { + BaseBlob *ManagementPolicyBaseBlob_STATUS `json:"baseBlob,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Snapshot *ManagementPolicySnapShot_STATUS `json:"snapshot,omitempty"` + Version *ManagementPolicyVersion_STATUS `json:"version,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicyFilter +// Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical +// AND is performed on all filters. +type ManagementPolicyFilter struct { + BlobIndexMatch []TagFilter `json:"blobIndexMatch,omitempty"` + BlobTypes []string `json:"blobTypes,omitempty"` + PrefixMatch []string `json:"prefixMatch,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicyFilter_STATUS +// Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical +// AND is performed on all filters. +type ManagementPolicyFilter_STATUS struct { + BlobIndexMatch []TagFilter_STATUS `json:"blobIndexMatch,omitempty"` + BlobTypes []string `json:"blobTypes,omitempty"` + PrefixMatch []string `json:"prefixMatch,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicyBaseBlob +// Management policy action for base blob. +type ManagementPolicyBaseBlob struct { + Delete *DateAfterModification `json:"delete,omitempty"` + EnableAutoTierToHotFromCool *bool `json:"enableAutoTierToHotFromCool,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TierToArchive *DateAfterModification `json:"tierToArchive,omitempty"` + TierToCold *DateAfterModification `json:"tierToCold,omitempty"` + TierToCool *DateAfterModification `json:"tierToCool,omitempty"` + TierToHot *DateAfterModification `json:"tierToHot,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicyBaseBlob_STATUS +// Management policy action for base blob. +type ManagementPolicyBaseBlob_STATUS struct { + Delete *DateAfterModification_STATUS `json:"delete,omitempty"` + EnableAutoTierToHotFromCool *bool `json:"enableAutoTierToHotFromCool,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TierToArchive *DateAfterModification_STATUS `json:"tierToArchive,omitempty"` + TierToCold *DateAfterModification_STATUS `json:"tierToCold,omitempty"` + TierToCool *DateAfterModification_STATUS `json:"tierToCool,omitempty"` + TierToHot *DateAfterModification_STATUS `json:"tierToHot,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicySnapShot +// Management policy action for snapshot. +type ManagementPolicySnapShot struct { + Delete *DateAfterCreation `json:"delete,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TierToArchive *DateAfterCreation `json:"tierToArchive,omitempty"` + TierToCold *DateAfterCreation `json:"tierToCold,omitempty"` + TierToCool *DateAfterCreation `json:"tierToCool,omitempty"` + TierToHot *DateAfterCreation `json:"tierToHot,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicySnapShot_STATUS +// Management policy action for snapshot. +type ManagementPolicySnapShot_STATUS struct { + Delete *DateAfterCreation_STATUS `json:"delete,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TierToArchive *DateAfterCreation_STATUS `json:"tierToArchive,omitempty"` + TierToCold *DateAfterCreation_STATUS `json:"tierToCold,omitempty"` + TierToCool *DateAfterCreation_STATUS `json:"tierToCool,omitempty"` + TierToHot *DateAfterCreation_STATUS `json:"tierToHot,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicyVersion +// Management policy action for blob version. +type ManagementPolicyVersion struct { + Delete *DateAfterCreation `json:"delete,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TierToArchive *DateAfterCreation `json:"tierToArchive,omitempty"` + TierToCold *DateAfterCreation `json:"tierToCold,omitempty"` + TierToCool *DateAfterCreation `json:"tierToCool,omitempty"` + TierToHot *DateAfterCreation `json:"tierToHot,omitempty"` +} + +// Storage version of v1api20230101.ManagementPolicyVersion_STATUS +// Management policy action for blob version. +type ManagementPolicyVersion_STATUS struct { + Delete *DateAfterCreation_STATUS `json:"delete,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TierToArchive *DateAfterCreation_STATUS `json:"tierToArchive,omitempty"` + TierToCold *DateAfterCreation_STATUS `json:"tierToCold,omitempty"` + TierToCool *DateAfterCreation_STATUS `json:"tierToCool,omitempty"` + TierToHot *DateAfterCreation_STATUS `json:"tierToHot,omitempty"` +} + +// Storage version of v1api20230101.TagFilter +// Blob index tag based filtering for blob objects +type TagFilter struct { + Name *string `json:"name,omitempty"` + Op *string `json:"op,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Value *string `json:"value,omitempty"` +} + +// Storage version of v1api20230101.TagFilter_STATUS +// Blob index tag based filtering for blob objects +type TagFilter_STATUS struct { + Name *string `json:"name,omitempty"` + Op *string `json:"op,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Value *string `json:"value,omitempty"` +} + +// Storage version of v1api20230101.DateAfterCreation +// Object to define snapshot and version action conditions. +type DateAfterCreation struct { + DaysAfterCreationGreaterThan *int `json:"daysAfterCreationGreaterThan,omitempty"` + DaysAfterLastTierChangeGreaterThan *int `json:"daysAfterLastTierChangeGreaterThan,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.DateAfterCreation_STATUS +// Object to define snapshot and version action conditions. +type DateAfterCreation_STATUS struct { + DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` + DaysAfterLastTierChangeGreaterThan *float64 `json:"daysAfterLastTierChangeGreaterThan,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.DateAfterModification +// Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, +// daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The +// daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires +// daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with +// daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan. +type DateAfterModification struct { + DaysAfterCreationGreaterThan *int `json:"daysAfterCreationGreaterThan,omitempty"` + DaysAfterLastAccessTimeGreaterThan *int `json:"daysAfterLastAccessTimeGreaterThan,omitempty"` + DaysAfterLastTierChangeGreaterThan *int `json:"daysAfterLastTierChangeGreaterThan,omitempty"` + DaysAfterModificationGreaterThan *int `json:"daysAfterModificationGreaterThan,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.DateAfterModification_STATUS +// Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, +// daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The +// daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires +// daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with +// daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan. +type DateAfterModification_STATUS struct { + DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` + DaysAfterLastAccessTimeGreaterThan *float64 `json:"daysAfterLastAccessTimeGreaterThan,omitempty"` + DaysAfterLastTierChangeGreaterThan *float64 `json:"daysAfterLastTierChangeGreaterThan,omitempty"` + DaysAfterModificationGreaterThan *float64 `json:"daysAfterModificationGreaterThan,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +func init() { + SchemeBuilder.Register(&StorageAccountsManagementPolicy{}, &StorageAccountsManagementPolicyList{}) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_management_policy_types_gen_test.go b/v2/api/storage/v1api20230101/storage/storage_accounts_management_policy_types_gen_test.go new file mode 100644 index 00000000000..0d48cc5db97 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_management_policy_types_gen_test.go @@ -0,0 +1,1704 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsManagementPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsManagementPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsManagementPolicy, StorageAccountsManagementPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsManagementPolicy runs a test to see if a specific instance of StorageAccountsManagementPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsManagementPolicy(subject StorageAccountsManagementPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsManagementPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsManagementPolicy instances for property testing - lazily instantiated by +// StorageAccountsManagementPolicyGenerator() +var storageAccountsManagementPolicyGenerator gopter.Gen + +// StorageAccountsManagementPolicyGenerator returns a generator of StorageAccountsManagementPolicy instances for property testing. +func StorageAccountsManagementPolicyGenerator() gopter.Gen { + if storageAccountsManagementPolicyGenerator != nil { + return storageAccountsManagementPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsManagementPolicy(generators) + storageAccountsManagementPolicyGenerator = gen.Struct(reflect.TypeOf(StorageAccountsManagementPolicy{}), generators) + + return storageAccountsManagementPolicyGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsManagementPolicy is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsManagementPolicy(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_ManagementPolicy_SpecGenerator() + gens["Status"] = StorageAccounts_ManagementPolicy_STATUSGenerator() +} + +func Test_StorageAccounts_ManagementPolicy_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_ManagementPolicy_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_ManagementPolicy_Spec, StorageAccounts_ManagementPolicy_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_ManagementPolicy_Spec runs a test to see if a specific instance of StorageAccounts_ManagementPolicy_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_ManagementPolicy_Spec(subject StorageAccounts_ManagementPolicy_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_ManagementPolicy_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_ManagementPolicy_Spec instances for property testing - lazily instantiated by +// StorageAccounts_ManagementPolicy_SpecGenerator() +var storageAccounts_ManagementPolicy_SpecGenerator gopter.Gen + +// StorageAccounts_ManagementPolicy_SpecGenerator returns a generator of StorageAccounts_ManagementPolicy_Spec instances for property testing. +// We first initialize storageAccounts_ManagementPolicy_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_ManagementPolicy_SpecGenerator() gopter.Gen { + if storageAccounts_ManagementPolicy_SpecGenerator != nil { + return storageAccounts_ManagementPolicy_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec(generators) + storageAccounts_ManagementPolicy_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_ManagementPolicy_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec(generators) + storageAccounts_ManagementPolicy_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_ManagementPolicy_Spec{}), generators) + + return storageAccounts_ManagementPolicy_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec(gens map[string]gopter.Gen) { + gens["OriginalVersion"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec(gens map[string]gopter.Gen) { + gens["Policy"] = gen.PtrOf(ManagementPolicySchemaGenerator()) +} + +func Test_StorageAccounts_ManagementPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_ManagementPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_ManagementPolicy_STATUS, StorageAccounts_ManagementPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_ManagementPolicy_STATUS runs a test to see if a specific instance of StorageAccounts_ManagementPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_ManagementPolicy_STATUS(subject StorageAccounts_ManagementPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_ManagementPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_ManagementPolicy_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_ManagementPolicy_STATUSGenerator() +var storageAccounts_ManagementPolicy_STATUSGenerator gopter.Gen + +// StorageAccounts_ManagementPolicy_STATUSGenerator returns a generator of StorageAccounts_ManagementPolicy_STATUS instances for property testing. +// We first initialize storageAccounts_ManagementPolicy_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_ManagementPolicy_STATUSGenerator() gopter.Gen { + if storageAccounts_ManagementPolicy_STATUSGenerator != nil { + return storageAccounts_ManagementPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS(generators) + storageAccounts_ManagementPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_ManagementPolicy_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS(generators) + storageAccounts_ManagementPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_ManagementPolicy_STATUS{}), generators) + + return storageAccounts_ManagementPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedTime"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS(gens map[string]gopter.Gen) { + gens["Policy"] = gen.PtrOf(ManagementPolicySchema_STATUSGenerator()) +} + +func Test_ManagementPolicySchema_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicySchema via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicySchema, ManagementPolicySchemaGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicySchema runs a test to see if a specific instance of ManagementPolicySchema round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicySchema(subject ManagementPolicySchema) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicySchema + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicySchema instances for property testing - lazily instantiated by +// ManagementPolicySchemaGenerator() +var managementPolicySchemaGenerator gopter.Gen + +// ManagementPolicySchemaGenerator returns a generator of ManagementPolicySchema instances for property testing. +func ManagementPolicySchemaGenerator() gopter.Gen { + if managementPolicySchemaGenerator != nil { + return managementPolicySchemaGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicySchema(generators) + managementPolicySchemaGenerator = gen.Struct(reflect.TypeOf(ManagementPolicySchema{}), generators) + + return managementPolicySchemaGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicySchema is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicySchema(gens map[string]gopter.Gen) { + gens["Rules"] = gen.SliceOf(ManagementPolicyRuleGenerator()) +} + +func Test_ManagementPolicySchema_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicySchema_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicySchema_STATUS, ManagementPolicySchema_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicySchema_STATUS runs a test to see if a specific instance of ManagementPolicySchema_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicySchema_STATUS(subject ManagementPolicySchema_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicySchema_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicySchema_STATUS instances for property testing - lazily instantiated by +// ManagementPolicySchema_STATUSGenerator() +var managementPolicySchema_STATUSGenerator gopter.Gen + +// ManagementPolicySchema_STATUSGenerator returns a generator of ManagementPolicySchema_STATUS instances for property testing. +func ManagementPolicySchema_STATUSGenerator() gopter.Gen { + if managementPolicySchema_STATUSGenerator != nil { + return managementPolicySchema_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicySchema_STATUS(generators) + managementPolicySchema_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicySchema_STATUS{}), generators) + + return managementPolicySchema_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicySchema_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicySchema_STATUS(gens map[string]gopter.Gen) { + gens["Rules"] = gen.SliceOf(ManagementPolicyRule_STATUSGenerator()) +} + +func Test_ManagementPolicyRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyRule, ManagementPolicyRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyRule runs a test to see if a specific instance of ManagementPolicyRule round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyRule(subject ManagementPolicyRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyRule instances for property testing - lazily instantiated by +// ManagementPolicyRuleGenerator() +var managementPolicyRuleGenerator gopter.Gen + +// ManagementPolicyRuleGenerator returns a generator of ManagementPolicyRule instances for property testing. +// We first initialize managementPolicyRuleGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyRuleGenerator() gopter.Gen { + if managementPolicyRuleGenerator != nil { + return managementPolicyRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyRule(generators) + managementPolicyRuleGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyRule(generators) + AddRelatedPropertyGeneratorsForManagementPolicyRule(generators) + managementPolicyRuleGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule{}), generators) + + return managementPolicyRuleGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyRule(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyRule is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyRule(gens map[string]gopter.Gen) { + gens["Definition"] = gen.PtrOf(ManagementPolicyDefinitionGenerator()) +} + +func Test_ManagementPolicyRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyRule_STATUS, ManagementPolicyRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyRule_STATUS runs a test to see if a specific instance of ManagementPolicyRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyRule_STATUS(subject ManagementPolicyRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyRule_STATUS instances for property testing - lazily instantiated by +// ManagementPolicyRule_STATUSGenerator() +var managementPolicyRule_STATUSGenerator gopter.Gen + +// ManagementPolicyRule_STATUSGenerator returns a generator of ManagementPolicyRule_STATUS instances for property testing. +// We first initialize managementPolicyRule_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyRule_STATUSGenerator() gopter.Gen { + if managementPolicyRule_STATUSGenerator != nil { + return managementPolicyRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS(generators) + managementPolicyRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS(generators) + AddRelatedPropertyGeneratorsForManagementPolicyRule_STATUS(generators) + managementPolicyRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule_STATUS{}), generators) + + return managementPolicyRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyRule_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyRule_STATUS(gens map[string]gopter.Gen) { + gens["Definition"] = gen.PtrOf(ManagementPolicyDefinition_STATUSGenerator()) +} + +func Test_ManagementPolicyDefinition_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyDefinition via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyDefinition, ManagementPolicyDefinitionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyDefinition runs a test to see if a specific instance of ManagementPolicyDefinition round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyDefinition(subject ManagementPolicyDefinition) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyDefinition + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyDefinition instances for property testing - lazily instantiated by +// ManagementPolicyDefinitionGenerator() +var managementPolicyDefinitionGenerator gopter.Gen + +// ManagementPolicyDefinitionGenerator returns a generator of ManagementPolicyDefinition instances for property testing. +func ManagementPolicyDefinitionGenerator() gopter.Gen { + if managementPolicyDefinitionGenerator != nil { + return managementPolicyDefinitionGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyDefinition(generators) + managementPolicyDefinitionGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyDefinition{}), generators) + + return managementPolicyDefinitionGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyDefinition is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyDefinition(gens map[string]gopter.Gen) { + gens["Actions"] = gen.PtrOf(ManagementPolicyActionGenerator()) + gens["Filters"] = gen.PtrOf(ManagementPolicyFilterGenerator()) +} + +func Test_ManagementPolicyDefinition_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyDefinition_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyDefinition_STATUS, ManagementPolicyDefinition_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyDefinition_STATUS runs a test to see if a specific instance of ManagementPolicyDefinition_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyDefinition_STATUS(subject ManagementPolicyDefinition_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyDefinition_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyDefinition_STATUS instances for property testing - lazily instantiated by +// ManagementPolicyDefinition_STATUSGenerator() +var managementPolicyDefinition_STATUSGenerator gopter.Gen + +// ManagementPolicyDefinition_STATUSGenerator returns a generator of ManagementPolicyDefinition_STATUS instances for property testing. +func ManagementPolicyDefinition_STATUSGenerator() gopter.Gen { + if managementPolicyDefinition_STATUSGenerator != nil { + return managementPolicyDefinition_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyDefinition_STATUS(generators) + managementPolicyDefinition_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyDefinition_STATUS{}), generators) + + return managementPolicyDefinition_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyDefinition_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyDefinition_STATUS(gens map[string]gopter.Gen) { + gens["Actions"] = gen.PtrOf(ManagementPolicyAction_STATUSGenerator()) + gens["Filters"] = gen.PtrOf(ManagementPolicyFilter_STATUSGenerator()) +} + +func Test_ManagementPolicyAction_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyAction via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyAction, ManagementPolicyActionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyAction runs a test to see if a specific instance of ManagementPolicyAction round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyAction(subject ManagementPolicyAction) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyAction + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyAction instances for property testing - lazily instantiated by +// ManagementPolicyActionGenerator() +var managementPolicyActionGenerator gopter.Gen + +// ManagementPolicyActionGenerator returns a generator of ManagementPolicyAction instances for property testing. +func ManagementPolicyActionGenerator() gopter.Gen { + if managementPolicyActionGenerator != nil { + return managementPolicyActionGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyAction(generators) + managementPolicyActionGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyAction{}), generators) + + return managementPolicyActionGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyAction is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyAction(gens map[string]gopter.Gen) { + gens["BaseBlob"] = gen.PtrOf(ManagementPolicyBaseBlobGenerator()) + gens["Snapshot"] = gen.PtrOf(ManagementPolicySnapShotGenerator()) + gens["Version"] = gen.PtrOf(ManagementPolicyVersionGenerator()) +} + +func Test_ManagementPolicyAction_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyAction_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyAction_STATUS, ManagementPolicyAction_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyAction_STATUS runs a test to see if a specific instance of ManagementPolicyAction_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyAction_STATUS(subject ManagementPolicyAction_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyAction_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyAction_STATUS instances for property testing - lazily instantiated by +// ManagementPolicyAction_STATUSGenerator() +var managementPolicyAction_STATUSGenerator gopter.Gen + +// ManagementPolicyAction_STATUSGenerator returns a generator of ManagementPolicyAction_STATUS instances for property testing. +func ManagementPolicyAction_STATUSGenerator() gopter.Gen { + if managementPolicyAction_STATUSGenerator != nil { + return managementPolicyAction_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyAction_STATUS(generators) + managementPolicyAction_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyAction_STATUS{}), generators) + + return managementPolicyAction_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyAction_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyAction_STATUS(gens map[string]gopter.Gen) { + gens["BaseBlob"] = gen.PtrOf(ManagementPolicyBaseBlob_STATUSGenerator()) + gens["Snapshot"] = gen.PtrOf(ManagementPolicySnapShot_STATUSGenerator()) + gens["Version"] = gen.PtrOf(ManagementPolicyVersion_STATUSGenerator()) +} + +func Test_ManagementPolicyFilter_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyFilter via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyFilter, ManagementPolicyFilterGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyFilter runs a test to see if a specific instance of ManagementPolicyFilter round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyFilter(subject ManagementPolicyFilter) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyFilter + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyFilter instances for property testing - lazily instantiated by +// ManagementPolicyFilterGenerator() +var managementPolicyFilterGenerator gopter.Gen + +// ManagementPolicyFilterGenerator returns a generator of ManagementPolicyFilter instances for property testing. +// We first initialize managementPolicyFilterGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyFilterGenerator() gopter.Gen { + if managementPolicyFilterGenerator != nil { + return managementPolicyFilterGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyFilter(generators) + managementPolicyFilterGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyFilter(generators) + AddRelatedPropertyGeneratorsForManagementPolicyFilter(generators) + managementPolicyFilterGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter{}), generators) + + return managementPolicyFilterGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyFilter is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyFilter(gens map[string]gopter.Gen) { + gens["BlobTypes"] = gen.SliceOf(gen.AlphaString()) + gens["PrefixMatch"] = gen.SliceOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyFilter is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyFilter(gens map[string]gopter.Gen) { + gens["BlobIndexMatch"] = gen.SliceOf(TagFilterGenerator()) +} + +func Test_ManagementPolicyFilter_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyFilter_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyFilter_STATUS, ManagementPolicyFilter_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyFilter_STATUS runs a test to see if a specific instance of ManagementPolicyFilter_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyFilter_STATUS(subject ManagementPolicyFilter_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyFilter_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyFilter_STATUS instances for property testing - lazily instantiated by +// ManagementPolicyFilter_STATUSGenerator() +var managementPolicyFilter_STATUSGenerator gopter.Gen + +// ManagementPolicyFilter_STATUSGenerator returns a generator of ManagementPolicyFilter_STATUS instances for property testing. +// We first initialize managementPolicyFilter_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyFilter_STATUSGenerator() gopter.Gen { + if managementPolicyFilter_STATUSGenerator != nil { + return managementPolicyFilter_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS(generators) + managementPolicyFilter_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS(generators) + AddRelatedPropertyGeneratorsForManagementPolicyFilter_STATUS(generators) + managementPolicyFilter_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter_STATUS{}), generators) + + return managementPolicyFilter_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS(gens map[string]gopter.Gen) { + gens["BlobTypes"] = gen.SliceOf(gen.AlphaString()) + gens["PrefixMatch"] = gen.SliceOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyFilter_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyFilter_STATUS(gens map[string]gopter.Gen) { + gens["BlobIndexMatch"] = gen.SliceOf(TagFilter_STATUSGenerator()) +} + +func Test_ManagementPolicyBaseBlob_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyBaseBlob via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyBaseBlob, ManagementPolicyBaseBlobGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyBaseBlob runs a test to see if a specific instance of ManagementPolicyBaseBlob round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyBaseBlob(subject ManagementPolicyBaseBlob) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyBaseBlob + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyBaseBlob instances for property testing - lazily instantiated by +// ManagementPolicyBaseBlobGenerator() +var managementPolicyBaseBlobGenerator gopter.Gen + +// ManagementPolicyBaseBlobGenerator returns a generator of ManagementPolicyBaseBlob instances for property testing. +// We first initialize managementPolicyBaseBlobGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyBaseBlobGenerator() gopter.Gen { + if managementPolicyBaseBlobGenerator != nil { + return managementPolicyBaseBlobGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob(generators) + managementPolicyBaseBlobGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob(generators) + AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob(generators) + managementPolicyBaseBlobGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob{}), generators) + + return managementPolicyBaseBlobGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob(gens map[string]gopter.Gen) { + gens["EnableAutoTierToHotFromCool"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterModificationGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterModificationGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterModificationGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterModificationGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterModificationGenerator()) +} + +func Test_ManagementPolicyBaseBlob_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyBaseBlob_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyBaseBlob_STATUS, ManagementPolicyBaseBlob_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyBaseBlob_STATUS runs a test to see if a specific instance of ManagementPolicyBaseBlob_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyBaseBlob_STATUS(subject ManagementPolicyBaseBlob_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyBaseBlob_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyBaseBlob_STATUS instances for property testing - lazily instantiated by +// ManagementPolicyBaseBlob_STATUSGenerator() +var managementPolicyBaseBlob_STATUSGenerator gopter.Gen + +// ManagementPolicyBaseBlob_STATUSGenerator returns a generator of ManagementPolicyBaseBlob_STATUS instances for property testing. +// We first initialize managementPolicyBaseBlob_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyBaseBlob_STATUSGenerator() gopter.Gen { + if managementPolicyBaseBlob_STATUSGenerator != nil { + return managementPolicyBaseBlob_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(generators) + managementPolicyBaseBlob_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(generators) + AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(generators) + managementPolicyBaseBlob_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob_STATUS{}), generators) + + return managementPolicyBaseBlob_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(gens map[string]gopter.Gen) { + gens["EnableAutoTierToHotFromCool"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) +} + +func Test_ManagementPolicySnapShot_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicySnapShot via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicySnapShot, ManagementPolicySnapShotGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicySnapShot runs a test to see if a specific instance of ManagementPolicySnapShot round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicySnapShot(subject ManagementPolicySnapShot) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicySnapShot + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicySnapShot instances for property testing - lazily instantiated by +// ManagementPolicySnapShotGenerator() +var managementPolicySnapShotGenerator gopter.Gen + +// ManagementPolicySnapShotGenerator returns a generator of ManagementPolicySnapShot instances for property testing. +func ManagementPolicySnapShotGenerator() gopter.Gen { + if managementPolicySnapShotGenerator != nil { + return managementPolicySnapShotGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicySnapShot(generators) + managementPolicySnapShotGenerator = gen.Struct(reflect.TypeOf(ManagementPolicySnapShot{}), generators) + + return managementPolicySnapShotGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicySnapShot is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicySnapShot(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterCreationGenerator()) +} + +func Test_ManagementPolicySnapShot_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicySnapShot_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicySnapShot_STATUS, ManagementPolicySnapShot_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicySnapShot_STATUS runs a test to see if a specific instance of ManagementPolicySnapShot_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicySnapShot_STATUS(subject ManagementPolicySnapShot_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicySnapShot_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicySnapShot_STATUS instances for property testing - lazily instantiated by +// ManagementPolicySnapShot_STATUSGenerator() +var managementPolicySnapShot_STATUSGenerator gopter.Gen + +// ManagementPolicySnapShot_STATUSGenerator returns a generator of ManagementPolicySnapShot_STATUS instances for property testing. +func ManagementPolicySnapShot_STATUSGenerator() gopter.Gen { + if managementPolicySnapShot_STATUSGenerator != nil { + return managementPolicySnapShot_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicySnapShot_STATUS(generators) + managementPolicySnapShot_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicySnapShot_STATUS{}), generators) + + return managementPolicySnapShot_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicySnapShot_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicySnapShot_STATUS(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) +} + +func Test_ManagementPolicyVersion_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyVersion via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyVersion, ManagementPolicyVersionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyVersion runs a test to see if a specific instance of ManagementPolicyVersion round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyVersion(subject ManagementPolicyVersion) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyVersion + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyVersion instances for property testing - lazily instantiated by +// ManagementPolicyVersionGenerator() +var managementPolicyVersionGenerator gopter.Gen + +// ManagementPolicyVersionGenerator returns a generator of ManagementPolicyVersion instances for property testing. +func ManagementPolicyVersionGenerator() gopter.Gen { + if managementPolicyVersionGenerator != nil { + return managementPolicyVersionGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyVersion(generators) + managementPolicyVersionGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyVersion{}), generators) + + return managementPolicyVersionGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyVersion is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyVersion(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterCreationGenerator()) +} + +func Test_ManagementPolicyVersion_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyVersion_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyVersion_STATUS, ManagementPolicyVersion_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyVersion_STATUS runs a test to see if a specific instance of ManagementPolicyVersion_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyVersion_STATUS(subject ManagementPolicyVersion_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyVersion_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyVersion_STATUS instances for property testing - lazily instantiated by +// ManagementPolicyVersion_STATUSGenerator() +var managementPolicyVersion_STATUSGenerator gopter.Gen + +// ManagementPolicyVersion_STATUSGenerator returns a generator of ManagementPolicyVersion_STATUS instances for property testing. +func ManagementPolicyVersion_STATUSGenerator() gopter.Gen { + if managementPolicyVersion_STATUSGenerator != nil { + return managementPolicyVersion_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyVersion_STATUS(generators) + managementPolicyVersion_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyVersion_STATUS{}), generators) + + return managementPolicyVersion_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyVersion_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyVersion_STATUS(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) +} + +func Test_TagFilter_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TagFilter via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTagFilter, TagFilterGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTagFilter runs a test to see if a specific instance of TagFilter round trips to JSON and back losslessly +func RunJSONSerializationTestForTagFilter(subject TagFilter) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TagFilter + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TagFilter instances for property testing - lazily instantiated by TagFilterGenerator() +var tagFilterGenerator gopter.Gen + +// TagFilterGenerator returns a generator of TagFilter instances for property testing. +func TagFilterGenerator() gopter.Gen { + if tagFilterGenerator != nil { + return tagFilterGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTagFilter(generators) + tagFilterGenerator = gen.Struct(reflect.TypeOf(TagFilter{}), generators) + + return tagFilterGenerator +} + +// AddIndependentPropertyGeneratorsForTagFilter is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTagFilter(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Op"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_TagFilter_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TagFilter_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTagFilter_STATUS, TagFilter_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTagFilter_STATUS runs a test to see if a specific instance of TagFilter_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForTagFilter_STATUS(subject TagFilter_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TagFilter_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TagFilter_STATUS instances for property testing - lazily instantiated by TagFilter_STATUSGenerator() +var tagFilter_STATUSGenerator gopter.Gen + +// TagFilter_STATUSGenerator returns a generator of TagFilter_STATUS instances for property testing. +func TagFilter_STATUSGenerator() gopter.Gen { + if tagFilter_STATUSGenerator != nil { + return tagFilter_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTagFilter_STATUS(generators) + tagFilter_STATUSGenerator = gen.Struct(reflect.TypeOf(TagFilter_STATUS{}), generators) + + return tagFilter_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForTagFilter_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTagFilter_STATUS(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Op"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_DateAfterCreation_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DateAfterCreation via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDateAfterCreation, DateAfterCreationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDateAfterCreation runs a test to see if a specific instance of DateAfterCreation round trips to JSON and back losslessly +func RunJSONSerializationTestForDateAfterCreation(subject DateAfterCreation) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DateAfterCreation + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DateAfterCreation instances for property testing - lazily instantiated by DateAfterCreationGenerator() +var dateAfterCreationGenerator gopter.Gen + +// DateAfterCreationGenerator returns a generator of DateAfterCreation instances for property testing. +func DateAfterCreationGenerator() gopter.Gen { + if dateAfterCreationGenerator != nil { + return dateAfterCreationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDateAfterCreation(generators) + dateAfterCreationGenerator = gen.Struct(reflect.TypeOf(DateAfterCreation{}), generators) + + return dateAfterCreationGenerator +} + +// AddIndependentPropertyGeneratorsForDateAfterCreation is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDateAfterCreation(gens map[string]gopter.Gen) { + gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Int()) + gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Int()) +} + +func Test_DateAfterCreation_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DateAfterCreation_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDateAfterCreation_STATUS, DateAfterCreation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDateAfterCreation_STATUS runs a test to see if a specific instance of DateAfterCreation_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForDateAfterCreation_STATUS(subject DateAfterCreation_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DateAfterCreation_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DateAfterCreation_STATUS instances for property testing - lazily instantiated by +// DateAfterCreation_STATUSGenerator() +var dateAfterCreation_STATUSGenerator gopter.Gen + +// DateAfterCreation_STATUSGenerator returns a generator of DateAfterCreation_STATUS instances for property testing. +func DateAfterCreation_STATUSGenerator() gopter.Gen { + if dateAfterCreation_STATUSGenerator != nil { + return dateAfterCreation_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDateAfterCreation_STATUS(generators) + dateAfterCreation_STATUSGenerator = gen.Struct(reflect.TypeOf(DateAfterCreation_STATUS{}), generators) + + return dateAfterCreation_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForDateAfterCreation_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDateAfterCreation_STATUS(gens map[string]gopter.Gen) { + gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Float64()) + gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Float64()) +} + +func Test_DateAfterModification_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DateAfterModification via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDateAfterModification, DateAfterModificationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDateAfterModification runs a test to see if a specific instance of DateAfterModification round trips to JSON and back losslessly +func RunJSONSerializationTestForDateAfterModification(subject DateAfterModification) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DateAfterModification + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DateAfterModification instances for property testing - lazily instantiated by +// DateAfterModificationGenerator() +var dateAfterModificationGenerator gopter.Gen + +// DateAfterModificationGenerator returns a generator of DateAfterModification instances for property testing. +func DateAfterModificationGenerator() gopter.Gen { + if dateAfterModificationGenerator != nil { + return dateAfterModificationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDateAfterModification(generators) + dateAfterModificationGenerator = gen.Struct(reflect.TypeOf(DateAfterModification{}), generators) + + return dateAfterModificationGenerator +} + +// AddIndependentPropertyGeneratorsForDateAfterModification is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDateAfterModification(gens map[string]gopter.Gen) { + gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Int()) + gens["DaysAfterLastAccessTimeGreaterThan"] = gen.PtrOf(gen.Int()) + gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Int()) + gens["DaysAfterModificationGreaterThan"] = gen.PtrOf(gen.Int()) +} + +func Test_DateAfterModification_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DateAfterModification_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDateAfterModification_STATUS, DateAfterModification_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDateAfterModification_STATUS runs a test to see if a specific instance of DateAfterModification_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForDateAfterModification_STATUS(subject DateAfterModification_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DateAfterModification_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DateAfterModification_STATUS instances for property testing - lazily instantiated by +// DateAfterModification_STATUSGenerator() +var dateAfterModification_STATUSGenerator gopter.Gen + +// DateAfterModification_STATUSGenerator returns a generator of DateAfterModification_STATUS instances for property testing. +func DateAfterModification_STATUSGenerator() gopter.Gen { + if dateAfterModification_STATUSGenerator != nil { + return dateAfterModification_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDateAfterModification_STATUS(generators) + dateAfterModification_STATUSGenerator = gen.Struct(reflect.TypeOf(DateAfterModification_STATUS{}), generators) + + return dateAfterModification_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForDateAfterModification_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDateAfterModification_STATUS(gens map[string]gopter.Gen) { + gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Float64()) + gens["DaysAfterLastAccessTimeGreaterThan"] = gen.PtrOf(gen.Float64()) + gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Float64()) + gens["DaysAfterModificationGreaterThan"] = gen.PtrOf(gen.Float64()) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_queue_service_types_gen.go b/v2/api/storage/v1api20230101/storage/storage_accounts_queue_service_types_gen.go new file mode 100644 index 00000000000..010139b5b33 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_queue_service_types_gen.go @@ -0,0 +1,205 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsqueueservices,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsqueueservices/status,storageaccountsqueueservices/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Storage version of v1api20230101.StorageAccountsQueueService +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/queue.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default +type StorageAccountsQueueService struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_QueueService_Spec `json:"spec,omitempty"` + Status StorageAccounts_QueueService_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsQueueService{} + +// GetConditions returns the conditions of the resource +func (service *StorageAccountsQueueService) GetConditions() conditions.Conditions { + return service.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (service *StorageAccountsQueueService) SetConditions(conditions conditions.Conditions) { + service.Status.Conditions = conditions +} + +var _ genruntime.KubernetesResource = &StorageAccountsQueueService{} + +// AzureName returns the Azure name of the resource (always "default") +func (service *StorageAccountsQueueService) AzureName() string { + return "default" +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (service StorageAccountsQueueService) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (service *StorageAccountsQueueService) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (service *StorageAccountsQueueService) GetSpec() genruntime.ConvertibleSpec { + return &service.Spec +} + +// GetStatus returns the status of this resource +func (service *StorageAccountsQueueService) GetStatus() genruntime.ConvertibleStatus { + return &service.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (service *StorageAccountsQueueService) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/queueServices" +func (service *StorageAccountsQueueService) GetType() string { + return "Microsoft.Storage/storageAccounts/queueServices" +} + +// NewEmptyStatus returns a new empty (blank) status +func (service *StorageAccountsQueueService) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_QueueService_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (service *StorageAccountsQueueService) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(service.Spec) + return service.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (service *StorageAccountsQueueService) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_QueueService_STATUS); ok { + service.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_QueueService_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + service.Status = st + return nil +} + +// Hub marks that this StorageAccountsQueueService is the hub type for conversion +func (service *StorageAccountsQueueService) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (service *StorageAccountsQueueService) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: service.Spec.OriginalVersion, + Kind: "StorageAccountsQueueService", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20230101.StorageAccountsQueueService +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/queue.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default +type StorageAccountsQueueServiceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsQueueService `json:"items"` +} + +// Storage version of v1api20230101.StorageAccounts_QueueService_Spec +type StorageAccounts_QueueService_Spec struct { + Cors *CorsRules `json:"cors,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccount resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccount"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_QueueService_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_QueueService_Spec from the provided source +func (service *StorageAccounts_QueueService_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(service) +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_QueueService_Spec +func (service *StorageAccounts_QueueService_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(service) +} + +// Storage version of v1api20230101.StorageAccounts_QueueService_STATUS +type StorageAccounts_QueueService_STATUS struct { + Conditions []conditions.Condition `json:"conditions,omitempty"` + Cors *CorsRules_STATUS `json:"cors,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_QueueService_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_QueueService_STATUS from the provided source +func (service *StorageAccounts_QueueService_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(service) +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_QueueService_STATUS +func (service *StorageAccounts_QueueService_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(service) +} + +func init() { + SchemeBuilder.Register(&StorageAccountsQueueService{}, &StorageAccountsQueueServiceList{}) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_queue_service_types_gen_test.go b/v2/api/storage/v1api20230101/storage/storage_accounts_queue_service_types_gen_test.go new file mode 100644 index 00000000000..e123ced35f6 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_queue_service_types_gen_test.go @@ -0,0 +1,232 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsQueueService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsQueueService via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsQueueService, StorageAccountsQueueServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsQueueService runs a test to see if a specific instance of StorageAccountsQueueService round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsQueueService(subject StorageAccountsQueueService) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsQueueService + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsQueueService instances for property testing - lazily instantiated by +// StorageAccountsQueueServiceGenerator() +var storageAccountsQueueServiceGenerator gopter.Gen + +// StorageAccountsQueueServiceGenerator returns a generator of StorageAccountsQueueService instances for property testing. +func StorageAccountsQueueServiceGenerator() gopter.Gen { + if storageAccountsQueueServiceGenerator != nil { + return storageAccountsQueueServiceGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsQueueService(generators) + storageAccountsQueueServiceGenerator = gen.Struct(reflect.TypeOf(StorageAccountsQueueService{}), generators) + + return storageAccountsQueueServiceGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsQueueService is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsQueueService(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_QueueService_SpecGenerator() + gens["Status"] = StorageAccounts_QueueService_STATUSGenerator() +} + +func Test_StorageAccounts_QueueService_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueService_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueService_Spec, StorageAccounts_QueueService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueService_Spec runs a test to see if a specific instance of StorageAccounts_QueueService_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueService_Spec(subject StorageAccounts_QueueService_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueService_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueService_Spec instances for property testing - lazily instantiated by +// StorageAccounts_QueueService_SpecGenerator() +var storageAccounts_QueueService_SpecGenerator gopter.Gen + +// StorageAccounts_QueueService_SpecGenerator returns a generator of StorageAccounts_QueueService_Spec instances for property testing. +// We first initialize storageAccounts_QueueService_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_QueueService_SpecGenerator() gopter.Gen { + if storageAccounts_QueueService_SpecGenerator != nil { + return storageAccounts_QueueService_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_Spec(generators) + storageAccounts_QueueService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Spec(generators) + storageAccounts_QueueService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_Spec{}), generators) + + return storageAccounts_QueueService_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_Spec(gens map[string]gopter.Gen) { + gens["OriginalVersion"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Spec(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRulesGenerator()) +} + +func Test_StorageAccounts_QueueService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueService_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueService_STATUS, StorageAccounts_QueueService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueService_STATUS runs a test to see if a specific instance of StorageAccounts_QueueService_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueService_STATUS(subject StorageAccounts_QueueService_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueService_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueService_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_QueueService_STATUSGenerator() +var storageAccounts_QueueService_STATUSGenerator gopter.Gen + +// StorageAccounts_QueueService_STATUSGenerator returns a generator of StorageAccounts_QueueService_STATUS instances for property testing. +// We first initialize storageAccounts_QueueService_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_QueueService_STATUSGenerator() gopter.Gen { + if storageAccounts_QueueService_STATUSGenerator != nil { + return storageAccounts_QueueService_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_STATUS(generators) + storageAccounts_QueueService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_STATUS(generators) + storageAccounts_QueueService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_STATUS{}), generators) + + return storageAccounts_QueueService_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_STATUS(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRules_STATUSGenerator()) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_queue_services_queue_types_gen.go b/v2/api/storage/v1api20230101/storage/storage_accounts_queue_services_queue_types_gen.go new file mode 100644 index 00000000000..4af83fa02d0 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_queue_services_queue_types_gen.go @@ -0,0 +1,210 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountsqueueservicesqueues,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountsqueueservicesqueues/status,storageaccountsqueueservicesqueues/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Storage version of v1api20230101.StorageAccountsQueueServicesQueue +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/queue.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName} +type StorageAccountsQueueServicesQueue struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_QueueServices_Queue_Spec `json:"spec,omitempty"` + Status StorageAccounts_QueueServices_Queue_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsQueueServicesQueue{} + +// GetConditions returns the conditions of the resource +func (queue *StorageAccountsQueueServicesQueue) GetConditions() conditions.Conditions { + return queue.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (queue *StorageAccountsQueueServicesQueue) SetConditions(conditions conditions.Conditions) { + queue.Status.Conditions = conditions +} + +var _ genruntime.KubernetesResource = &StorageAccountsQueueServicesQueue{} + +// AzureName returns the Azure name of the resource +func (queue *StorageAccountsQueueServicesQueue) AzureName() string { + return queue.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (queue StorageAccountsQueueServicesQueue) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (queue *StorageAccountsQueueServicesQueue) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (queue *StorageAccountsQueueServicesQueue) GetSpec() genruntime.ConvertibleSpec { + return &queue.Spec +} + +// GetStatus returns the status of this resource +func (queue *StorageAccountsQueueServicesQueue) GetStatus() genruntime.ConvertibleStatus { + return &queue.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (queue *StorageAccountsQueueServicesQueue) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/queueServices/queues" +func (queue *StorageAccountsQueueServicesQueue) GetType() string { + return "Microsoft.Storage/storageAccounts/queueServices/queues" +} + +// NewEmptyStatus returns a new empty (blank) status +func (queue *StorageAccountsQueueServicesQueue) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_QueueServices_Queue_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (queue *StorageAccountsQueueServicesQueue) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(queue.Spec) + return queue.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (queue *StorageAccountsQueueServicesQueue) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_QueueServices_Queue_STATUS); ok { + queue.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_QueueServices_Queue_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + queue.Status = st + return nil +} + +// Hub marks that this StorageAccountsQueueServicesQueue is the hub type for conversion +func (queue *StorageAccountsQueueServicesQueue) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (queue *StorageAccountsQueueServicesQueue) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: queue.Spec.OriginalVersion, + Kind: "StorageAccountsQueueServicesQueue", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20230101.StorageAccountsQueueServicesQueue +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/queue.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName} +type StorageAccountsQueueServicesQueueList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsQueueServicesQueue `json:"items"` +} + +// Storage version of v1api20230101.StorageAccounts_QueueServices_Queue_Spec +type StorageAccounts_QueueServices_Queue_Spec struct { + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + Metadata map[string]string `json:"metadata,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccountsQueueService resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccountsQueueService"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_QueueServices_Queue_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_QueueServices_Queue_Spec from the provided source +func (queue *StorageAccounts_QueueServices_Queue_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == queue { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(queue) +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_QueueServices_Queue_Spec +func (queue *StorageAccounts_QueueServices_Queue_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == queue { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(queue) +} + +// Storage version of v1api20230101.StorageAccounts_QueueServices_Queue_STATUS +type StorageAccounts_QueueServices_Queue_STATUS struct { + ApproximateMessageCount *int `json:"approximateMessageCount,omitempty"` + Conditions []conditions.Condition `json:"conditions,omitempty"` + Id *string `json:"id,omitempty"` + Metadata map[string]string `json:"metadata,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_QueueServices_Queue_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_QueueServices_Queue_STATUS from the provided source +func (queue *StorageAccounts_QueueServices_Queue_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == queue { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(queue) +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_QueueServices_Queue_STATUS +func (queue *StorageAccounts_QueueServices_Queue_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == queue { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(queue) +} + +func init() { + SchemeBuilder.Register(&StorageAccountsQueueServicesQueue{}, &StorageAccountsQueueServicesQueueList{}) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_queue_services_queue_types_gen_test.go b/v2/api/storage/v1api20230101/storage/storage_accounts_queue_services_queue_types_gen_test.go new file mode 100644 index 00000000000..5bfcfb66edd --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_queue_services_queue_types_gen_test.go @@ -0,0 +1,208 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsQueueServicesQueue_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsQueueServicesQueue via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsQueueServicesQueue, StorageAccountsQueueServicesQueueGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsQueueServicesQueue runs a test to see if a specific instance of StorageAccountsQueueServicesQueue round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsQueueServicesQueue(subject StorageAccountsQueueServicesQueue) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsQueueServicesQueue + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsQueueServicesQueue instances for property testing - lazily instantiated by +// StorageAccountsQueueServicesQueueGenerator() +var storageAccountsQueueServicesQueueGenerator gopter.Gen + +// StorageAccountsQueueServicesQueueGenerator returns a generator of StorageAccountsQueueServicesQueue instances for property testing. +func StorageAccountsQueueServicesQueueGenerator() gopter.Gen { + if storageAccountsQueueServicesQueueGenerator != nil { + return storageAccountsQueueServicesQueueGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsQueueServicesQueue(generators) + storageAccountsQueueServicesQueueGenerator = gen.Struct(reflect.TypeOf(StorageAccountsQueueServicesQueue{}), generators) + + return storageAccountsQueueServicesQueueGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsQueueServicesQueue is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsQueueServicesQueue(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_QueueServices_Queue_SpecGenerator() + gens["Status"] = StorageAccounts_QueueServices_Queue_STATUSGenerator() +} + +func Test_StorageAccounts_QueueServices_Queue_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueServices_Queue_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_Spec, StorageAccounts_QueueServices_Queue_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_Spec runs a test to see if a specific instance of StorageAccounts_QueueServices_Queue_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_Spec(subject StorageAccounts_QueueServices_Queue_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueServices_Queue_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueServices_Queue_Spec instances for property testing - lazily instantiated by +// StorageAccounts_QueueServices_Queue_SpecGenerator() +var storageAccounts_QueueServices_Queue_SpecGenerator gopter.Gen + +// StorageAccounts_QueueServices_Queue_SpecGenerator returns a generator of StorageAccounts_QueueServices_Queue_Spec instances for property testing. +func StorageAccounts_QueueServices_Queue_SpecGenerator() gopter.Gen { + if storageAccounts_QueueServices_Queue_SpecGenerator != nil { + return storageAccounts_QueueServices_Queue_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec(generators) + storageAccounts_QueueServices_Queue_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueServices_Queue_Spec{}), generators) + + return storageAccounts_QueueServices_Queue_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec(gens map[string]gopter.Gen) { + gens["AzureName"] = gen.AlphaString() + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["OriginalVersion"] = gen.AlphaString() +} + +func Test_StorageAccounts_QueueServices_Queue_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueServices_Queue_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_STATUS, StorageAccounts_QueueServices_Queue_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_STATUS runs a test to see if a specific instance of StorageAccounts_QueueServices_Queue_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_STATUS(subject StorageAccounts_QueueServices_Queue_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueServices_Queue_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueServices_Queue_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_QueueServices_Queue_STATUSGenerator() +var storageAccounts_QueueServices_Queue_STATUSGenerator gopter.Gen + +// StorageAccounts_QueueServices_Queue_STATUSGenerator returns a generator of StorageAccounts_QueueServices_Queue_STATUS instances for property testing. +func StorageAccounts_QueueServices_Queue_STATUSGenerator() gopter.Gen { + if storageAccounts_QueueServices_Queue_STATUSGenerator != nil { + return storageAccounts_QueueServices_Queue_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS(generators) + storageAccounts_QueueServices_Queue_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueServices_Queue_STATUS{}), generators) + + return storageAccounts_QueueServices_Queue_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS(gens map[string]gopter.Gen) { + gens["ApproximateMessageCount"] = gen.PtrOf(gen.Int()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_table_service_types_gen.go b/v2/api/storage/v1api20230101/storage/storage_accounts_table_service_types_gen.go new file mode 100644 index 00000000000..989fda3e4bb --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_table_service_types_gen.go @@ -0,0 +1,205 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountstableservices,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountstableservices/status,storageaccountstableservices/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Storage version of v1api20230101.StorageAccountsTableService +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/table.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default +type StorageAccountsTableService struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_TableService_Spec `json:"spec,omitempty"` + Status StorageAccounts_TableService_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsTableService{} + +// GetConditions returns the conditions of the resource +func (service *StorageAccountsTableService) GetConditions() conditions.Conditions { + return service.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (service *StorageAccountsTableService) SetConditions(conditions conditions.Conditions) { + service.Status.Conditions = conditions +} + +var _ genruntime.KubernetesResource = &StorageAccountsTableService{} + +// AzureName returns the Azure name of the resource (always "default") +func (service *StorageAccountsTableService) AzureName() string { + return "default" +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (service StorageAccountsTableService) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (service *StorageAccountsTableService) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (service *StorageAccountsTableService) GetSpec() genruntime.ConvertibleSpec { + return &service.Spec +} + +// GetStatus returns the status of this resource +func (service *StorageAccountsTableService) GetStatus() genruntime.ConvertibleStatus { + return &service.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (service *StorageAccountsTableService) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/tableServices" +func (service *StorageAccountsTableService) GetType() string { + return "Microsoft.Storage/storageAccounts/tableServices" +} + +// NewEmptyStatus returns a new empty (blank) status +func (service *StorageAccountsTableService) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_TableService_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (service *StorageAccountsTableService) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(service.Spec) + return service.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (service *StorageAccountsTableService) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_TableService_STATUS); ok { + service.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_TableService_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + service.Status = st + return nil +} + +// Hub marks that this StorageAccountsTableService is the hub type for conversion +func (service *StorageAccountsTableService) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (service *StorageAccountsTableService) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: service.Spec.OriginalVersion, + Kind: "StorageAccountsTableService", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20230101.StorageAccountsTableService +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/table.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default +type StorageAccountsTableServiceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsTableService `json:"items"` +} + +// Storage version of v1api20230101.StorageAccounts_TableService_Spec +type StorageAccounts_TableService_Spec struct { + Cors *CorsRules `json:"cors,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccount resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccount"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_TableService_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_TableService_Spec from the provided source +func (service *StorageAccounts_TableService_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(service) +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_TableService_Spec +func (service *StorageAccounts_TableService_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(service) +} + +// Storage version of v1api20230101.StorageAccounts_TableService_STATUS +type StorageAccounts_TableService_STATUS struct { + Conditions []conditions.Condition `json:"conditions,omitempty"` + Cors *CorsRules_STATUS `json:"cors,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_TableService_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_TableService_STATUS from the provided source +func (service *StorageAccounts_TableService_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(service) +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_TableService_STATUS +func (service *StorageAccounts_TableService_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == service { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(service) +} + +func init() { + SchemeBuilder.Register(&StorageAccountsTableService{}, &StorageAccountsTableServiceList{}) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_table_service_types_gen_test.go b/v2/api/storage/v1api20230101/storage/storage_accounts_table_service_types_gen_test.go new file mode 100644 index 00000000000..180f5de2d87 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_table_service_types_gen_test.go @@ -0,0 +1,232 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsTableService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsTableService via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsTableService, StorageAccountsTableServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsTableService runs a test to see if a specific instance of StorageAccountsTableService round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsTableService(subject StorageAccountsTableService) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsTableService + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsTableService instances for property testing - lazily instantiated by +// StorageAccountsTableServiceGenerator() +var storageAccountsTableServiceGenerator gopter.Gen + +// StorageAccountsTableServiceGenerator returns a generator of StorageAccountsTableService instances for property testing. +func StorageAccountsTableServiceGenerator() gopter.Gen { + if storageAccountsTableServiceGenerator != nil { + return storageAccountsTableServiceGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsTableService(generators) + storageAccountsTableServiceGenerator = gen.Struct(reflect.TypeOf(StorageAccountsTableService{}), generators) + + return storageAccountsTableServiceGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsTableService is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsTableService(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_TableService_SpecGenerator() + gens["Status"] = StorageAccounts_TableService_STATUSGenerator() +} + +func Test_StorageAccounts_TableService_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableService_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableService_Spec, StorageAccounts_TableService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableService_Spec runs a test to see if a specific instance of StorageAccounts_TableService_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableService_Spec(subject StorageAccounts_TableService_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableService_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableService_Spec instances for property testing - lazily instantiated by +// StorageAccounts_TableService_SpecGenerator() +var storageAccounts_TableService_SpecGenerator gopter.Gen + +// StorageAccounts_TableService_SpecGenerator returns a generator of StorageAccounts_TableService_Spec instances for property testing. +// We first initialize storageAccounts_TableService_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_TableService_SpecGenerator() gopter.Gen { + if storageAccounts_TableService_SpecGenerator != nil { + return storageAccounts_TableService_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableService_Spec(generators) + storageAccounts_TableService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableService_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Spec(generators) + storageAccounts_TableService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_Spec{}), generators) + + return storageAccounts_TableService_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_TableService_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_TableService_Spec(gens map[string]gopter.Gen) { + gens["OriginalVersion"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Spec(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRulesGenerator()) +} + +func Test_StorageAccounts_TableService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableService_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableService_STATUS, StorageAccounts_TableService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableService_STATUS runs a test to see if a specific instance of StorageAccounts_TableService_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableService_STATUS(subject StorageAccounts_TableService_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableService_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableService_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_TableService_STATUSGenerator() +var storageAccounts_TableService_STATUSGenerator gopter.Gen + +// StorageAccounts_TableService_STATUSGenerator returns a generator of StorageAccounts_TableService_STATUS instances for property testing. +// We first initialize storageAccounts_TableService_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_TableService_STATUSGenerator() gopter.Gen { + if storageAccounts_TableService_STATUSGenerator != nil { + return storageAccounts_TableService_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableService_STATUS(generators) + storageAccounts_TableService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableService_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_TableService_STATUS(generators) + storageAccounts_TableService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_STATUS{}), generators) + + return storageAccounts_TableService_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_TableService_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_TableService_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableService_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableService_STATUS(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRules_STATUSGenerator()) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_table_services_table_types_gen.go b/v2/api/storage/v1api20230101/storage/storage_accounts_table_services_table_types_gen.go new file mode 100644 index 00000000000..531c3a3ffed --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_table_services_table_types_gen.go @@ -0,0 +1,247 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=storage.azure.com,resources=storageaccountstableservicestables,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccountstableservicestables/status,storageaccountstableservicestables/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Storage version of v1api20230101.StorageAccountsTableServicesTable +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/table.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName} +type StorageAccountsTableServicesTable struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_TableServices_Table_Spec `json:"spec,omitempty"` + Status StorageAccounts_TableServices_Table_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsTableServicesTable{} + +// GetConditions returns the conditions of the resource +func (table *StorageAccountsTableServicesTable) GetConditions() conditions.Conditions { + return table.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (table *StorageAccountsTableServicesTable) SetConditions(conditions conditions.Conditions) { + table.Status.Conditions = conditions +} + +var _ genruntime.KubernetesResource = &StorageAccountsTableServicesTable{} + +// AzureName returns the Azure name of the resource +func (table *StorageAccountsTableServicesTable) AzureName() string { + return table.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (table StorageAccountsTableServicesTable) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (table *StorageAccountsTableServicesTable) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (table *StorageAccountsTableServicesTable) GetSpec() genruntime.ConvertibleSpec { + return &table.Spec +} + +// GetStatus returns the status of this resource +func (table *StorageAccountsTableServicesTable) GetStatus() genruntime.ConvertibleStatus { + return &table.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (table *StorageAccountsTableServicesTable) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/tableServices/tables" +func (table *StorageAccountsTableServicesTable) GetType() string { + return "Microsoft.Storage/storageAccounts/tableServices/tables" +} + +// NewEmptyStatus returns a new empty (blank) status +func (table *StorageAccountsTableServicesTable) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_TableServices_Table_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (table *StorageAccountsTableServicesTable) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(table.Spec) + return table.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (table *StorageAccountsTableServicesTable) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_TableServices_Table_STATUS); ok { + table.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_TableServices_Table_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + table.Status = st + return nil +} + +// Hub marks that this StorageAccountsTableServicesTable is the hub type for conversion +func (table *StorageAccountsTableServicesTable) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (table *StorageAccountsTableServicesTable) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: table.Spec.OriginalVersion, + Kind: "StorageAccountsTableServicesTable", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20230101.StorageAccountsTableServicesTable +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/table.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName} +type StorageAccountsTableServicesTableList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsTableServicesTable `json:"items"` +} + +// Storage version of v1api20230101.StorageAccounts_TableServices_Table_Spec +type StorageAccounts_TableServices_Table_Spec struct { + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccountsTableService resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccountsTableService"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SignedIdentifiers []TableSignedIdentifier `json:"signedIdentifiers,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_TableServices_Table_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_TableServices_Table_Spec from the provided source +func (table *StorageAccounts_TableServices_Table_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == table { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(table) +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_TableServices_Table_Spec +func (table *StorageAccounts_TableServices_Table_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == table { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(table) +} + +// Storage version of v1api20230101.StorageAccounts_TableServices_Table_STATUS +type StorageAccounts_TableServices_Table_STATUS struct { + Conditions []conditions.Condition `json:"conditions,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SignedIdentifiers []TableSignedIdentifier_STATUS `json:"signedIdentifiers,omitempty"` + TableName *string `json:"tableName,omitempty"` + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_TableServices_Table_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_TableServices_Table_STATUS from the provided source +func (table *StorageAccounts_TableServices_Table_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == table { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(table) +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_TableServices_Table_STATUS +func (table *StorageAccounts_TableServices_Table_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == table { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(table) +} + +// Storage version of v1api20230101.TableSignedIdentifier +// Object to set Table Access Policy. +type TableSignedIdentifier struct { + AccessPolicy *TableAccessPolicy `json:"accessPolicy,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + + // +kubebuilder:validation:Required + // Reference: unique-64-character-value of the stored access policy. + Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` +} + +// Storage version of v1api20230101.TableSignedIdentifier_STATUS +// Object to set Table Access Policy. +type TableSignedIdentifier_STATUS struct { + AccessPolicy *TableAccessPolicy_STATUS `json:"accessPolicy,omitempty"` + Id *string `json:"id,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20230101.TableAccessPolicy +// Table Access Policy Properties Object. +type TableAccessPolicy struct { + ExpiryTime *string `json:"expiryTime,omitempty"` + Permission *string `json:"permission,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + StartTime *string `json:"startTime,omitempty"` +} + +// Storage version of v1api20230101.TableAccessPolicy_STATUS +// Table Access Policy Properties Object. +type TableAccessPolicy_STATUS struct { + ExpiryTime *string `json:"expiryTime,omitempty"` + Permission *string `json:"permission,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + StartTime *string `json:"startTime,omitempty"` +} + +func init() { + SchemeBuilder.Register(&StorageAccountsTableServicesTable{}, &StorageAccountsTableServicesTableList{}) +} diff --git a/v2/api/storage/v1api20230101/storage/storage_accounts_table_services_table_types_gen_test.go b/v2/api/storage/v1api20230101/storage/storage_accounts_table_services_table_types_gen_test.go new file mode 100644 index 00000000000..1734b371da2 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/storage_accounts_table_services_table_types_gen_test.go @@ -0,0 +1,495 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsTableServicesTable_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsTableServicesTable via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsTableServicesTable, StorageAccountsTableServicesTableGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsTableServicesTable runs a test to see if a specific instance of StorageAccountsTableServicesTable round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsTableServicesTable(subject StorageAccountsTableServicesTable) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsTableServicesTable + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsTableServicesTable instances for property testing - lazily instantiated by +// StorageAccountsTableServicesTableGenerator() +var storageAccountsTableServicesTableGenerator gopter.Gen + +// StorageAccountsTableServicesTableGenerator returns a generator of StorageAccountsTableServicesTable instances for property testing. +func StorageAccountsTableServicesTableGenerator() gopter.Gen { + if storageAccountsTableServicesTableGenerator != nil { + return storageAccountsTableServicesTableGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsTableServicesTable(generators) + storageAccountsTableServicesTableGenerator = gen.Struct(reflect.TypeOf(StorageAccountsTableServicesTable{}), generators) + + return storageAccountsTableServicesTableGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsTableServicesTable is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsTableServicesTable(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_TableServices_Table_SpecGenerator() + gens["Status"] = StorageAccounts_TableServices_Table_STATUSGenerator() +} + +func Test_StorageAccounts_TableServices_Table_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableServices_Table_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableServices_Table_Spec, StorageAccounts_TableServices_Table_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableServices_Table_Spec runs a test to see if a specific instance of StorageAccounts_TableServices_Table_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableServices_Table_Spec(subject StorageAccounts_TableServices_Table_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableServices_Table_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableServices_Table_Spec instances for property testing - lazily instantiated by +// StorageAccounts_TableServices_Table_SpecGenerator() +var storageAccounts_TableServices_Table_SpecGenerator gopter.Gen + +// StorageAccounts_TableServices_Table_SpecGenerator returns a generator of StorageAccounts_TableServices_Table_Spec instances for property testing. +// We first initialize storageAccounts_TableServices_Table_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_TableServices_Table_SpecGenerator() gopter.Gen { + if storageAccounts_TableServices_Table_SpecGenerator != nil { + return storageAccounts_TableServices_Table_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec(generators) + storageAccounts_TableServices_Table_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableServices_Table_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec(generators) + storageAccounts_TableServices_Table_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableServices_Table_Spec{}), generators) + + return storageAccounts_TableServices_Table_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec(gens map[string]gopter.Gen) { + gens["AzureName"] = gen.AlphaString() + gens["OriginalVersion"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec(gens map[string]gopter.Gen) { + gens["SignedIdentifiers"] = gen.SliceOf(TableSignedIdentifierGenerator()) +} + +func Test_StorageAccounts_TableServices_Table_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableServices_Table_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableServices_Table_STATUS, StorageAccounts_TableServices_Table_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableServices_Table_STATUS runs a test to see if a specific instance of StorageAccounts_TableServices_Table_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableServices_Table_STATUS(subject StorageAccounts_TableServices_Table_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableServices_Table_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableServices_Table_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_TableServices_Table_STATUSGenerator() +var storageAccounts_TableServices_Table_STATUSGenerator gopter.Gen + +// StorageAccounts_TableServices_Table_STATUSGenerator returns a generator of StorageAccounts_TableServices_Table_STATUS instances for property testing. +// We first initialize storageAccounts_TableServices_Table_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_TableServices_Table_STATUSGenerator() gopter.Gen { + if storageAccounts_TableServices_Table_STATUSGenerator != nil { + return storageAccounts_TableServices_Table_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS(generators) + storageAccounts_TableServices_Table_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableServices_Table_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS(generators) + storageAccounts_TableServices_Table_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableServices_Table_STATUS{}), generators) + + return storageAccounts_TableServices_Table_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["TableName"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS(gens map[string]gopter.Gen) { + gens["SignedIdentifiers"] = gen.SliceOf(TableSignedIdentifier_STATUSGenerator()) +} + +func Test_TableSignedIdentifier_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableSignedIdentifier via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableSignedIdentifier, TableSignedIdentifierGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableSignedIdentifier runs a test to see if a specific instance of TableSignedIdentifier round trips to JSON and back losslessly +func RunJSONSerializationTestForTableSignedIdentifier(subject TableSignedIdentifier) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableSignedIdentifier + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableSignedIdentifier instances for property testing - lazily instantiated by +// TableSignedIdentifierGenerator() +var tableSignedIdentifierGenerator gopter.Gen + +// TableSignedIdentifierGenerator returns a generator of TableSignedIdentifier instances for property testing. +func TableSignedIdentifierGenerator() gopter.Gen { + if tableSignedIdentifierGenerator != nil { + return tableSignedIdentifierGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForTableSignedIdentifier(generators) + tableSignedIdentifierGenerator = gen.Struct(reflect.TypeOf(TableSignedIdentifier{}), generators) + + return tableSignedIdentifierGenerator +} + +// AddRelatedPropertyGeneratorsForTableSignedIdentifier is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForTableSignedIdentifier(gens map[string]gopter.Gen) { + gens["AccessPolicy"] = gen.PtrOf(TableAccessPolicyGenerator()) +} + +func Test_TableSignedIdentifier_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableSignedIdentifier_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableSignedIdentifier_STATUS, TableSignedIdentifier_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableSignedIdentifier_STATUS runs a test to see if a specific instance of TableSignedIdentifier_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForTableSignedIdentifier_STATUS(subject TableSignedIdentifier_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableSignedIdentifier_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableSignedIdentifier_STATUS instances for property testing - lazily instantiated by +// TableSignedIdentifier_STATUSGenerator() +var tableSignedIdentifier_STATUSGenerator gopter.Gen + +// TableSignedIdentifier_STATUSGenerator returns a generator of TableSignedIdentifier_STATUS instances for property testing. +// We first initialize tableSignedIdentifier_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func TableSignedIdentifier_STATUSGenerator() gopter.Gen { + if tableSignedIdentifier_STATUSGenerator != nil { + return tableSignedIdentifier_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableSignedIdentifier_STATUS(generators) + tableSignedIdentifier_STATUSGenerator = gen.Struct(reflect.TypeOf(TableSignedIdentifier_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableSignedIdentifier_STATUS(generators) + AddRelatedPropertyGeneratorsForTableSignedIdentifier_STATUS(generators) + tableSignedIdentifier_STATUSGenerator = gen.Struct(reflect.TypeOf(TableSignedIdentifier_STATUS{}), generators) + + return tableSignedIdentifier_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForTableSignedIdentifier_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTableSignedIdentifier_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForTableSignedIdentifier_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForTableSignedIdentifier_STATUS(gens map[string]gopter.Gen) { + gens["AccessPolicy"] = gen.PtrOf(TableAccessPolicy_STATUSGenerator()) +} + +func Test_TableAccessPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableAccessPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableAccessPolicy, TableAccessPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableAccessPolicy runs a test to see if a specific instance of TableAccessPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForTableAccessPolicy(subject TableAccessPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableAccessPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableAccessPolicy instances for property testing - lazily instantiated by TableAccessPolicyGenerator() +var tableAccessPolicyGenerator gopter.Gen + +// TableAccessPolicyGenerator returns a generator of TableAccessPolicy instances for property testing. +func TableAccessPolicyGenerator() gopter.Gen { + if tableAccessPolicyGenerator != nil { + return tableAccessPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableAccessPolicy(generators) + tableAccessPolicyGenerator = gen.Struct(reflect.TypeOf(TableAccessPolicy{}), generators) + + return tableAccessPolicyGenerator +} + +// AddIndependentPropertyGeneratorsForTableAccessPolicy is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTableAccessPolicy(gens map[string]gopter.Gen) { + gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString()) + gens["Permission"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_TableAccessPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableAccessPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableAccessPolicy_STATUS, TableAccessPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableAccessPolicy_STATUS runs a test to see if a specific instance of TableAccessPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForTableAccessPolicy_STATUS(subject TableAccessPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableAccessPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableAccessPolicy_STATUS instances for property testing - lazily instantiated by +// TableAccessPolicy_STATUSGenerator() +var tableAccessPolicy_STATUSGenerator gopter.Gen + +// TableAccessPolicy_STATUSGenerator returns a generator of TableAccessPolicy_STATUS instances for property testing. +func TableAccessPolicy_STATUSGenerator() gopter.Gen { + if tableAccessPolicy_STATUSGenerator != nil { + return tableAccessPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableAccessPolicy_STATUS(generators) + tableAccessPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(TableAccessPolicy_STATUS{}), generators) + + return tableAccessPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForTableAccessPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTableAccessPolicy_STATUS(gens map[string]gopter.Gen) { + gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString()) + gens["Permission"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage/structure.txt b/v2/api/storage/v1api20230101/storage/structure.txt new file mode 100644 index 00000000000..05c63095113 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/structure.txt @@ -0,0 +1,966 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage +├── APIVersion: Enum (1 value) +│ └── "2023-01-01" +├── StorageAccount: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup +│ ├── Spec: Object (34 properties) +│ │ ├── AccessTier: *string +│ │ ├── AllowBlobPublicAccess: *bool +│ │ ├── AllowCrossTenantReplication: *bool +│ │ ├── AllowSharedKeyAccess: *bool +│ │ ├── AllowedCopyScope: *string +│ │ ├── AzureFilesIdentityBasedAuthentication: *Object (4 properties) +│ │ │ ├── ActiveDirectoryProperties: *Object (9 properties) +│ │ │ │ ├── AccountType: *string +│ │ │ │ ├── AzureStorageSid: *string +│ │ │ │ ├── DomainGuid: *string +│ │ │ │ ├── DomainName: *string +│ │ │ │ ├── DomainSid: *string +│ │ │ │ ├── ForestName: *string +│ │ │ │ ├── NetBiosDomainName: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── SamAccountName: *string +│ │ │ ├── DefaultSharePermission: *string +│ │ │ ├── DirectoryServiceOptions: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── AzureName: string +│ │ ├── CustomDomain: *Object (3 properties) +│ │ │ ├── Name: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── UseSubDomainName: *bool +│ │ ├── DefaultToOAuthAuthentication: *bool +│ │ ├── DnsEndpointType: *string +│ │ ├── Encryption: *Object (6 properties) +│ │ │ ├── Identity: *Object (3 properties) +│ │ │ │ ├── FederatedIdentityClientId: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── UserAssignedIdentityReference: *genruntime.ResourceReference +│ │ │ ├── KeySource: *string +│ │ │ ├── Keyvaultproperties: *Object (4 properties) +│ │ │ │ ├── Keyname: *string +│ │ │ │ ├── Keyvaulturi: *string +│ │ │ │ ├── Keyversion: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── RequireInfrastructureEncryption: *bool +│ │ │ └── Services: *Object (5 properties) +│ │ │ ├── Blob: *Object (3 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ ├── KeyType: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── File: *Object (3 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ ├── KeyType: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── Queue: *Object (3 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ ├── KeyType: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ └── Table: *Object (3 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── KeyType: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── ExtendedLocation: *Object (3 properties) +│ │ │ ├── Name: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Type: *string +│ │ ├── Identity: *Object (3 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── Type: *string +│ │ │ └── UserAssignedIdentities: Object (2 properties)[] +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Reference: genruntime.ResourceReference +│ │ ├── ImmutableStorageWithVersioning: *Object (3 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── ImmutabilityPolicy: *Object (4 properties) +│ │ │ │ ├── AllowProtectedAppendWrites: *bool +│ │ │ │ ├── ImmutabilityPeriodSinceCreationInDays: *int +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── State: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── IsHnsEnabled: *bool +│ │ ├── IsLocalUserEnabled: *bool +│ │ ├── IsNfsV3Enabled: *bool +│ │ ├── IsSftpEnabled: *bool +│ │ ├── KeyPolicy: *Object (2 properties) +│ │ │ ├── KeyExpirationPeriodInDays: *int +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── Kind: *string +│ │ ├── LargeFileSharesState: *string +│ │ ├── Location: *string +│ │ ├── MinimumTlsVersion: *string +│ │ ├── NetworkAcls: *Object (6 properties) +│ │ │ ├── Bypass: *string +│ │ │ ├── DefaultAction: *string +│ │ │ ├── IpRules: Object (3 properties)[] +│ │ │ │ ├── Action: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── Value: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── ResourceAccessRules: Object (3 properties)[] +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── ResourceReference: *genruntime.ResourceReference +│ │ │ │ └── TenantId: *string +│ │ │ └── VirtualNetworkRules: Object (4 properties)[] +│ │ │ ├── Action: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── Reference: *genruntime.ResourceReference +│ │ │ └── State: *string +│ │ ├── OperatorSpec: *Object (3 properties) +│ │ │ ├── ConfigMaps: *Object (7 properties) +│ │ │ │ ├── BlobEndpoint: *genruntime.ConfigMapDestination +│ │ │ │ ├── DfsEndpoint: *genruntime.ConfigMapDestination +│ │ │ │ ├── FileEndpoint: *genruntime.ConfigMapDestination +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── QueueEndpoint: *genruntime.ConfigMapDestination +│ │ │ │ ├── TableEndpoint: *genruntime.ConfigMapDestination +│ │ │ │ └── WebEndpoint: *genruntime.ConfigMapDestination +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Secrets: *Object (9 properties) +│ │ │ ├── BlobEndpoint: *genruntime.SecretDestination +│ │ │ ├── DfsEndpoint: *genruntime.SecretDestination +│ │ │ ├── FileEndpoint: *genruntime.SecretDestination +│ │ │ ├── Key1: *genruntime.SecretDestination +│ │ │ ├── Key2: *genruntime.SecretDestination +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── QueueEndpoint: *genruntime.SecretDestination +│ │ │ ├── TableEndpoint: *genruntime.SecretDestination +│ │ │ └── WebEndpoint: *genruntime.SecretDestination +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── PublicNetworkAccess: *string +│ │ ├── RoutingPreference: *Object (4 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── PublishInternetEndpoints: *bool +│ │ │ ├── PublishMicrosoftEndpoints: *bool +│ │ │ └── RoutingChoice: *string +│ │ ├── SasPolicy: *Object (3 properties) +│ │ │ ├── ExpirationAction: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── SasExpirationPeriod: *string +│ │ ├── Sku: *Object (3 properties) +│ │ │ ├── Name: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Tier: *string +│ │ ├── SupportsHttpsTrafficOnly: *bool +│ │ └── Tags: map[string]string +│ └── Status: Object (51 properties) +│ ├── AccessTier: *string +│ ├── AccountMigrationInProgress: *bool +│ ├── AllowBlobPublicAccess: *bool +│ ├── AllowCrossTenantReplication: *bool +│ ├── AllowSharedKeyAccess: *bool +│ ├── AllowedCopyScope: *string +│ ├── AzureFilesIdentityBasedAuthentication: *Object (4 properties) +│ │ ├── ActiveDirectoryProperties: *Object (9 properties) +│ │ │ ├── AccountType: *string +│ │ │ ├── AzureStorageSid: *string +│ │ │ ├── DomainGuid: *string +│ │ │ ├── DomainName: *string +│ │ │ ├── DomainSid: *string +│ │ │ ├── ForestName: *string +│ │ │ ├── NetBiosDomainName: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── SamAccountName: *string +│ │ ├── DefaultSharePermission: *string +│ │ ├── DirectoryServiceOptions: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── BlobRestoreStatus: *Object (5 properties) +│ │ ├── FailureReason: *string +│ │ ├── Parameters: *Object (3 properties) +│ │ │ ├── BlobRanges: Object (3 properties)[] +│ │ │ │ ├── EndRange: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── StartRange: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── TimeToRestore: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── RestoreId: *string +│ │ └── Status: *string +│ ├── Conditions: conditions.Condition[] +│ ├── CreationTime: *string +│ ├── CustomDomain: *Object (3 properties) +│ │ ├── Name: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── UseSubDomainName: *bool +│ ├── DefaultToOAuthAuthentication: *bool +│ ├── DnsEndpointType: *string +│ ├── Encryption: *Object (6 properties) +│ │ ├── Identity: *Object (3 properties) +│ │ │ ├── FederatedIdentityClientId: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── UserAssignedIdentity: *string +│ │ ├── KeySource: *string +│ │ ├── Keyvaultproperties: *Object (7 properties) +│ │ │ ├── CurrentVersionedKeyExpirationTimestamp: *string +│ │ │ ├── CurrentVersionedKeyIdentifier: *string +│ │ │ ├── Keyname: *string +│ │ │ ├── Keyvaulturi: *string +│ │ │ ├── Keyversion: *string +│ │ │ ├── LastKeyRotationTimestamp: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── RequireInfrastructureEncryption: *bool +│ │ └── Services: *Object (5 properties) +│ │ ├── Blob: *Object (4 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── KeyType: *string +│ │ │ ├── LastEnabledTime: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── File: *Object (4 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── KeyType: *string +│ │ │ ├── LastEnabledTime: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── Queue: *Object (4 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── KeyType: *string +│ │ │ ├── LastEnabledTime: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ └── Table: *Object (4 properties) +│ │ ├── Enabled: *bool +│ │ ├── KeyType: *string +│ │ ├── LastEnabledTime: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── ExtendedLocation: *Object (3 properties) +│ │ ├── Name: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Type: *string +│ ├── FailoverInProgress: *bool +│ ├── GeoReplicationStats: *Object (7 properties) +│ │ ├── CanFailover: *bool +│ │ ├── CanPlannedFailover: *bool +│ │ ├── LastSyncTime: *string +│ │ ├── PostFailoverRedundancy: *string +│ │ ├── PostPlannedFailoverRedundancy: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Status: *string +│ ├── Id: *string +│ ├── Identity: *Object (5 properties) +│ │ ├── PrincipalId: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── TenantId: *string +│ │ ├── Type: *string +│ │ └── UserAssignedIdentities: map[string]Object (3 properties) +│ │ ├── ClientId: *string +│ │ ├── PrincipalId: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── ImmutableStorageWithVersioning: *Object (3 properties) +│ │ ├── Enabled: *bool +│ │ ├── ImmutabilityPolicy: *Object (4 properties) +│ │ │ ├── AllowProtectedAppendWrites: *bool +│ │ │ ├── ImmutabilityPeriodSinceCreationInDays: *int +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── State: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── IsHnsEnabled: *bool +│ ├── IsLocalUserEnabled: *bool +│ ├── IsNfsV3Enabled: *bool +│ ├── IsSftpEnabled: *bool +│ ├── IsSkuConversionBlocked: *bool +│ ├── KeyCreationTime: *Object (3 properties) +│ │ ├── Key1: *string +│ │ ├── Key2: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── KeyPolicy: *Object (2 properties) +│ │ ├── KeyExpirationPeriodInDays: *int +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Kind: *string +│ ├── LargeFileSharesState: *string +│ ├── LastGeoFailoverTime: *string +│ ├── Location: *string +│ ├── MinimumTlsVersion: *string +│ ├── Name: *string +│ ├── NetworkAcls: *Object (6 properties) +│ │ ├── Bypass: *string +│ │ ├── DefaultAction: *string +│ │ ├── IpRules: Object (3 properties)[] +│ │ │ ├── Action: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Value: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── ResourceAccessRules: Object (3 properties)[] +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── ResourceId: *string +│ │ │ └── TenantId: *string +│ │ └── VirtualNetworkRules: Object (4 properties)[] +│ │ ├── Action: *string +│ │ ├── Id: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── State: *string +│ ├── PrimaryEndpoints: *Object (9 properties) +│ │ ├── Blob: *string +│ │ ├── Dfs: *string +│ │ ├── File: *string +│ │ ├── InternetEndpoints: *Object (5 properties) +│ │ │ ├── Blob: *string +│ │ │ ├── Dfs: *string +│ │ │ ├── File: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Web: *string +│ │ ├── MicrosoftEndpoints: *Object (7 properties) +│ │ │ ├── Blob: *string +│ │ │ ├── Dfs: *string +│ │ │ ├── File: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── Queue: *string +│ │ │ ├── Table: *string +│ │ │ └── Web: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── Queue: *string +│ │ ├── Table: *string +│ │ └── Web: *string +│ ├── PrimaryLocation: *string +│ ├── PrivateEndpointConnections: Object (2 properties)[] +│ │ ├── Id: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── ProvisioningState: *string +│ ├── PublicNetworkAccess: *string +│ ├── RoutingPreference: *Object (4 properties) +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── PublishInternetEndpoints: *bool +│ │ ├── PublishMicrosoftEndpoints: *bool +│ │ └── RoutingChoice: *string +│ ├── SasPolicy: *Object (3 properties) +│ │ ├── ExpirationAction: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── SasExpirationPeriod: *string +│ ├── SecondaryEndpoints: *Object (9 properties) +│ │ ├── Blob: *string +│ │ ├── Dfs: *string +│ │ ├── File: *string +│ │ ├── InternetEndpoints: *Object (5 properties) +│ │ │ ├── Blob: *string +│ │ │ ├── Dfs: *string +│ │ │ ├── File: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Web: *string +│ │ ├── MicrosoftEndpoints: *Object (7 properties) +│ │ │ ├── Blob: *string +│ │ │ ├── Dfs: *string +│ │ │ ├── File: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── Queue: *string +│ │ │ ├── Table: *string +│ │ │ └── Web: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── Queue: *string +│ │ ├── Table: *string +│ │ └── Web: *string +│ ├── SecondaryLocation: *string +│ ├── Sku: *Object (3 properties) +│ │ ├── Name: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Tier: *string +│ ├── StatusOfPrimary: *string +│ ├── StatusOfSecondary: *string +│ ├── StorageAccountSkuConversionStatus: *Object (5 properties) +│ │ ├── EndTime: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── SkuConversionStatus: *string +│ │ ├── StartTime: *string +│ │ └── TargetSkuName: *string +│ ├── SupportsHttpsTrafficOnly: *bool +│ ├── Tags: map[string]string +│ └── Type: *string +├── StorageAccountsBlobService: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101.StorageAccount +│ ├── Spec: Object (12 properties) +│ │ ├── AutomaticSnapshotPolicyEnabled: *bool +│ │ ├── ChangeFeed: *Object (3 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── RetentionInDays: *int +│ │ ├── ContainerDeleteRetentionPolicy: *Object (4 properties) +│ │ │ ├── AllowPermanentDelete: *bool +│ │ │ ├── Days: *int +│ │ │ ├── Enabled: *bool +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── Cors: *Object (2 properties) +│ │ │ ├── CorsRules: Object (6 properties)[] +│ │ │ │ ├── AllowedHeaders: string[] +│ │ │ │ ├── AllowedMethods: string[] +│ │ │ │ ├── AllowedOrigins: string[] +│ │ │ │ ├── ExposedHeaders: string[] +│ │ │ │ ├── MaxAgeInSeconds: *int +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── DefaultServiceVersion: *string +│ │ ├── DeleteRetentionPolicy: *Object (4 properties) +│ │ │ ├── AllowPermanentDelete: *bool +│ │ │ ├── Days: *int +│ │ │ ├── Enabled: *bool +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── IsVersioningEnabled: *bool +│ │ ├── LastAccessTimeTrackingPolicy: *Object (5 properties) +│ │ │ ├── BlobType: string[] +│ │ │ ├── Enable: *bool +│ │ │ ├── Name: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── TrackingGranularityInDays: *int +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── RestorePolicy: *Object (3 properties) +│ │ ├── Days: *int +│ │ ├── Enabled: *bool +│ │ └── PropertyBag: genruntime.PropertyBag +│ └── Status: Object (15 properties) +│ ├── AutomaticSnapshotPolicyEnabled: *bool +│ ├── ChangeFeed: *Object (3 properties) +│ │ ├── Enabled: *bool +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── RetentionInDays: *int +│ ├── Conditions: conditions.Condition[] +│ ├── ContainerDeleteRetentionPolicy: *Object (4 properties) +│ │ ├── AllowPermanentDelete: *bool +│ │ ├── Days: *int +│ │ ├── Enabled: *bool +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Cors: *Object (2 properties) +│ │ ├── CorsRules: Object (6 properties)[] +│ │ │ ├── AllowedHeaders: string[] +│ │ │ ├── AllowedMethods: string[] +│ │ │ ├── AllowedOrigins: string[] +│ │ │ ├── ExposedHeaders: string[] +│ │ │ ├── MaxAgeInSeconds: *int +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── DefaultServiceVersion: *string +│ ├── DeleteRetentionPolicy: *Object (4 properties) +│ │ ├── AllowPermanentDelete: *bool +│ │ ├── Days: *int +│ │ ├── Enabled: *bool +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Id: *string +│ ├── IsVersioningEnabled: *bool +│ ├── LastAccessTimeTrackingPolicy: *Object (5 properties) +│ │ ├── BlobType: string[] +│ │ ├── Enable: *bool +│ │ ├── Name: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── TrackingGranularityInDays: *int +│ ├── Name: *string +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── RestorePolicy: *Object (5 properties) +│ │ ├── Days: *int +│ │ ├── Enabled: *bool +│ │ ├── LastEnabledTime: *string +│ │ ├── MinRestoreTime: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Sku: *Object (3 properties) +│ │ ├── Name: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Tier: *string +│ └── Type: *string +├── StorageAccountsBlobServicesContainer: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101.StorageAccountsBlobService +│ ├── Spec: Object (11 properties) +│ │ ├── AzureName: string +│ │ ├── DefaultEncryptionScope: *string +│ │ ├── DenyEncryptionScopeOverride: *bool +│ │ ├── EnableNfsV3AllSquash: *bool +│ │ ├── EnableNfsV3RootSquash: *bool +│ │ ├── ImmutableStorageWithVersioning: *Object (2 properties) +│ │ │ ├── Enabled: *bool +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── Metadata: map[string]string +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── PublicAccess: *string +│ └── Status: Object (25 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── DefaultEncryptionScope: *string +│ ├── Deleted: *bool +│ ├── DeletedTime: *string +│ ├── DenyEncryptionScopeOverride: *bool +│ ├── EnableNfsV3AllSquash: *bool +│ ├── EnableNfsV3RootSquash: *bool +│ ├── Etag: *string +│ ├── HasImmutabilityPolicy: *bool +│ ├── HasLegalHold: *bool +│ ├── Id: *string +│ ├── ImmutabilityPolicy: *Object (7 properties) +│ │ ├── AllowProtectedAppendWrites: *bool +│ │ ├── AllowProtectedAppendWritesAll: *bool +│ │ ├── Etag: *string +│ │ ├── ImmutabilityPeriodSinceCreationInDays: *int +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── State: *string +│ │ └── UpdateHistory: Object (9 properties)[] +│ │ ├── AllowProtectedAppendWrites: *bool +│ │ ├── AllowProtectedAppendWritesAll: *bool +│ │ ├── ImmutabilityPeriodSinceCreationInDays: *int +│ │ ├── ObjectIdentifier: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── TenantId: *string +│ │ ├── Timestamp: *string +│ │ ├── Update: *string +│ │ └── Upn: *string +│ ├── ImmutableStorageWithVersioning: *Object (4 properties) +│ │ ├── Enabled: *bool +│ │ ├── MigrationState: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── TimeStamp: *string +│ ├── LastModifiedTime: *string +│ ├── LeaseDuration: *string +│ ├── LeaseState: *string +│ ├── LeaseStatus: *string +│ ├── LegalHold: *Object (4 properties) +│ │ ├── HasLegalHold: *bool +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── ProtectedAppendWritesHistory: *Object (3 properties) +│ │ │ ├── AllowProtectedAppendWritesAll: *bool +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Timestamp: *string +│ │ └── Tags: Object (6 properties)[] +│ │ ├── ObjectIdentifier: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── Tag: *string +│ │ ├── TenantId: *string +│ │ ├── Timestamp: *string +│ │ └── Upn: *string +│ ├── Metadata: map[string]string +│ ├── Name: *string +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── PublicAccess: *string +│ ├── RemainingRetentionDays: *int +│ ├── Type: *string +│ └── Version: *string +├── StorageAccountsFileService: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101.StorageAccount +│ ├── Spec: Object (6 properties) +│ │ ├── Cors: *Object (2 properties) +│ │ │ ├── CorsRules: Object (6 properties)[] +│ │ │ │ ├── AllowedHeaders: string[] +│ │ │ │ ├── AllowedMethods: string[] +│ │ │ │ ├── AllowedOrigins: string[] +│ │ │ │ ├── ExposedHeaders: string[] +│ │ │ │ ├── MaxAgeInSeconds: *int +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── ProtocolSettings: *Object (2 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Smb: *Object (6 properties) +│ │ │ ├── AuthenticationMethods: *string +│ │ │ ├── ChannelEncryption: *string +│ │ │ ├── KerberosTicketEncryption: *string +│ │ │ ├── Multichannel: *Object (2 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Versions: *string +│ │ └── ShareDeleteRetentionPolicy: *Object (4 properties) +│ │ ├── AllowPermanentDelete: *bool +│ │ ├── Days: *int +│ │ ├── Enabled: *bool +│ │ └── PropertyBag: genruntime.PropertyBag +│ └── Status: Object (9 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Cors: *Object (2 properties) +│ │ ├── CorsRules: Object (6 properties)[] +│ │ │ ├── AllowedHeaders: string[] +│ │ │ ├── AllowedMethods: string[] +│ │ │ ├── AllowedOrigins: string[] +│ │ │ ├── ExposedHeaders: string[] +│ │ │ ├── MaxAgeInSeconds: *int +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Id: *string +│ ├── Name: *string +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── ProtocolSettings: *Object (2 properties) +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Smb: *Object (6 properties) +│ │ ├── AuthenticationMethods: *string +│ │ ├── ChannelEncryption: *string +│ │ ├── KerberosTicketEncryption: *string +│ │ ├── Multichannel: *Object (2 properties) +│ │ │ ├── Enabled: *bool +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Versions: *string +│ ├── ShareDeleteRetentionPolicy: *Object (4 properties) +│ │ ├── AllowPermanentDelete: *bool +│ │ ├── Days: *int +│ │ ├── Enabled: *bool +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Sku: *Object (3 properties) +│ │ ├── Name: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Tier: *string +│ └── Type: *string +├── StorageAccountsFileServicesShare: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101.StorageAccountsFileService +│ ├── Spec: Object (10 properties) +│ │ ├── AccessTier: *string +│ │ ├── AzureName: string +│ │ ├── EnabledProtocols: *string +│ │ ├── Metadata: map[string]string +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── RootSquash: *string +│ │ ├── ShareQuota: *int +│ │ └── SignedIdentifiers: Object (3 properties)[] +│ │ ├── AccessPolicy: *Object (4 properties) +│ │ │ ├── ExpiryTime: *string +│ │ │ ├── Permission: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── StartTime: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Reference: *genruntime.ResourceReference +│ └── Status: Object (24 properties) +│ ├── AccessTier: *string +│ ├── AccessTierChangeTime: *string +│ ├── AccessTierStatus: *string +│ ├── Conditions: conditions.Condition[] +│ ├── Deleted: *bool +│ ├── DeletedTime: *string +│ ├── EnabledProtocols: *string +│ ├── Etag: *string +│ ├── Id: *string +│ ├── LastModifiedTime: *string +│ ├── LeaseDuration: *string +│ ├── LeaseState: *string +│ ├── LeaseStatus: *string +│ ├── Metadata: map[string]string +│ ├── Name: *string +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── RemainingRetentionDays: *int +│ ├── RootSquash: *string +│ ├── ShareQuota: *int +│ ├── ShareUsageBytes: *int +│ ├── SignedIdentifiers: Object (3 properties)[] +│ │ ├── AccessPolicy: *Object (4 properties) +│ │ │ ├── ExpiryTime: *string +│ │ │ ├── Permission: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── StartTime: *string +│ │ ├── Id: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── SnapshotTime: *string +│ ├── Type: *string +│ └── Version: *string +├── StorageAccountsManagementPolicy: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101.StorageAccount +│ ├── Spec: Object (4 properties) +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── Policy: *Object (2 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Rules: Object (5 properties)[] +│ │ │ ├── Definition: *Object (3 properties) +│ │ │ │ ├── Actions: *Object (4 properties) +│ │ │ │ │ ├── BaseBlob: *Object (7 properties) +│ │ │ │ │ │ ├── Delete: *Object (5 properties) +│ │ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterModificationGreaterThan: *int +│ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── EnableAutoTierToHotFromCool: *bool +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── TierToArchive: *Object (5 properties) +│ │ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterModificationGreaterThan: *int +│ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── TierToCold: *Object (5 properties) +│ │ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterModificationGreaterThan: *int +│ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── TierToCool: *Object (5 properties) +│ │ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterModificationGreaterThan: *int +│ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── TierToHot: *Object (5 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *int +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ ├── DaysAfterModificationGreaterThan: *int +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── Snapshot: *Object (6 properties) +│ │ │ │ │ │ ├── Delete: *Object (3 properties) +│ │ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── TierToArchive: *Object (3 properties) +│ │ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── TierToCold: *Object (3 properties) +│ │ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── TierToCool: *Object (3 properties) +│ │ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── TierToHot: *Object (3 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── Version: *Object (6 properties) +│ │ │ │ │ ├── Delete: *Object (3 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── TierToArchive: *Object (3 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── TierToCold: *Object (3 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── TierToCool: *Object (3 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── TierToHot: *Object (3 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── Filters: *Object (4 properties) +│ │ │ │ │ ├── BlobIndexMatch: Object (4 properties)[] +│ │ │ │ │ │ ├── Name: *string +│ │ │ │ │ │ ├── Op: *string +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── Value: *string +│ │ │ │ │ ├── BlobTypes: string[] +│ │ │ │ │ ├── PrefixMatch: string[] +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── Enabled: *bool +│ │ │ ├── Name: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Type: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ └── Status: Object (7 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Id: *string +│ ├── LastModifiedTime: *string +│ ├── Name: *string +│ ├── Policy: *Object (2 properties) +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Rules: Object (5 properties)[] +│ │ ├── Definition: *Object (3 properties) +│ │ │ ├── Actions: *Object (4 properties) +│ │ │ │ ├── BaseBlob: *Object (7 properties) +│ │ │ │ │ ├── Delete: *Object (5 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── EnableAutoTierToHotFromCool: *bool +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── TierToArchive: *Object (5 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── TierToCold: *Object (5 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── TierToCool: *Object (5 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── TierToHot: *Object (5 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ ├── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── Snapshot: *Object (6 properties) +│ │ │ │ │ ├── Delete: *Object (3 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── TierToArchive: *Object (3 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── TierToCold: *Object (3 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── TierToCool: *Object (3 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── TierToHot: *Object (3 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── Version: *Object (6 properties) +│ │ │ │ ├── Delete: *Object (3 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── TierToArchive: *Object (3 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── TierToCold: *Object (3 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── TierToCool: *Object (3 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── TierToHot: *Object (3 properties) +│ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── Filters: *Object (4 properties) +│ │ │ │ ├── BlobIndexMatch: Object (4 properties)[] +│ │ │ │ │ ├── Name: *string +│ │ │ │ │ ├── Op: *string +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── Value: *string +│ │ │ │ ├── BlobTypes: string[] +│ │ │ │ ├── PrefixMatch: string[] +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── Enabled: *bool +│ │ ├── Name: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Type: *string +│ ├── PropertyBag: genruntime.PropertyBag +│ └── Type: *string +├── StorageAccountsQueueService: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101.StorageAccount +│ ├── Spec: Object (4 properties) +│ │ ├── Cors: *Object (2 properties) +│ │ │ ├── CorsRules: Object (6 properties)[] +│ │ │ │ ├── AllowedHeaders: string[] +│ │ │ │ ├── AllowedMethods: string[] +│ │ │ │ ├── AllowedOrigins: string[] +│ │ │ │ ├── ExposedHeaders: string[] +│ │ │ │ ├── MaxAgeInSeconds: *int +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ └── PropertyBag: genruntime.PropertyBag +│ └── Status: Object (6 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Cors: *Object (2 properties) +│ │ ├── CorsRules: Object (6 properties)[] +│ │ │ ├── AllowedHeaders: string[] +│ │ │ ├── AllowedMethods: string[] +│ │ │ ├── AllowedOrigins: string[] +│ │ │ ├── ExposedHeaders: string[] +│ │ │ ├── MaxAgeInSeconds: *int +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Id: *string +│ ├── Name: *string +│ ├── PropertyBag: genruntime.PropertyBag +│ └── Type: *string +├── StorageAccountsQueueServicesQueue: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101.StorageAccountsQueueService +│ ├── Spec: Object (5 properties) +│ │ ├── AzureName: string +│ │ ├── Metadata: map[string]string +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ └── PropertyBag: genruntime.PropertyBag +│ └── Status: Object (7 properties) +│ ├── ApproximateMessageCount: *int +│ ├── Conditions: conditions.Condition[] +│ ├── Id: *string +│ ├── Metadata: map[string]string +│ ├── Name: *string +│ ├── PropertyBag: genruntime.PropertyBag +│ └── Type: *string +├── StorageAccountsTableService: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101.StorageAccount +│ ├── Spec: Object (4 properties) +│ │ ├── Cors: *Object (2 properties) +│ │ │ ├── CorsRules: Object (6 properties)[] +│ │ │ │ ├── AllowedHeaders: string[] +│ │ │ │ ├── AllowedMethods: string[] +│ │ │ │ ├── AllowedOrigins: string[] +│ │ │ │ ├── ExposedHeaders: string[] +│ │ │ │ ├── MaxAgeInSeconds: *int +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ └── PropertyBag: genruntime.PropertyBag +│ └── Status: Object (6 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Cors: *Object (2 properties) +│ │ ├── CorsRules: Object (6 properties)[] +│ │ │ ├── AllowedHeaders: string[] +│ │ │ ├── AllowedMethods: string[] +│ │ │ ├── AllowedOrigins: string[] +│ │ │ ├── ExposedHeaders: string[] +│ │ │ ├── MaxAgeInSeconds: *int +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Id: *string +│ ├── Name: *string +│ ├── PropertyBag: genruntime.PropertyBag +│ └── Type: *string +└── StorageAccountsTableServicesTable: Resource + ├── Owner: github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101.StorageAccountsTableService + ├── Spec: Object (5 properties) + │ ├── AzureName: string + │ ├── OriginalVersion: string + │ ├── Owner: *genruntime.KnownResourceReference + │ ├── PropertyBag: genruntime.PropertyBag + │ └── SignedIdentifiers: Object (3 properties)[] + │ ├── AccessPolicy: *Object (4 properties) + │ │ ├── ExpiryTime: *string + │ │ ├── Permission: *string + │ │ ├── PropertyBag: genruntime.PropertyBag + │ │ └── StartTime: *string + │ ├── PropertyBag: genruntime.PropertyBag + │ └── Reference: *genruntime.ResourceReference + └── Status: Object (7 properties) + ├── Conditions: conditions.Condition[] + ├── Id: *string + ├── Name: *string + ├── PropertyBag: genruntime.PropertyBag + ├── SignedIdentifiers: Object (3 properties)[] + │ ├── AccessPolicy: *Object (4 properties) + │ │ ├── ExpiryTime: *string + │ │ ├── Permission: *string + │ │ ├── PropertyBag: genruntime.PropertyBag + │ │ └── StartTime: *string + │ ├── Id: *string + │ └── PropertyBag: genruntime.PropertyBag + ├── TableName: *string + └── Type: *string diff --git a/v2/api/storage/v1api20230101/storage/zz_generated.deepcopy.go b/v2/api/storage/v1api20230101/storage/zz_generated.deepcopy.go new file mode 100644 index 00000000000..98c8748be1d --- /dev/null +++ b/v2/api/storage/v1api20230101/storage/zz_generated.deepcopy.go @@ -0,0 +1,6397 @@ +//go:build !ignore_autogenerated + +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessPolicy) DeepCopyInto(out *AccessPolicy) { + *out = *in + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = new(string) + **out = **in + } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessPolicy. +func (in *AccessPolicy) DeepCopy() *AccessPolicy { + if in == nil { + return nil + } + out := new(AccessPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessPolicy_STATUS) DeepCopyInto(out *AccessPolicy_STATUS) { + *out = *in + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = new(string) + **out = **in + } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessPolicy_STATUS. +func (in *AccessPolicy_STATUS) DeepCopy() *AccessPolicy_STATUS { + if in == nil { + return nil + } + out := new(AccessPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccountImmutabilityPolicyProperties) DeepCopyInto(out *AccountImmutabilityPolicyProperties) { + *out = *in + if in.AllowProtectedAppendWrites != nil { + in, out := &in.AllowProtectedAppendWrites, &out.AllowProtectedAppendWrites + *out = new(bool) + **out = **in + } + if in.ImmutabilityPeriodSinceCreationInDays != nil { + in, out := &in.ImmutabilityPeriodSinceCreationInDays, &out.ImmutabilityPeriodSinceCreationInDays + *out = new(int) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountImmutabilityPolicyProperties. +func (in *AccountImmutabilityPolicyProperties) DeepCopy() *AccountImmutabilityPolicyProperties { + if in == nil { + return nil + } + out := new(AccountImmutabilityPolicyProperties) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccountImmutabilityPolicyProperties_STATUS) DeepCopyInto(out *AccountImmutabilityPolicyProperties_STATUS) { + *out = *in + if in.AllowProtectedAppendWrites != nil { + in, out := &in.AllowProtectedAppendWrites, &out.AllowProtectedAppendWrites + *out = new(bool) + **out = **in + } + if in.ImmutabilityPeriodSinceCreationInDays != nil { + in, out := &in.ImmutabilityPeriodSinceCreationInDays, &out.ImmutabilityPeriodSinceCreationInDays + *out = new(int) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountImmutabilityPolicyProperties_STATUS. +func (in *AccountImmutabilityPolicyProperties_STATUS) DeepCopy() *AccountImmutabilityPolicyProperties_STATUS { + if in == nil { + return nil + } + out := new(AccountImmutabilityPolicyProperties_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ActiveDirectoryProperties) DeepCopyInto(out *ActiveDirectoryProperties) { + *out = *in + if in.AccountType != nil { + in, out := &in.AccountType, &out.AccountType + *out = new(string) + **out = **in + } + if in.AzureStorageSid != nil { + in, out := &in.AzureStorageSid, &out.AzureStorageSid + *out = new(string) + **out = **in + } + if in.DomainGuid != nil { + in, out := &in.DomainGuid, &out.DomainGuid + *out = new(string) + **out = **in + } + if in.DomainName != nil { + in, out := &in.DomainName, &out.DomainName + *out = new(string) + **out = **in + } + if in.DomainSid != nil { + in, out := &in.DomainSid, &out.DomainSid + *out = new(string) + **out = **in + } + if in.ForestName != nil { + in, out := &in.ForestName, &out.ForestName + *out = new(string) + **out = **in + } + if in.NetBiosDomainName != nil { + in, out := &in.NetBiosDomainName, &out.NetBiosDomainName + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SamAccountName != nil { + in, out := &in.SamAccountName, &out.SamAccountName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveDirectoryProperties. +func (in *ActiveDirectoryProperties) DeepCopy() *ActiveDirectoryProperties { + if in == nil { + return nil + } + out := new(ActiveDirectoryProperties) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ActiveDirectoryProperties_STATUS) DeepCopyInto(out *ActiveDirectoryProperties_STATUS) { + *out = *in + if in.AccountType != nil { + in, out := &in.AccountType, &out.AccountType + *out = new(string) + **out = **in + } + if in.AzureStorageSid != nil { + in, out := &in.AzureStorageSid, &out.AzureStorageSid + *out = new(string) + **out = **in + } + if in.DomainGuid != nil { + in, out := &in.DomainGuid, &out.DomainGuid + *out = new(string) + **out = **in + } + if in.DomainName != nil { + in, out := &in.DomainName, &out.DomainName + *out = new(string) + **out = **in + } + if in.DomainSid != nil { + in, out := &in.DomainSid, &out.DomainSid + *out = new(string) + **out = **in + } + if in.ForestName != nil { + in, out := &in.ForestName, &out.ForestName + *out = new(string) + **out = **in + } + if in.NetBiosDomainName != nil { + in, out := &in.NetBiosDomainName, &out.NetBiosDomainName + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SamAccountName != nil { + in, out := &in.SamAccountName, &out.SamAccountName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveDirectoryProperties_STATUS. +func (in *ActiveDirectoryProperties_STATUS) DeepCopy() *ActiveDirectoryProperties_STATUS { + if in == nil { + return nil + } + out := new(ActiveDirectoryProperties_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureFilesIdentityBasedAuthentication) DeepCopyInto(out *AzureFilesIdentityBasedAuthentication) { + *out = *in + if in.ActiveDirectoryProperties != nil { + in, out := &in.ActiveDirectoryProperties, &out.ActiveDirectoryProperties + *out = new(ActiveDirectoryProperties) + (*in).DeepCopyInto(*out) + } + if in.DefaultSharePermission != nil { + in, out := &in.DefaultSharePermission, &out.DefaultSharePermission + *out = new(string) + **out = **in + } + if in.DirectoryServiceOptions != nil { + in, out := &in.DirectoryServiceOptions, &out.DirectoryServiceOptions + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureFilesIdentityBasedAuthentication. +func (in *AzureFilesIdentityBasedAuthentication) DeepCopy() *AzureFilesIdentityBasedAuthentication { + if in == nil { + return nil + } + out := new(AzureFilesIdentityBasedAuthentication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureFilesIdentityBasedAuthentication_STATUS) DeepCopyInto(out *AzureFilesIdentityBasedAuthentication_STATUS) { + *out = *in + if in.ActiveDirectoryProperties != nil { + in, out := &in.ActiveDirectoryProperties, &out.ActiveDirectoryProperties + *out = new(ActiveDirectoryProperties_STATUS) + (*in).DeepCopyInto(*out) + } + if in.DefaultSharePermission != nil { + in, out := &in.DefaultSharePermission, &out.DefaultSharePermission + *out = new(string) + **out = **in + } + if in.DirectoryServiceOptions != nil { + in, out := &in.DirectoryServiceOptions, &out.DirectoryServiceOptions + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureFilesIdentityBasedAuthentication_STATUS. +func (in *AzureFilesIdentityBasedAuthentication_STATUS) DeepCopy() *AzureFilesIdentityBasedAuthentication_STATUS { + if in == nil { + return nil + } + out := new(AzureFilesIdentityBasedAuthentication_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlobRestoreParameters_STATUS) DeepCopyInto(out *BlobRestoreParameters_STATUS) { + *out = *in + if in.BlobRanges != nil { + in, out := &in.BlobRanges, &out.BlobRanges + *out = make([]BlobRestoreRange_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TimeToRestore != nil { + in, out := &in.TimeToRestore, &out.TimeToRestore + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlobRestoreParameters_STATUS. +func (in *BlobRestoreParameters_STATUS) DeepCopy() *BlobRestoreParameters_STATUS { + if in == nil { + return nil + } + out := new(BlobRestoreParameters_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlobRestoreRange_STATUS) DeepCopyInto(out *BlobRestoreRange_STATUS) { + *out = *in + if in.EndRange != nil { + in, out := &in.EndRange, &out.EndRange + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.StartRange != nil { + in, out := &in.StartRange, &out.StartRange + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlobRestoreRange_STATUS. +func (in *BlobRestoreRange_STATUS) DeepCopy() *BlobRestoreRange_STATUS { + if in == nil { + return nil + } + out := new(BlobRestoreRange_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlobRestoreStatus_STATUS) DeepCopyInto(out *BlobRestoreStatus_STATUS) { + *out = *in + if in.FailureReason != nil { + in, out := &in.FailureReason, &out.FailureReason + *out = new(string) + **out = **in + } + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = new(BlobRestoreParameters_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RestoreId != nil { + in, out := &in.RestoreId, &out.RestoreId + *out = new(string) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlobRestoreStatus_STATUS. +func (in *BlobRestoreStatus_STATUS) DeepCopy() *BlobRestoreStatus_STATUS { + if in == nil { + return nil + } + out := new(BlobRestoreStatus_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChangeFeed) DeepCopyInto(out *ChangeFeed) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RetentionInDays != nil { + in, out := &in.RetentionInDays, &out.RetentionInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChangeFeed. +func (in *ChangeFeed) DeepCopy() *ChangeFeed { + if in == nil { + return nil + } + out := new(ChangeFeed) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChangeFeed_STATUS) DeepCopyInto(out *ChangeFeed_STATUS) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RetentionInDays != nil { + in, out := &in.RetentionInDays, &out.RetentionInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChangeFeed_STATUS. +func (in *ChangeFeed_STATUS) DeepCopy() *ChangeFeed_STATUS { + if in == nil { + return nil + } + out := new(ChangeFeed_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CorsRule) DeepCopyInto(out *CorsRule) { + *out = *in + if in.AllowedHeaders != nil { + in, out := &in.AllowedHeaders, &out.AllowedHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedMethods != nil { + in, out := &in.AllowedMethods, &out.AllowedMethods + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedOrigins != nil { + in, out := &in.AllowedOrigins, &out.AllowedOrigins + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ExposedHeaders != nil { + in, out := &in.ExposedHeaders, &out.ExposedHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MaxAgeInSeconds != nil { + in, out := &in.MaxAgeInSeconds, &out.MaxAgeInSeconds + *out = new(int) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsRule. +func (in *CorsRule) DeepCopy() *CorsRule { + if in == nil { + return nil + } + out := new(CorsRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CorsRule_STATUS) DeepCopyInto(out *CorsRule_STATUS) { + *out = *in + if in.AllowedHeaders != nil { + in, out := &in.AllowedHeaders, &out.AllowedHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedMethods != nil { + in, out := &in.AllowedMethods, &out.AllowedMethods + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedOrigins != nil { + in, out := &in.AllowedOrigins, &out.AllowedOrigins + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ExposedHeaders != nil { + in, out := &in.ExposedHeaders, &out.ExposedHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MaxAgeInSeconds != nil { + in, out := &in.MaxAgeInSeconds, &out.MaxAgeInSeconds + *out = new(int) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsRule_STATUS. +func (in *CorsRule_STATUS) DeepCopy() *CorsRule_STATUS { + if in == nil { + return nil + } + out := new(CorsRule_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CorsRules) DeepCopyInto(out *CorsRules) { + *out = *in + if in.CorsRules != nil { + in, out := &in.CorsRules, &out.CorsRules + *out = make([]CorsRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsRules. +func (in *CorsRules) DeepCopy() *CorsRules { + if in == nil { + return nil + } + out := new(CorsRules) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CorsRules_STATUS) DeepCopyInto(out *CorsRules_STATUS) { + *out = *in + if in.CorsRules != nil { + in, out := &in.CorsRules, &out.CorsRules + *out = make([]CorsRule_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsRules_STATUS. +func (in *CorsRules_STATUS) DeepCopy() *CorsRules_STATUS { + if in == nil { + return nil + } + out := new(CorsRules_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomDomain) DeepCopyInto(out *CustomDomain) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.UseSubDomainName != nil { + in, out := &in.UseSubDomainName, &out.UseSubDomainName + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomDomain. +func (in *CustomDomain) DeepCopy() *CustomDomain { + if in == nil { + return nil + } + out := new(CustomDomain) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomDomain_STATUS) DeepCopyInto(out *CustomDomain_STATUS) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.UseSubDomainName != nil { + in, out := &in.UseSubDomainName, &out.UseSubDomainName + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomDomain_STATUS. +func (in *CustomDomain_STATUS) DeepCopy() *CustomDomain_STATUS { + if in == nil { + return nil + } + out := new(CustomDomain_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DateAfterCreation) DeepCopyInto(out *DateAfterCreation) { + *out = *in + if in.DaysAfterCreationGreaterThan != nil { + in, out := &in.DaysAfterCreationGreaterThan, &out.DaysAfterCreationGreaterThan + *out = new(int) + **out = **in + } + if in.DaysAfterLastTierChangeGreaterThan != nil { + in, out := &in.DaysAfterLastTierChangeGreaterThan, &out.DaysAfterLastTierChangeGreaterThan + *out = new(int) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DateAfterCreation. +func (in *DateAfterCreation) DeepCopy() *DateAfterCreation { + if in == nil { + return nil + } + out := new(DateAfterCreation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DateAfterCreation_STATUS) DeepCopyInto(out *DateAfterCreation_STATUS) { + *out = *in + if in.DaysAfterCreationGreaterThan != nil { + in, out := &in.DaysAfterCreationGreaterThan, &out.DaysAfterCreationGreaterThan + *out = new(float64) + **out = **in + } + if in.DaysAfterLastTierChangeGreaterThan != nil { + in, out := &in.DaysAfterLastTierChangeGreaterThan, &out.DaysAfterLastTierChangeGreaterThan + *out = new(float64) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DateAfterCreation_STATUS. +func (in *DateAfterCreation_STATUS) DeepCopy() *DateAfterCreation_STATUS { + if in == nil { + return nil + } + out := new(DateAfterCreation_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DateAfterModification) DeepCopyInto(out *DateAfterModification) { + *out = *in + if in.DaysAfterCreationGreaterThan != nil { + in, out := &in.DaysAfterCreationGreaterThan, &out.DaysAfterCreationGreaterThan + *out = new(int) + **out = **in + } + if in.DaysAfterLastAccessTimeGreaterThan != nil { + in, out := &in.DaysAfterLastAccessTimeGreaterThan, &out.DaysAfterLastAccessTimeGreaterThan + *out = new(int) + **out = **in + } + if in.DaysAfterLastTierChangeGreaterThan != nil { + in, out := &in.DaysAfterLastTierChangeGreaterThan, &out.DaysAfterLastTierChangeGreaterThan + *out = new(int) + **out = **in + } + if in.DaysAfterModificationGreaterThan != nil { + in, out := &in.DaysAfterModificationGreaterThan, &out.DaysAfterModificationGreaterThan + *out = new(int) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DateAfterModification. +func (in *DateAfterModification) DeepCopy() *DateAfterModification { + if in == nil { + return nil + } + out := new(DateAfterModification) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DateAfterModification_STATUS) DeepCopyInto(out *DateAfterModification_STATUS) { + *out = *in + if in.DaysAfterCreationGreaterThan != nil { + in, out := &in.DaysAfterCreationGreaterThan, &out.DaysAfterCreationGreaterThan + *out = new(float64) + **out = **in + } + if in.DaysAfterLastAccessTimeGreaterThan != nil { + in, out := &in.DaysAfterLastAccessTimeGreaterThan, &out.DaysAfterLastAccessTimeGreaterThan + *out = new(float64) + **out = **in + } + if in.DaysAfterLastTierChangeGreaterThan != nil { + in, out := &in.DaysAfterLastTierChangeGreaterThan, &out.DaysAfterLastTierChangeGreaterThan + *out = new(float64) + **out = **in + } + if in.DaysAfterModificationGreaterThan != nil { + in, out := &in.DaysAfterModificationGreaterThan, &out.DaysAfterModificationGreaterThan + *out = new(float64) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DateAfterModification_STATUS. +func (in *DateAfterModification_STATUS) DeepCopy() *DateAfterModification_STATUS { + if in == nil { + return nil + } + out := new(DateAfterModification_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeleteRetentionPolicy) DeepCopyInto(out *DeleteRetentionPolicy) { + *out = *in + if in.AllowPermanentDelete != nil { + in, out := &in.AllowPermanentDelete, &out.AllowPermanentDelete + *out = new(bool) + **out = **in + } + if in.Days != nil { + in, out := &in.Days, &out.Days + *out = new(int) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteRetentionPolicy. +func (in *DeleteRetentionPolicy) DeepCopy() *DeleteRetentionPolicy { + if in == nil { + return nil + } + out := new(DeleteRetentionPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeleteRetentionPolicy_STATUS) DeepCopyInto(out *DeleteRetentionPolicy_STATUS) { + *out = *in + if in.AllowPermanentDelete != nil { + in, out := &in.AllowPermanentDelete, &out.AllowPermanentDelete + *out = new(bool) + **out = **in + } + if in.Days != nil { + in, out := &in.Days, &out.Days + *out = new(int) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteRetentionPolicy_STATUS. +func (in *DeleteRetentionPolicy_STATUS) DeepCopy() *DeleteRetentionPolicy_STATUS { + if in == nil { + return nil + } + out := new(DeleteRetentionPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Encryption) DeepCopyInto(out *Encryption) { + *out = *in + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(EncryptionIdentity) + (*in).DeepCopyInto(*out) + } + if in.KeySource != nil { + in, out := &in.KeySource, &out.KeySource + *out = new(string) + **out = **in + } + if in.Keyvaultproperties != nil { + in, out := &in.Keyvaultproperties, &out.Keyvaultproperties + *out = new(KeyVaultProperties) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RequireInfrastructureEncryption != nil { + in, out := &in.RequireInfrastructureEncryption, &out.RequireInfrastructureEncryption + *out = new(bool) + **out = **in + } + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = new(EncryptionServices) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Encryption. +func (in *Encryption) DeepCopy() *Encryption { + if in == nil { + return nil + } + out := new(Encryption) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionIdentity) DeepCopyInto(out *EncryptionIdentity) { + *out = *in + if in.FederatedIdentityClientId != nil { + in, out := &in.FederatedIdentityClientId, &out.FederatedIdentityClientId + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.UserAssignedIdentityReference != nil { + in, out := &in.UserAssignedIdentityReference, &out.UserAssignedIdentityReference + *out = new(genruntime.ResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionIdentity. +func (in *EncryptionIdentity) DeepCopy() *EncryptionIdentity { + if in == nil { + return nil + } + out := new(EncryptionIdentity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionIdentity_STATUS) DeepCopyInto(out *EncryptionIdentity_STATUS) { + *out = *in + if in.FederatedIdentityClientId != nil { + in, out := &in.FederatedIdentityClientId, &out.FederatedIdentityClientId + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.UserAssignedIdentity != nil { + in, out := &in.UserAssignedIdentity, &out.UserAssignedIdentity + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionIdentity_STATUS. +func (in *EncryptionIdentity_STATUS) DeepCopy() *EncryptionIdentity_STATUS { + if in == nil { + return nil + } + out := new(EncryptionIdentity_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionService) DeepCopyInto(out *EncryptionService) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.KeyType != nil { + in, out := &in.KeyType, &out.KeyType + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionService. +func (in *EncryptionService) DeepCopy() *EncryptionService { + if in == nil { + return nil + } + out := new(EncryptionService) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionService_STATUS) DeepCopyInto(out *EncryptionService_STATUS) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.KeyType != nil { + in, out := &in.KeyType, &out.KeyType + *out = new(string) + **out = **in + } + if in.LastEnabledTime != nil { + in, out := &in.LastEnabledTime, &out.LastEnabledTime + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionService_STATUS. +func (in *EncryptionService_STATUS) DeepCopy() *EncryptionService_STATUS { + if in == nil { + return nil + } + out := new(EncryptionService_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionServices) DeepCopyInto(out *EncryptionServices) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(EncryptionService) + (*in).DeepCopyInto(*out) + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(EncryptionService) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Queue != nil { + in, out := &in.Queue, &out.Queue + *out = new(EncryptionService) + (*in).DeepCopyInto(*out) + } + if in.Table != nil { + in, out := &in.Table, &out.Table + *out = new(EncryptionService) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionServices. +func (in *EncryptionServices) DeepCopy() *EncryptionServices { + if in == nil { + return nil + } + out := new(EncryptionServices) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionServices_STATUS) DeepCopyInto(out *EncryptionServices_STATUS) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(EncryptionService_STATUS) + (*in).DeepCopyInto(*out) + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(EncryptionService_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Queue != nil { + in, out := &in.Queue, &out.Queue + *out = new(EncryptionService_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Table != nil { + in, out := &in.Table, &out.Table + *out = new(EncryptionService_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionServices_STATUS. +func (in *EncryptionServices_STATUS) DeepCopy() *EncryptionServices_STATUS { + if in == nil { + return nil + } + out := new(EncryptionServices_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Encryption_STATUS) DeepCopyInto(out *Encryption_STATUS) { + *out = *in + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(EncryptionIdentity_STATUS) + (*in).DeepCopyInto(*out) + } + if in.KeySource != nil { + in, out := &in.KeySource, &out.KeySource + *out = new(string) + **out = **in + } + if in.Keyvaultproperties != nil { + in, out := &in.Keyvaultproperties, &out.Keyvaultproperties + *out = new(KeyVaultProperties_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RequireInfrastructureEncryption != nil { + in, out := &in.RequireInfrastructureEncryption, &out.RequireInfrastructureEncryption + *out = new(bool) + **out = **in + } + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = new(EncryptionServices_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Encryption_STATUS. +func (in *Encryption_STATUS) DeepCopy() *Encryption_STATUS { + if in == nil { + return nil + } + out := new(Encryption_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Endpoints_STATUS) DeepCopyInto(out *Endpoints_STATUS) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(string) + **out = **in + } + if in.Dfs != nil { + in, out := &in.Dfs, &out.Dfs + *out = new(string) + **out = **in + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(string) + **out = **in + } + if in.InternetEndpoints != nil { + in, out := &in.InternetEndpoints, &out.InternetEndpoints + *out = new(StorageAccountInternetEndpoints_STATUS) + (*in).DeepCopyInto(*out) + } + if in.MicrosoftEndpoints != nil { + in, out := &in.MicrosoftEndpoints, &out.MicrosoftEndpoints + *out = new(StorageAccountMicrosoftEndpoints_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Queue != nil { + in, out := &in.Queue, &out.Queue + *out = new(string) + **out = **in + } + if in.Table != nil { + in, out := &in.Table, &out.Table + *out = new(string) + **out = **in + } + if in.Web != nil { + in, out := &in.Web, &out.Web + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoints_STATUS. +func (in *Endpoints_STATUS) DeepCopy() *Endpoints_STATUS { + if in == nil { + return nil + } + out := new(Endpoints_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtendedLocation) DeepCopyInto(out *ExtendedLocation) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedLocation. +func (in *ExtendedLocation) DeepCopy() *ExtendedLocation { + if in == nil { + return nil + } + out := new(ExtendedLocation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtendedLocation_STATUS) DeepCopyInto(out *ExtendedLocation_STATUS) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedLocation_STATUS. +func (in *ExtendedLocation_STATUS) DeepCopy() *ExtendedLocation_STATUS { + if in == nil { + return nil + } + out := new(ExtendedLocation_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GeoReplicationStats_STATUS) DeepCopyInto(out *GeoReplicationStats_STATUS) { + *out = *in + if in.CanFailover != nil { + in, out := &in.CanFailover, &out.CanFailover + *out = new(bool) + **out = **in + } + if in.CanPlannedFailover != nil { + in, out := &in.CanPlannedFailover, &out.CanPlannedFailover + *out = new(bool) + **out = **in + } + if in.LastSyncTime != nil { + in, out := &in.LastSyncTime, &out.LastSyncTime + *out = new(string) + **out = **in + } + if in.PostFailoverRedundancy != nil { + in, out := &in.PostFailoverRedundancy, &out.PostFailoverRedundancy + *out = new(string) + **out = **in + } + if in.PostPlannedFailoverRedundancy != nil { + in, out := &in.PostPlannedFailoverRedundancy, &out.PostPlannedFailoverRedundancy + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GeoReplicationStats_STATUS. +func (in *GeoReplicationStats_STATUS) DeepCopy() *GeoReplicationStats_STATUS { + if in == nil { + return nil + } + out := new(GeoReplicationStats_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPRule) DeepCopyInto(out *IPRule) { + *out = *in + if in.Action != nil { + in, out := &in.Action, &out.Action + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRule. +func (in *IPRule) DeepCopy() *IPRule { + if in == nil { + return nil + } + out := new(IPRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPRule_STATUS) DeepCopyInto(out *IPRule_STATUS) { + *out = *in + if in.Action != nil { + in, out := &in.Action, &out.Action + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRule_STATUS. +func (in *IPRule_STATUS) DeepCopy() *IPRule_STATUS { + if in == nil { + return nil + } + out := new(IPRule_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Identity) DeepCopyInto(out *Identity) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make([]UserAssignedIdentityDetails, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity. +func (in *Identity) DeepCopy() *Identity { + if in == nil { + return nil + } + out := new(Identity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Identity_STATUS) DeepCopyInto(out *Identity_STATUS) { + *out = *in + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make(map[string]UserAssignedIdentity_STATUS, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity_STATUS. +func (in *Identity_STATUS) DeepCopy() *Identity_STATUS { + if in == nil { + return nil + } + out := new(Identity_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutabilityPolicyProperties_STATUS) DeepCopyInto(out *ImmutabilityPolicyProperties_STATUS) { + *out = *in + if in.AllowProtectedAppendWrites != nil { + in, out := &in.AllowProtectedAppendWrites, &out.AllowProtectedAppendWrites + *out = new(bool) + **out = **in + } + if in.AllowProtectedAppendWritesAll != nil { + in, out := &in.AllowProtectedAppendWritesAll, &out.AllowProtectedAppendWritesAll + *out = new(bool) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.ImmutabilityPeriodSinceCreationInDays != nil { + in, out := &in.ImmutabilityPeriodSinceCreationInDays, &out.ImmutabilityPeriodSinceCreationInDays + *out = new(int) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(string) + **out = **in + } + if in.UpdateHistory != nil { + in, out := &in.UpdateHistory, &out.UpdateHistory + *out = make([]UpdateHistoryProperty_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutabilityPolicyProperties_STATUS. +func (in *ImmutabilityPolicyProperties_STATUS) DeepCopy() *ImmutabilityPolicyProperties_STATUS { + if in == nil { + return nil + } + out := new(ImmutabilityPolicyProperties_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutableStorageAccount) DeepCopyInto(out *ImmutableStorageAccount) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.ImmutabilityPolicy != nil { + in, out := &in.ImmutabilityPolicy, &out.ImmutabilityPolicy + *out = new(AccountImmutabilityPolicyProperties) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutableStorageAccount. +func (in *ImmutableStorageAccount) DeepCopy() *ImmutableStorageAccount { + if in == nil { + return nil + } + out := new(ImmutableStorageAccount) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutableStorageAccount_STATUS) DeepCopyInto(out *ImmutableStorageAccount_STATUS) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.ImmutabilityPolicy != nil { + in, out := &in.ImmutabilityPolicy, &out.ImmutabilityPolicy + *out = new(AccountImmutabilityPolicyProperties_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutableStorageAccount_STATUS. +func (in *ImmutableStorageAccount_STATUS) DeepCopy() *ImmutableStorageAccount_STATUS { + if in == nil { + return nil + } + out := new(ImmutableStorageAccount_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutableStorageWithVersioning) DeepCopyInto(out *ImmutableStorageWithVersioning) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutableStorageWithVersioning. +func (in *ImmutableStorageWithVersioning) DeepCopy() *ImmutableStorageWithVersioning { + if in == nil { + return nil + } + out := new(ImmutableStorageWithVersioning) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutableStorageWithVersioning_STATUS) DeepCopyInto(out *ImmutableStorageWithVersioning_STATUS) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.MigrationState != nil { + in, out := &in.MigrationState, &out.MigrationState + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TimeStamp != nil { + in, out := &in.TimeStamp, &out.TimeStamp + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutableStorageWithVersioning_STATUS. +func (in *ImmutableStorageWithVersioning_STATUS) DeepCopy() *ImmutableStorageWithVersioning_STATUS { + if in == nil { + return nil + } + out := new(ImmutableStorageWithVersioning_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyCreationTime_STATUS) DeepCopyInto(out *KeyCreationTime_STATUS) { + *out = *in + if in.Key1 != nil { + in, out := &in.Key1, &out.Key1 + *out = new(string) + **out = **in + } + if in.Key2 != nil { + in, out := &in.Key2, &out.Key2 + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCreationTime_STATUS. +func (in *KeyCreationTime_STATUS) DeepCopy() *KeyCreationTime_STATUS { + if in == nil { + return nil + } + out := new(KeyCreationTime_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPolicy) DeepCopyInto(out *KeyPolicy) { + *out = *in + if in.KeyExpirationPeriodInDays != nil { + in, out := &in.KeyExpirationPeriodInDays, &out.KeyExpirationPeriodInDays + *out = new(int) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPolicy. +func (in *KeyPolicy) DeepCopy() *KeyPolicy { + if in == nil { + return nil + } + out := new(KeyPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPolicy_STATUS) DeepCopyInto(out *KeyPolicy_STATUS) { + *out = *in + if in.KeyExpirationPeriodInDays != nil { + in, out := &in.KeyExpirationPeriodInDays, &out.KeyExpirationPeriodInDays + *out = new(int) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPolicy_STATUS. +func (in *KeyPolicy_STATUS) DeepCopy() *KeyPolicy_STATUS { + if in == nil { + return nil + } + out := new(KeyPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyVaultProperties) DeepCopyInto(out *KeyVaultProperties) { + *out = *in + if in.Keyname != nil { + in, out := &in.Keyname, &out.Keyname + *out = new(string) + **out = **in + } + if in.Keyvaulturi != nil { + in, out := &in.Keyvaulturi, &out.Keyvaulturi + *out = new(string) + **out = **in + } + if in.Keyversion != nil { + in, out := &in.Keyversion, &out.Keyversion + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyVaultProperties. +func (in *KeyVaultProperties) DeepCopy() *KeyVaultProperties { + if in == nil { + return nil + } + out := new(KeyVaultProperties) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyVaultProperties_STATUS) DeepCopyInto(out *KeyVaultProperties_STATUS) { + *out = *in + if in.CurrentVersionedKeyExpirationTimestamp != nil { + in, out := &in.CurrentVersionedKeyExpirationTimestamp, &out.CurrentVersionedKeyExpirationTimestamp + *out = new(string) + **out = **in + } + if in.CurrentVersionedKeyIdentifier != nil { + in, out := &in.CurrentVersionedKeyIdentifier, &out.CurrentVersionedKeyIdentifier + *out = new(string) + **out = **in + } + if in.Keyname != nil { + in, out := &in.Keyname, &out.Keyname + *out = new(string) + **out = **in + } + if in.Keyvaulturi != nil { + in, out := &in.Keyvaulturi, &out.Keyvaulturi + *out = new(string) + **out = **in + } + if in.Keyversion != nil { + in, out := &in.Keyversion, &out.Keyversion + *out = new(string) + **out = **in + } + if in.LastKeyRotationTimestamp != nil { + in, out := &in.LastKeyRotationTimestamp, &out.LastKeyRotationTimestamp + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyVaultProperties_STATUS. +func (in *KeyVaultProperties_STATUS) DeepCopy() *KeyVaultProperties_STATUS { + if in == nil { + return nil + } + out := new(KeyVaultProperties_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LastAccessTimeTrackingPolicy) DeepCopyInto(out *LastAccessTimeTrackingPolicy) { + *out = *in + if in.BlobType != nil { + in, out := &in.BlobType, &out.BlobType + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TrackingGranularityInDays != nil { + in, out := &in.TrackingGranularityInDays, &out.TrackingGranularityInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastAccessTimeTrackingPolicy. +func (in *LastAccessTimeTrackingPolicy) DeepCopy() *LastAccessTimeTrackingPolicy { + if in == nil { + return nil + } + out := new(LastAccessTimeTrackingPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LastAccessTimeTrackingPolicy_STATUS) DeepCopyInto(out *LastAccessTimeTrackingPolicy_STATUS) { + *out = *in + if in.BlobType != nil { + in, out := &in.BlobType, &out.BlobType + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TrackingGranularityInDays != nil { + in, out := &in.TrackingGranularityInDays, &out.TrackingGranularityInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastAccessTimeTrackingPolicy_STATUS. +func (in *LastAccessTimeTrackingPolicy_STATUS) DeepCopy() *LastAccessTimeTrackingPolicy_STATUS { + if in == nil { + return nil + } + out := new(LastAccessTimeTrackingPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LegalHoldProperties_STATUS) DeepCopyInto(out *LegalHoldProperties_STATUS) { + *out = *in + if in.HasLegalHold != nil { + in, out := &in.HasLegalHold, &out.HasLegalHold + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ProtectedAppendWritesHistory != nil { + in, out := &in.ProtectedAppendWritesHistory, &out.ProtectedAppendWritesHistory + *out = new(ProtectedAppendWritesHistory_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]TagProperty_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LegalHoldProperties_STATUS. +func (in *LegalHoldProperties_STATUS) DeepCopy() *LegalHoldProperties_STATUS { + if in == nil { + return nil + } + out := new(LegalHoldProperties_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyAction) DeepCopyInto(out *ManagementPolicyAction) { + *out = *in + if in.BaseBlob != nil { + in, out := &in.BaseBlob, &out.BaseBlob + *out = new(ManagementPolicyBaseBlob) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Snapshot != nil { + in, out := &in.Snapshot, &out.Snapshot + *out = new(ManagementPolicySnapShot) + (*in).DeepCopyInto(*out) + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(ManagementPolicyVersion) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyAction. +func (in *ManagementPolicyAction) DeepCopy() *ManagementPolicyAction { + if in == nil { + return nil + } + out := new(ManagementPolicyAction) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyAction_STATUS) DeepCopyInto(out *ManagementPolicyAction_STATUS) { + *out = *in + if in.BaseBlob != nil { + in, out := &in.BaseBlob, &out.BaseBlob + *out = new(ManagementPolicyBaseBlob_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Snapshot != nil { + in, out := &in.Snapshot, &out.Snapshot + *out = new(ManagementPolicySnapShot_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(ManagementPolicyVersion_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyAction_STATUS. +func (in *ManagementPolicyAction_STATUS) DeepCopy() *ManagementPolicyAction_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicyAction_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyBaseBlob) DeepCopyInto(out *ManagementPolicyBaseBlob) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterModification) + (*in).DeepCopyInto(*out) + } + if in.EnableAutoTierToHotFromCool != nil { + in, out := &in.EnableAutoTierToHotFromCool, &out.EnableAutoTierToHotFromCool + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterModification) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterModification) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterModification) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterModification) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyBaseBlob. +func (in *ManagementPolicyBaseBlob) DeepCopy() *ManagementPolicyBaseBlob { + if in == nil { + return nil + } + out := new(ManagementPolicyBaseBlob) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyBaseBlob_STATUS) DeepCopyInto(out *ManagementPolicyBaseBlob_STATUS) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterModification_STATUS) + (*in).DeepCopyInto(*out) + } + if in.EnableAutoTierToHotFromCool != nil { + in, out := &in.EnableAutoTierToHotFromCool, &out.EnableAutoTierToHotFromCool + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterModification_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterModification_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterModification_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterModification_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyBaseBlob_STATUS. +func (in *ManagementPolicyBaseBlob_STATUS) DeepCopy() *ManagementPolicyBaseBlob_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicyBaseBlob_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyDefinition) DeepCopyInto(out *ManagementPolicyDefinition) { + *out = *in + if in.Actions != nil { + in, out := &in.Actions, &out.Actions + *out = new(ManagementPolicyAction) + (*in).DeepCopyInto(*out) + } + if in.Filters != nil { + in, out := &in.Filters, &out.Filters + *out = new(ManagementPolicyFilter) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyDefinition. +func (in *ManagementPolicyDefinition) DeepCopy() *ManagementPolicyDefinition { + if in == nil { + return nil + } + out := new(ManagementPolicyDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyDefinition_STATUS) DeepCopyInto(out *ManagementPolicyDefinition_STATUS) { + *out = *in + if in.Actions != nil { + in, out := &in.Actions, &out.Actions + *out = new(ManagementPolicyAction_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Filters != nil { + in, out := &in.Filters, &out.Filters + *out = new(ManagementPolicyFilter_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyDefinition_STATUS. +func (in *ManagementPolicyDefinition_STATUS) DeepCopy() *ManagementPolicyDefinition_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicyDefinition_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyFilter) DeepCopyInto(out *ManagementPolicyFilter) { + *out = *in + if in.BlobIndexMatch != nil { + in, out := &in.BlobIndexMatch, &out.BlobIndexMatch + *out = make([]TagFilter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.BlobTypes != nil { + in, out := &in.BlobTypes, &out.BlobTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PrefixMatch != nil { + in, out := &in.PrefixMatch, &out.PrefixMatch + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyFilter. +func (in *ManagementPolicyFilter) DeepCopy() *ManagementPolicyFilter { + if in == nil { + return nil + } + out := new(ManagementPolicyFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyFilter_STATUS) DeepCopyInto(out *ManagementPolicyFilter_STATUS) { + *out = *in + if in.BlobIndexMatch != nil { + in, out := &in.BlobIndexMatch, &out.BlobIndexMatch + *out = make([]TagFilter_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.BlobTypes != nil { + in, out := &in.BlobTypes, &out.BlobTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PrefixMatch != nil { + in, out := &in.PrefixMatch, &out.PrefixMatch + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyFilter_STATUS. +func (in *ManagementPolicyFilter_STATUS) DeepCopy() *ManagementPolicyFilter_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicyFilter_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyRule) DeepCopyInto(out *ManagementPolicyRule) { + *out = *in + if in.Definition != nil { + in, out := &in.Definition, &out.Definition + *out = new(ManagementPolicyDefinition) + (*in).DeepCopyInto(*out) + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyRule. +func (in *ManagementPolicyRule) DeepCopy() *ManagementPolicyRule { + if in == nil { + return nil + } + out := new(ManagementPolicyRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyRule_STATUS) DeepCopyInto(out *ManagementPolicyRule_STATUS) { + *out = *in + if in.Definition != nil { + in, out := &in.Definition, &out.Definition + *out = new(ManagementPolicyDefinition_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyRule_STATUS. +func (in *ManagementPolicyRule_STATUS) DeepCopy() *ManagementPolicyRule_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicyRule_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicySchema) DeepCopyInto(out *ManagementPolicySchema) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]ManagementPolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicySchema. +func (in *ManagementPolicySchema) DeepCopy() *ManagementPolicySchema { + if in == nil { + return nil + } + out := new(ManagementPolicySchema) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicySchema_STATUS) DeepCopyInto(out *ManagementPolicySchema_STATUS) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]ManagementPolicyRule_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicySchema_STATUS. +func (in *ManagementPolicySchema_STATUS) DeepCopy() *ManagementPolicySchema_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicySchema_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicySnapShot) DeepCopyInto(out *ManagementPolicySnapShot) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicySnapShot. +func (in *ManagementPolicySnapShot) DeepCopy() *ManagementPolicySnapShot { + if in == nil { + return nil + } + out := new(ManagementPolicySnapShot) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicySnapShot_STATUS) DeepCopyInto(out *ManagementPolicySnapShot_STATUS) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicySnapShot_STATUS. +func (in *ManagementPolicySnapShot_STATUS) DeepCopy() *ManagementPolicySnapShot_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicySnapShot_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyVersion) DeepCopyInto(out *ManagementPolicyVersion) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyVersion. +func (in *ManagementPolicyVersion) DeepCopy() *ManagementPolicyVersion { + if in == nil { + return nil + } + out := new(ManagementPolicyVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyVersion_STATUS) DeepCopyInto(out *ManagementPolicyVersion_STATUS) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyVersion_STATUS. +func (in *ManagementPolicyVersion_STATUS) DeepCopy() *ManagementPolicyVersion_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicyVersion_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Multichannel) DeepCopyInto(out *Multichannel) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Multichannel. +func (in *Multichannel) DeepCopy() *Multichannel { + if in == nil { + return nil + } + out := new(Multichannel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Multichannel_STATUS) DeepCopyInto(out *Multichannel_STATUS) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Multichannel_STATUS. +func (in *Multichannel_STATUS) DeepCopy() *Multichannel_STATUS { + if in == nil { + return nil + } + out := new(Multichannel_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkRuleSet) DeepCopyInto(out *NetworkRuleSet) { + *out = *in + if in.Bypass != nil { + in, out := &in.Bypass, &out.Bypass + *out = new(string) + **out = **in + } + if in.DefaultAction != nil { + in, out := &in.DefaultAction, &out.DefaultAction + *out = new(string) + **out = **in + } + if in.IpRules != nil { + in, out := &in.IpRules, &out.IpRules + *out = make([]IPRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ResourceAccessRules != nil { + in, out := &in.ResourceAccessRules, &out.ResourceAccessRules + *out = make([]ResourceAccessRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VirtualNetworkRules != nil { + in, out := &in.VirtualNetworkRules, &out.VirtualNetworkRules + *out = make([]VirtualNetworkRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRuleSet. +func (in *NetworkRuleSet) DeepCopy() *NetworkRuleSet { + if in == nil { + return nil + } + out := new(NetworkRuleSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkRuleSet_STATUS) DeepCopyInto(out *NetworkRuleSet_STATUS) { + *out = *in + if in.Bypass != nil { + in, out := &in.Bypass, &out.Bypass + *out = new(string) + **out = **in + } + if in.DefaultAction != nil { + in, out := &in.DefaultAction, &out.DefaultAction + *out = new(string) + **out = **in + } + if in.IpRules != nil { + in, out := &in.IpRules, &out.IpRules + *out = make([]IPRule_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ResourceAccessRules != nil { + in, out := &in.ResourceAccessRules, &out.ResourceAccessRules + *out = make([]ResourceAccessRule_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VirtualNetworkRules != nil { + in, out := &in.VirtualNetworkRules, &out.VirtualNetworkRules + *out = make([]VirtualNetworkRule_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRuleSet_STATUS. +func (in *NetworkRuleSet_STATUS) DeepCopy() *NetworkRuleSet_STATUS { + if in == nil { + return nil + } + out := new(NetworkRuleSet_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PrivateEndpointConnection_STATUS) DeepCopyInto(out *PrivateEndpointConnection_STATUS) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateEndpointConnection_STATUS. +func (in *PrivateEndpointConnection_STATUS) DeepCopy() *PrivateEndpointConnection_STATUS { + if in == nil { + return nil + } + out := new(PrivateEndpointConnection_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProtectedAppendWritesHistory_STATUS) DeepCopyInto(out *ProtectedAppendWritesHistory_STATUS) { + *out = *in + if in.AllowProtectedAppendWritesAll != nil { + in, out := &in.AllowProtectedAppendWritesAll, &out.AllowProtectedAppendWritesAll + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Timestamp != nil { + in, out := &in.Timestamp, &out.Timestamp + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtectedAppendWritesHistory_STATUS. +func (in *ProtectedAppendWritesHistory_STATUS) DeepCopy() *ProtectedAppendWritesHistory_STATUS { + if in == nil { + return nil + } + out := new(ProtectedAppendWritesHistory_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProtocolSettings) DeepCopyInto(out *ProtocolSettings) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Smb != nil { + in, out := &in.Smb, &out.Smb + *out = new(SmbSetting) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolSettings. +func (in *ProtocolSettings) DeepCopy() *ProtocolSettings { + if in == nil { + return nil + } + out := new(ProtocolSettings) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProtocolSettings_STATUS) DeepCopyInto(out *ProtocolSettings_STATUS) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Smb != nil { + in, out := &in.Smb, &out.Smb + *out = new(SmbSetting_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolSettings_STATUS. +func (in *ProtocolSettings_STATUS) DeepCopy() *ProtocolSettings_STATUS { + if in == nil { + return nil + } + out := new(ProtocolSettings_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceAccessRule) DeepCopyInto(out *ResourceAccessRule) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ResourceReference != nil { + in, out := &in.ResourceReference, &out.ResourceReference + *out = new(genruntime.ResourceReference) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceAccessRule. +func (in *ResourceAccessRule) DeepCopy() *ResourceAccessRule { + if in == nil { + return nil + } + out := new(ResourceAccessRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceAccessRule_STATUS) DeepCopyInto(out *ResourceAccessRule_STATUS) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ResourceId != nil { + in, out := &in.ResourceId, &out.ResourceId + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceAccessRule_STATUS. +func (in *ResourceAccessRule_STATUS) DeepCopy() *ResourceAccessRule_STATUS { + if in == nil { + return nil + } + out := new(ResourceAccessRule_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RestorePolicyProperties) DeepCopyInto(out *RestorePolicyProperties) { + *out = *in + if in.Days != nil { + in, out := &in.Days, &out.Days + *out = new(int) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestorePolicyProperties. +func (in *RestorePolicyProperties) DeepCopy() *RestorePolicyProperties { + if in == nil { + return nil + } + out := new(RestorePolicyProperties) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RestorePolicyProperties_STATUS) DeepCopyInto(out *RestorePolicyProperties_STATUS) { + *out = *in + if in.Days != nil { + in, out := &in.Days, &out.Days + *out = new(int) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.LastEnabledTime != nil { + in, out := &in.LastEnabledTime, &out.LastEnabledTime + *out = new(string) + **out = **in + } + if in.MinRestoreTime != nil { + in, out := &in.MinRestoreTime, &out.MinRestoreTime + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestorePolicyProperties_STATUS. +func (in *RestorePolicyProperties_STATUS) DeepCopy() *RestorePolicyProperties_STATUS { + if in == nil { + return nil + } + out := new(RestorePolicyProperties_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoutingPreference) DeepCopyInto(out *RoutingPreference) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.PublishInternetEndpoints != nil { + in, out := &in.PublishInternetEndpoints, &out.PublishInternetEndpoints + *out = new(bool) + **out = **in + } + if in.PublishMicrosoftEndpoints != nil { + in, out := &in.PublishMicrosoftEndpoints, &out.PublishMicrosoftEndpoints + *out = new(bool) + **out = **in + } + if in.RoutingChoice != nil { + in, out := &in.RoutingChoice, &out.RoutingChoice + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoutingPreference. +func (in *RoutingPreference) DeepCopy() *RoutingPreference { + if in == nil { + return nil + } + out := new(RoutingPreference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoutingPreference_STATUS) DeepCopyInto(out *RoutingPreference_STATUS) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.PublishInternetEndpoints != nil { + in, out := &in.PublishInternetEndpoints, &out.PublishInternetEndpoints + *out = new(bool) + **out = **in + } + if in.PublishMicrosoftEndpoints != nil { + in, out := &in.PublishMicrosoftEndpoints, &out.PublishMicrosoftEndpoints + *out = new(bool) + **out = **in + } + if in.RoutingChoice != nil { + in, out := &in.RoutingChoice, &out.RoutingChoice + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoutingPreference_STATUS. +func (in *RoutingPreference_STATUS) DeepCopy() *RoutingPreference_STATUS { + if in == nil { + return nil + } + out := new(RoutingPreference_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SasPolicy) DeepCopyInto(out *SasPolicy) { + *out = *in + if in.ExpirationAction != nil { + in, out := &in.ExpirationAction, &out.ExpirationAction + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SasExpirationPeriod != nil { + in, out := &in.SasExpirationPeriod, &out.SasExpirationPeriod + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SasPolicy. +func (in *SasPolicy) DeepCopy() *SasPolicy { + if in == nil { + return nil + } + out := new(SasPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SasPolicy_STATUS) DeepCopyInto(out *SasPolicy_STATUS) { + *out = *in + if in.ExpirationAction != nil { + in, out := &in.ExpirationAction, &out.ExpirationAction + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SasExpirationPeriod != nil { + in, out := &in.SasExpirationPeriod, &out.SasExpirationPeriod + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SasPolicy_STATUS. +func (in *SasPolicy_STATUS) DeepCopy() *SasPolicy_STATUS { + if in == nil { + return nil + } + out := new(SasPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SignedIdentifier) DeepCopyInto(out *SignedIdentifier) { + *out = *in + if in.AccessPolicy != nil { + in, out := &in.AccessPolicy, &out.AccessPolicy + *out = new(AccessPolicy) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Reference != nil { + in, out := &in.Reference, &out.Reference + *out = new(genruntime.ResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignedIdentifier. +func (in *SignedIdentifier) DeepCopy() *SignedIdentifier { + if in == nil { + return nil + } + out := new(SignedIdentifier) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SignedIdentifier_STATUS) DeepCopyInto(out *SignedIdentifier_STATUS) { + *out = *in + if in.AccessPolicy != nil { + in, out := &in.AccessPolicy, &out.AccessPolicy + *out = new(AccessPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignedIdentifier_STATUS. +func (in *SignedIdentifier_STATUS) DeepCopy() *SignedIdentifier_STATUS { + if in == nil { + return nil + } + out := new(SignedIdentifier_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Sku) DeepCopyInto(out *Sku) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Tier != nil { + in, out := &in.Tier, &out.Tier + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sku. +func (in *Sku) DeepCopy() *Sku { + if in == nil { + return nil + } + out := new(Sku) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Sku_STATUS) DeepCopyInto(out *Sku_STATUS) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Tier != nil { + in, out := &in.Tier, &out.Tier + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sku_STATUS. +func (in *Sku_STATUS) DeepCopy() *Sku_STATUS { + if in == nil { + return nil + } + out := new(Sku_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SmbSetting) DeepCopyInto(out *SmbSetting) { + *out = *in + if in.AuthenticationMethods != nil { + in, out := &in.AuthenticationMethods, &out.AuthenticationMethods + *out = new(string) + **out = **in + } + if in.ChannelEncryption != nil { + in, out := &in.ChannelEncryption, &out.ChannelEncryption + *out = new(string) + **out = **in + } + if in.KerberosTicketEncryption != nil { + in, out := &in.KerberosTicketEncryption, &out.KerberosTicketEncryption + *out = new(string) + **out = **in + } + if in.Multichannel != nil { + in, out := &in.Multichannel, &out.Multichannel + *out = new(Multichannel) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmbSetting. +func (in *SmbSetting) DeepCopy() *SmbSetting { + if in == nil { + return nil + } + out := new(SmbSetting) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SmbSetting_STATUS) DeepCopyInto(out *SmbSetting_STATUS) { + *out = *in + if in.AuthenticationMethods != nil { + in, out := &in.AuthenticationMethods, &out.AuthenticationMethods + *out = new(string) + **out = **in + } + if in.ChannelEncryption != nil { + in, out := &in.ChannelEncryption, &out.ChannelEncryption + *out = new(string) + **out = **in + } + if in.KerberosTicketEncryption != nil { + in, out := &in.KerberosTicketEncryption, &out.KerberosTicketEncryption + *out = new(string) + **out = **in + } + if in.Multichannel != nil { + in, out := &in.Multichannel, &out.Multichannel + *out = new(Multichannel_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmbSetting_STATUS. +func (in *SmbSetting_STATUS) DeepCopy() *SmbSetting_STATUS { + if in == nil { + return nil + } + out := new(SmbSetting_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccount) DeepCopyInto(out *StorageAccount) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccount. +func (in *StorageAccount) DeepCopy() *StorageAccount { + if in == nil { + return nil + } + out := new(StorageAccount) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccount) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountInternetEndpoints_STATUS) DeepCopyInto(out *StorageAccountInternetEndpoints_STATUS) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(string) + **out = **in + } + if in.Dfs != nil { + in, out := &in.Dfs, &out.Dfs + *out = new(string) + **out = **in + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Web != nil { + in, out := &in.Web, &out.Web + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountInternetEndpoints_STATUS. +func (in *StorageAccountInternetEndpoints_STATUS) DeepCopy() *StorageAccountInternetEndpoints_STATUS { + if in == nil { + return nil + } + out := new(StorageAccountInternetEndpoints_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountList) DeepCopyInto(out *StorageAccountList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccount, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountList. +func (in *StorageAccountList) DeepCopy() *StorageAccountList { + if in == nil { + return nil + } + out := new(StorageAccountList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountMicrosoftEndpoints_STATUS) DeepCopyInto(out *StorageAccountMicrosoftEndpoints_STATUS) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(string) + **out = **in + } + if in.Dfs != nil { + in, out := &in.Dfs, &out.Dfs + *out = new(string) + **out = **in + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Queue != nil { + in, out := &in.Queue, &out.Queue + *out = new(string) + **out = **in + } + if in.Table != nil { + in, out := &in.Table, &out.Table + *out = new(string) + **out = **in + } + if in.Web != nil { + in, out := &in.Web, &out.Web + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountMicrosoftEndpoints_STATUS. +func (in *StorageAccountMicrosoftEndpoints_STATUS) DeepCopy() *StorageAccountMicrosoftEndpoints_STATUS { + if in == nil { + return nil + } + out := new(StorageAccountMicrosoftEndpoints_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountOperatorConfigMaps) DeepCopyInto(out *StorageAccountOperatorConfigMaps) { + *out = *in + if in.BlobEndpoint != nil { + in, out := &in.BlobEndpoint, &out.BlobEndpoint + *out = new(genruntime.ConfigMapDestination) + **out = **in + } + if in.DfsEndpoint != nil { + in, out := &in.DfsEndpoint, &out.DfsEndpoint + *out = new(genruntime.ConfigMapDestination) + **out = **in + } + if in.FileEndpoint != nil { + in, out := &in.FileEndpoint, &out.FileEndpoint + *out = new(genruntime.ConfigMapDestination) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.QueueEndpoint != nil { + in, out := &in.QueueEndpoint, &out.QueueEndpoint + *out = new(genruntime.ConfigMapDestination) + **out = **in + } + if in.TableEndpoint != nil { + in, out := &in.TableEndpoint, &out.TableEndpoint + *out = new(genruntime.ConfigMapDestination) + **out = **in + } + if in.WebEndpoint != nil { + in, out := &in.WebEndpoint, &out.WebEndpoint + *out = new(genruntime.ConfigMapDestination) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountOperatorConfigMaps. +func (in *StorageAccountOperatorConfigMaps) DeepCopy() *StorageAccountOperatorConfigMaps { + if in == nil { + return nil + } + out := new(StorageAccountOperatorConfigMaps) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountOperatorSecrets) DeepCopyInto(out *StorageAccountOperatorSecrets) { + *out = *in + if in.BlobEndpoint != nil { + in, out := &in.BlobEndpoint, &out.BlobEndpoint + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.DfsEndpoint != nil { + in, out := &in.DfsEndpoint, &out.DfsEndpoint + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.FileEndpoint != nil { + in, out := &in.FileEndpoint, &out.FileEndpoint + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.Key1 != nil { + in, out := &in.Key1, &out.Key1 + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.Key2 != nil { + in, out := &in.Key2, &out.Key2 + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.QueueEndpoint != nil { + in, out := &in.QueueEndpoint, &out.QueueEndpoint + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.TableEndpoint != nil { + in, out := &in.TableEndpoint, &out.TableEndpoint + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.WebEndpoint != nil { + in, out := &in.WebEndpoint, &out.WebEndpoint + *out = new(genruntime.SecretDestination) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountOperatorSecrets. +func (in *StorageAccountOperatorSecrets) DeepCopy() *StorageAccountOperatorSecrets { + if in == nil { + return nil + } + out := new(StorageAccountOperatorSecrets) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountOperatorSpec) DeepCopyInto(out *StorageAccountOperatorSpec) { + *out = *in + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = new(StorageAccountOperatorConfigMaps) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = new(StorageAccountOperatorSecrets) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountOperatorSpec. +func (in *StorageAccountOperatorSpec) DeepCopy() *StorageAccountOperatorSpec { + if in == nil { + return nil + } + out := new(StorageAccountOperatorSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountSkuConversionStatus_STATUS) DeepCopyInto(out *StorageAccountSkuConversionStatus_STATUS) { + *out = *in + if in.EndTime != nil { + in, out := &in.EndTime, &out.EndTime + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SkuConversionStatus != nil { + in, out := &in.SkuConversionStatus, &out.SkuConversionStatus + *out = new(string) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } + if in.TargetSkuName != nil { + in, out := &in.TargetSkuName, &out.TargetSkuName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountSkuConversionStatus_STATUS. +func (in *StorageAccountSkuConversionStatus_STATUS) DeepCopy() *StorageAccountSkuConversionStatus_STATUS { + if in == nil { + return nil + } + out := new(StorageAccountSkuConversionStatus_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccount_STATUS) DeepCopyInto(out *StorageAccount_STATUS) { + *out = *in + if in.AccessTier != nil { + in, out := &in.AccessTier, &out.AccessTier + *out = new(string) + **out = **in + } + if in.AccountMigrationInProgress != nil { + in, out := &in.AccountMigrationInProgress, &out.AccountMigrationInProgress + *out = new(bool) + **out = **in + } + if in.AllowBlobPublicAccess != nil { + in, out := &in.AllowBlobPublicAccess, &out.AllowBlobPublicAccess + *out = new(bool) + **out = **in + } + if in.AllowCrossTenantReplication != nil { + in, out := &in.AllowCrossTenantReplication, &out.AllowCrossTenantReplication + *out = new(bool) + **out = **in + } + if in.AllowSharedKeyAccess != nil { + in, out := &in.AllowSharedKeyAccess, &out.AllowSharedKeyAccess + *out = new(bool) + **out = **in + } + if in.AllowedCopyScope != nil { + in, out := &in.AllowedCopyScope, &out.AllowedCopyScope + *out = new(string) + **out = **in + } + if in.AzureFilesIdentityBasedAuthentication != nil { + in, out := &in.AzureFilesIdentityBasedAuthentication, &out.AzureFilesIdentityBasedAuthentication + *out = new(AzureFilesIdentityBasedAuthentication_STATUS) + (*in).DeepCopyInto(*out) + } + if in.BlobRestoreStatus != nil { + in, out := &in.BlobRestoreStatus, &out.BlobRestoreStatus + *out = new(BlobRestoreStatus_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.CreationTime != nil { + in, out := &in.CreationTime, &out.CreationTime + *out = new(string) + **out = **in + } + if in.CustomDomain != nil { + in, out := &in.CustomDomain, &out.CustomDomain + *out = new(CustomDomain_STATUS) + (*in).DeepCopyInto(*out) + } + if in.DefaultToOAuthAuthentication != nil { + in, out := &in.DefaultToOAuthAuthentication, &out.DefaultToOAuthAuthentication + *out = new(bool) + **out = **in + } + if in.DnsEndpointType != nil { + in, out := &in.DnsEndpointType, &out.DnsEndpointType + *out = new(string) + **out = **in + } + if in.Encryption != nil { + in, out := &in.Encryption, &out.Encryption + *out = new(Encryption_STATUS) + (*in).DeepCopyInto(*out) + } + if in.ExtendedLocation != nil { + in, out := &in.ExtendedLocation, &out.ExtendedLocation + *out = new(ExtendedLocation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.FailoverInProgress != nil { + in, out := &in.FailoverInProgress, &out.FailoverInProgress + *out = new(bool) + **out = **in + } + if in.GeoReplicationStats != nil { + in, out := &in.GeoReplicationStats, &out.GeoReplicationStats + *out = new(GeoReplicationStats_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(Identity_STATUS) + (*in).DeepCopyInto(*out) + } + if in.ImmutableStorageWithVersioning != nil { + in, out := &in.ImmutableStorageWithVersioning, &out.ImmutableStorageWithVersioning + *out = new(ImmutableStorageAccount_STATUS) + (*in).DeepCopyInto(*out) + } + if in.IsHnsEnabled != nil { + in, out := &in.IsHnsEnabled, &out.IsHnsEnabled + *out = new(bool) + **out = **in + } + if in.IsLocalUserEnabled != nil { + in, out := &in.IsLocalUserEnabled, &out.IsLocalUserEnabled + *out = new(bool) + **out = **in + } + if in.IsNfsV3Enabled != nil { + in, out := &in.IsNfsV3Enabled, &out.IsNfsV3Enabled + *out = new(bool) + **out = **in + } + if in.IsSftpEnabled != nil { + in, out := &in.IsSftpEnabled, &out.IsSftpEnabled + *out = new(bool) + **out = **in + } + if in.IsSkuConversionBlocked != nil { + in, out := &in.IsSkuConversionBlocked, &out.IsSkuConversionBlocked + *out = new(bool) + **out = **in + } + if in.KeyCreationTime != nil { + in, out := &in.KeyCreationTime, &out.KeyCreationTime + *out = new(KeyCreationTime_STATUS) + (*in).DeepCopyInto(*out) + } + if in.KeyPolicy != nil { + in, out := &in.KeyPolicy, &out.KeyPolicy + *out = new(KeyPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(string) + **out = **in + } + if in.LargeFileSharesState != nil { + in, out := &in.LargeFileSharesState, &out.LargeFileSharesState + *out = new(string) + **out = **in + } + if in.LastGeoFailoverTime != nil { + in, out := &in.LastGeoFailoverTime, &out.LastGeoFailoverTime + *out = new(string) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.MinimumTlsVersion != nil { + in, out := &in.MinimumTlsVersion, &out.MinimumTlsVersion + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.NetworkAcls != nil { + in, out := &in.NetworkAcls, &out.NetworkAcls + *out = new(NetworkRuleSet_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PrimaryEndpoints != nil { + in, out := &in.PrimaryEndpoints, &out.PrimaryEndpoints + *out = new(Endpoints_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PrimaryLocation != nil { + in, out := &in.PrimaryLocation, &out.PrimaryLocation + *out = new(string) + **out = **in + } + if in.PrivateEndpointConnections != nil { + in, out := &in.PrivateEndpointConnections, &out.PrivateEndpointConnections + *out = make([]PrivateEndpointConnection_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ProvisioningState != nil { + in, out := &in.ProvisioningState, &out.ProvisioningState + *out = new(string) + **out = **in + } + if in.PublicNetworkAccess != nil { + in, out := &in.PublicNetworkAccess, &out.PublicNetworkAccess + *out = new(string) + **out = **in + } + if in.RoutingPreference != nil { + in, out := &in.RoutingPreference, &out.RoutingPreference + *out = new(RoutingPreference_STATUS) + (*in).DeepCopyInto(*out) + } + if in.SasPolicy != nil { + in, out := &in.SasPolicy, &out.SasPolicy + *out = new(SasPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.SecondaryEndpoints != nil { + in, out := &in.SecondaryEndpoints, &out.SecondaryEndpoints + *out = new(Endpoints_STATUS) + (*in).DeepCopyInto(*out) + } + if in.SecondaryLocation != nil { + in, out := &in.SecondaryLocation, &out.SecondaryLocation + *out = new(string) + **out = **in + } + if in.Sku != nil { + in, out := &in.Sku, &out.Sku + *out = new(Sku_STATUS) + (*in).DeepCopyInto(*out) + } + if in.StatusOfPrimary != nil { + in, out := &in.StatusOfPrimary, &out.StatusOfPrimary + *out = new(string) + **out = **in + } + if in.StatusOfSecondary != nil { + in, out := &in.StatusOfSecondary, &out.StatusOfSecondary + *out = new(string) + **out = **in + } + if in.StorageAccountSkuConversionStatus != nil { + in, out := &in.StorageAccountSkuConversionStatus, &out.StorageAccountSkuConversionStatus + *out = new(StorageAccountSkuConversionStatus_STATUS) + (*in).DeepCopyInto(*out) + } + if in.SupportsHttpsTrafficOnly != nil { + in, out := &in.SupportsHttpsTrafficOnly, &out.SupportsHttpsTrafficOnly + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccount_STATUS. +func (in *StorageAccount_STATUS) DeepCopy() *StorageAccount_STATUS { + if in == nil { + return nil + } + out := new(StorageAccount_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccount_Spec) DeepCopyInto(out *StorageAccount_Spec) { + *out = *in + if in.AccessTier != nil { + in, out := &in.AccessTier, &out.AccessTier + *out = new(string) + **out = **in + } + if in.AllowBlobPublicAccess != nil { + in, out := &in.AllowBlobPublicAccess, &out.AllowBlobPublicAccess + *out = new(bool) + **out = **in + } + if in.AllowCrossTenantReplication != nil { + in, out := &in.AllowCrossTenantReplication, &out.AllowCrossTenantReplication + *out = new(bool) + **out = **in + } + if in.AllowSharedKeyAccess != nil { + in, out := &in.AllowSharedKeyAccess, &out.AllowSharedKeyAccess + *out = new(bool) + **out = **in + } + if in.AllowedCopyScope != nil { + in, out := &in.AllowedCopyScope, &out.AllowedCopyScope + *out = new(string) + **out = **in + } + if in.AzureFilesIdentityBasedAuthentication != nil { + in, out := &in.AzureFilesIdentityBasedAuthentication, &out.AzureFilesIdentityBasedAuthentication + *out = new(AzureFilesIdentityBasedAuthentication) + (*in).DeepCopyInto(*out) + } + if in.CustomDomain != nil { + in, out := &in.CustomDomain, &out.CustomDomain + *out = new(CustomDomain) + (*in).DeepCopyInto(*out) + } + if in.DefaultToOAuthAuthentication != nil { + in, out := &in.DefaultToOAuthAuthentication, &out.DefaultToOAuthAuthentication + *out = new(bool) + **out = **in + } + if in.DnsEndpointType != nil { + in, out := &in.DnsEndpointType, &out.DnsEndpointType + *out = new(string) + **out = **in + } + if in.Encryption != nil { + in, out := &in.Encryption, &out.Encryption + *out = new(Encryption) + (*in).DeepCopyInto(*out) + } + if in.ExtendedLocation != nil { + in, out := &in.ExtendedLocation, &out.ExtendedLocation + *out = new(ExtendedLocation) + (*in).DeepCopyInto(*out) + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(Identity) + (*in).DeepCopyInto(*out) + } + if in.ImmutableStorageWithVersioning != nil { + in, out := &in.ImmutableStorageWithVersioning, &out.ImmutableStorageWithVersioning + *out = new(ImmutableStorageAccount) + (*in).DeepCopyInto(*out) + } + if in.IsHnsEnabled != nil { + in, out := &in.IsHnsEnabled, &out.IsHnsEnabled + *out = new(bool) + **out = **in + } + if in.IsLocalUserEnabled != nil { + in, out := &in.IsLocalUserEnabled, &out.IsLocalUserEnabled + *out = new(bool) + **out = **in + } + if in.IsNfsV3Enabled != nil { + in, out := &in.IsNfsV3Enabled, &out.IsNfsV3Enabled + *out = new(bool) + **out = **in + } + if in.IsSftpEnabled != nil { + in, out := &in.IsSftpEnabled, &out.IsSftpEnabled + *out = new(bool) + **out = **in + } + if in.KeyPolicy != nil { + in, out := &in.KeyPolicy, &out.KeyPolicy + *out = new(KeyPolicy) + (*in).DeepCopyInto(*out) + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(string) + **out = **in + } + if in.LargeFileSharesState != nil { + in, out := &in.LargeFileSharesState, &out.LargeFileSharesState + *out = new(string) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.MinimumTlsVersion != nil { + in, out := &in.MinimumTlsVersion, &out.MinimumTlsVersion + *out = new(string) + **out = **in + } + if in.NetworkAcls != nil { + in, out := &in.NetworkAcls, &out.NetworkAcls + *out = new(NetworkRuleSet) + (*in).DeepCopyInto(*out) + } + if in.OperatorSpec != nil { + in, out := &in.OperatorSpec, &out.OperatorSpec + *out = new(StorageAccountOperatorSpec) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.PublicNetworkAccess != nil { + in, out := &in.PublicNetworkAccess, &out.PublicNetworkAccess + *out = new(string) + **out = **in + } + if in.RoutingPreference != nil { + in, out := &in.RoutingPreference, &out.RoutingPreference + *out = new(RoutingPreference) + (*in).DeepCopyInto(*out) + } + if in.SasPolicy != nil { + in, out := &in.SasPolicy, &out.SasPolicy + *out = new(SasPolicy) + (*in).DeepCopyInto(*out) + } + if in.Sku != nil { + in, out := &in.Sku, &out.Sku + *out = new(Sku) + (*in).DeepCopyInto(*out) + } + if in.SupportsHttpsTrafficOnly != nil { + in, out := &in.SupportsHttpsTrafficOnly, &out.SupportsHttpsTrafficOnly + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccount_Spec. +func (in *StorageAccount_Spec) DeepCopy() *StorageAccount_Spec { + if in == nil { + return nil + } + out := new(StorageAccount_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsBlobService) DeepCopyInto(out *StorageAccountsBlobService) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsBlobService. +func (in *StorageAccountsBlobService) DeepCopy() *StorageAccountsBlobService { + if in == nil { + return nil + } + out := new(StorageAccountsBlobService) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsBlobService) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsBlobServiceList) DeepCopyInto(out *StorageAccountsBlobServiceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsBlobService, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsBlobServiceList. +func (in *StorageAccountsBlobServiceList) DeepCopy() *StorageAccountsBlobServiceList { + if in == nil { + return nil + } + out := new(StorageAccountsBlobServiceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsBlobServiceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsBlobServicesContainer) DeepCopyInto(out *StorageAccountsBlobServicesContainer) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsBlobServicesContainer. +func (in *StorageAccountsBlobServicesContainer) DeepCopy() *StorageAccountsBlobServicesContainer { + if in == nil { + return nil + } + out := new(StorageAccountsBlobServicesContainer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsBlobServicesContainer) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsBlobServicesContainerList) DeepCopyInto(out *StorageAccountsBlobServicesContainerList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsBlobServicesContainer, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsBlobServicesContainerList. +func (in *StorageAccountsBlobServicesContainerList) DeepCopy() *StorageAccountsBlobServicesContainerList { + if in == nil { + return nil + } + out := new(StorageAccountsBlobServicesContainerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsBlobServicesContainerList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsFileService) DeepCopyInto(out *StorageAccountsFileService) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsFileService. +func (in *StorageAccountsFileService) DeepCopy() *StorageAccountsFileService { + if in == nil { + return nil + } + out := new(StorageAccountsFileService) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsFileService) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsFileServiceList) DeepCopyInto(out *StorageAccountsFileServiceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsFileService, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsFileServiceList. +func (in *StorageAccountsFileServiceList) DeepCopy() *StorageAccountsFileServiceList { + if in == nil { + return nil + } + out := new(StorageAccountsFileServiceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsFileServiceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsFileServicesShare) DeepCopyInto(out *StorageAccountsFileServicesShare) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsFileServicesShare. +func (in *StorageAccountsFileServicesShare) DeepCopy() *StorageAccountsFileServicesShare { + if in == nil { + return nil + } + out := new(StorageAccountsFileServicesShare) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsFileServicesShare) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsFileServicesShareList) DeepCopyInto(out *StorageAccountsFileServicesShareList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsFileServicesShare, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsFileServicesShareList. +func (in *StorageAccountsFileServicesShareList) DeepCopy() *StorageAccountsFileServicesShareList { + if in == nil { + return nil + } + out := new(StorageAccountsFileServicesShareList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsFileServicesShareList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsManagementPolicy) DeepCopyInto(out *StorageAccountsManagementPolicy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsManagementPolicy. +func (in *StorageAccountsManagementPolicy) DeepCopy() *StorageAccountsManagementPolicy { + if in == nil { + return nil + } + out := new(StorageAccountsManagementPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsManagementPolicy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsManagementPolicyList) DeepCopyInto(out *StorageAccountsManagementPolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsManagementPolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsManagementPolicyList. +func (in *StorageAccountsManagementPolicyList) DeepCopy() *StorageAccountsManagementPolicyList { + if in == nil { + return nil + } + out := new(StorageAccountsManagementPolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsManagementPolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsQueueService) DeepCopyInto(out *StorageAccountsQueueService) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsQueueService. +func (in *StorageAccountsQueueService) DeepCopy() *StorageAccountsQueueService { + if in == nil { + return nil + } + out := new(StorageAccountsQueueService) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsQueueService) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsQueueServiceList) DeepCopyInto(out *StorageAccountsQueueServiceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsQueueService, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsQueueServiceList. +func (in *StorageAccountsQueueServiceList) DeepCopy() *StorageAccountsQueueServiceList { + if in == nil { + return nil + } + out := new(StorageAccountsQueueServiceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsQueueServiceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsQueueServicesQueue) DeepCopyInto(out *StorageAccountsQueueServicesQueue) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsQueueServicesQueue. +func (in *StorageAccountsQueueServicesQueue) DeepCopy() *StorageAccountsQueueServicesQueue { + if in == nil { + return nil + } + out := new(StorageAccountsQueueServicesQueue) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsQueueServicesQueue) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsQueueServicesQueueList) DeepCopyInto(out *StorageAccountsQueueServicesQueueList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsQueueServicesQueue, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsQueueServicesQueueList. +func (in *StorageAccountsQueueServicesQueueList) DeepCopy() *StorageAccountsQueueServicesQueueList { + if in == nil { + return nil + } + out := new(StorageAccountsQueueServicesQueueList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsQueueServicesQueueList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsTableService) DeepCopyInto(out *StorageAccountsTableService) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsTableService. +func (in *StorageAccountsTableService) DeepCopy() *StorageAccountsTableService { + if in == nil { + return nil + } + out := new(StorageAccountsTableService) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsTableService) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsTableServiceList) DeepCopyInto(out *StorageAccountsTableServiceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsTableService, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsTableServiceList. +func (in *StorageAccountsTableServiceList) DeepCopy() *StorageAccountsTableServiceList { + if in == nil { + return nil + } + out := new(StorageAccountsTableServiceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsTableServiceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsTableServicesTable) DeepCopyInto(out *StorageAccountsTableServicesTable) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsTableServicesTable. +func (in *StorageAccountsTableServicesTable) DeepCopy() *StorageAccountsTableServicesTable { + if in == nil { + return nil + } + out := new(StorageAccountsTableServicesTable) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsTableServicesTable) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsTableServicesTableList) DeepCopyInto(out *StorageAccountsTableServicesTableList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsTableServicesTable, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsTableServicesTableList. +func (in *StorageAccountsTableServicesTableList) DeepCopy() *StorageAccountsTableServicesTableList { + if in == nil { + return nil + } + out := new(StorageAccountsTableServicesTableList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsTableServicesTableList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobService_STATUS) DeepCopyInto(out *StorageAccounts_BlobService_STATUS) { + *out = *in + if in.AutomaticSnapshotPolicyEnabled != nil { + in, out := &in.AutomaticSnapshotPolicyEnabled, &out.AutomaticSnapshotPolicyEnabled + *out = new(bool) + **out = **in + } + if in.ChangeFeed != nil { + in, out := &in.ChangeFeed, &out.ChangeFeed + *out = new(ChangeFeed_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ContainerDeleteRetentionPolicy != nil { + in, out := &in.ContainerDeleteRetentionPolicy, &out.ContainerDeleteRetentionPolicy + *out = new(DeleteRetentionPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_STATUS) + (*in).DeepCopyInto(*out) + } + if in.DefaultServiceVersion != nil { + in, out := &in.DefaultServiceVersion, &out.DefaultServiceVersion + *out = new(string) + **out = **in + } + if in.DeleteRetentionPolicy != nil { + in, out := &in.DeleteRetentionPolicy, &out.DeleteRetentionPolicy + *out = new(DeleteRetentionPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.IsVersioningEnabled != nil { + in, out := &in.IsVersioningEnabled, &out.IsVersioningEnabled + *out = new(bool) + **out = **in + } + if in.LastAccessTimeTrackingPolicy != nil { + in, out := &in.LastAccessTimeTrackingPolicy, &out.LastAccessTimeTrackingPolicy + *out = new(LastAccessTimeTrackingPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RestorePolicy != nil { + in, out := &in.RestorePolicy, &out.RestorePolicy + *out = new(RestorePolicyProperties_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Sku != nil { + in, out := &in.Sku, &out.Sku + *out = new(Sku_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobService_STATUS. +func (in *StorageAccounts_BlobService_STATUS) DeepCopy() *StorageAccounts_BlobService_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobService_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobService_Spec) DeepCopyInto(out *StorageAccounts_BlobService_Spec) { + *out = *in + if in.AutomaticSnapshotPolicyEnabled != nil { + in, out := &in.AutomaticSnapshotPolicyEnabled, &out.AutomaticSnapshotPolicyEnabled + *out = new(bool) + **out = **in + } + if in.ChangeFeed != nil { + in, out := &in.ChangeFeed, &out.ChangeFeed + *out = new(ChangeFeed) + (*in).DeepCopyInto(*out) + } + if in.ContainerDeleteRetentionPolicy != nil { + in, out := &in.ContainerDeleteRetentionPolicy, &out.ContainerDeleteRetentionPolicy + *out = new(DeleteRetentionPolicy) + (*in).DeepCopyInto(*out) + } + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules) + (*in).DeepCopyInto(*out) + } + if in.DefaultServiceVersion != nil { + in, out := &in.DefaultServiceVersion, &out.DefaultServiceVersion + *out = new(string) + **out = **in + } + if in.DeleteRetentionPolicy != nil { + in, out := &in.DeleteRetentionPolicy, &out.DeleteRetentionPolicy + *out = new(DeleteRetentionPolicy) + (*in).DeepCopyInto(*out) + } + if in.IsVersioningEnabled != nil { + in, out := &in.IsVersioningEnabled, &out.IsVersioningEnabled + *out = new(bool) + **out = **in + } + if in.LastAccessTimeTrackingPolicy != nil { + in, out := &in.LastAccessTimeTrackingPolicy, &out.LastAccessTimeTrackingPolicy + *out = new(LastAccessTimeTrackingPolicy) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RestorePolicy != nil { + in, out := &in.RestorePolicy, &out.RestorePolicy + *out = new(RestorePolicyProperties) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobService_Spec. +func (in *StorageAccounts_BlobService_Spec) DeepCopy() *StorageAccounts_BlobService_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobService_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobServices_Container_STATUS) DeepCopyInto(out *StorageAccounts_BlobServices_Container_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DefaultEncryptionScope != nil { + in, out := &in.DefaultEncryptionScope, &out.DefaultEncryptionScope + *out = new(string) + **out = **in + } + if in.Deleted != nil { + in, out := &in.Deleted, &out.Deleted + *out = new(bool) + **out = **in + } + if in.DeletedTime != nil { + in, out := &in.DeletedTime, &out.DeletedTime + *out = new(string) + **out = **in + } + if in.DenyEncryptionScopeOverride != nil { + in, out := &in.DenyEncryptionScopeOverride, &out.DenyEncryptionScopeOverride + *out = new(bool) + **out = **in + } + if in.EnableNfsV3AllSquash != nil { + in, out := &in.EnableNfsV3AllSquash, &out.EnableNfsV3AllSquash + *out = new(bool) + **out = **in + } + if in.EnableNfsV3RootSquash != nil { + in, out := &in.EnableNfsV3RootSquash, &out.EnableNfsV3RootSquash + *out = new(bool) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.HasImmutabilityPolicy != nil { + in, out := &in.HasImmutabilityPolicy, &out.HasImmutabilityPolicy + *out = new(bool) + **out = **in + } + if in.HasLegalHold != nil { + in, out := &in.HasLegalHold, &out.HasLegalHold + *out = new(bool) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.ImmutabilityPolicy != nil { + in, out := &in.ImmutabilityPolicy, &out.ImmutabilityPolicy + *out = new(ImmutabilityPolicyProperties_STATUS) + (*in).DeepCopyInto(*out) + } + if in.ImmutableStorageWithVersioning != nil { + in, out := &in.ImmutableStorageWithVersioning, &out.ImmutableStorageWithVersioning + *out = new(ImmutableStorageWithVersioning_STATUS) + (*in).DeepCopyInto(*out) + } + if in.LastModifiedTime != nil { + in, out := &in.LastModifiedTime, &out.LastModifiedTime + *out = new(string) + **out = **in + } + if in.LeaseDuration != nil { + in, out := &in.LeaseDuration, &out.LeaseDuration + *out = new(string) + **out = **in + } + if in.LeaseState != nil { + in, out := &in.LeaseState, &out.LeaseState + *out = new(string) + **out = **in + } + if in.LeaseStatus != nil { + in, out := &in.LeaseStatus, &out.LeaseStatus + *out = new(string) + **out = **in + } + if in.LegalHold != nil { + in, out := &in.LegalHold, &out.LegalHold + *out = new(LegalHoldProperties_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.PublicAccess != nil { + in, out := &in.PublicAccess, &out.PublicAccess + *out = new(string) + **out = **in + } + if in.RemainingRetentionDays != nil { + in, out := &in.RemainingRetentionDays, &out.RemainingRetentionDays + *out = new(int) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobServices_Container_STATUS. +func (in *StorageAccounts_BlobServices_Container_STATUS) DeepCopy() *StorageAccounts_BlobServices_Container_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobServices_Container_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobServices_Container_Spec) DeepCopyInto(out *StorageAccounts_BlobServices_Container_Spec) { + *out = *in + if in.DefaultEncryptionScope != nil { + in, out := &in.DefaultEncryptionScope, &out.DefaultEncryptionScope + *out = new(string) + **out = **in + } + if in.DenyEncryptionScopeOverride != nil { + in, out := &in.DenyEncryptionScopeOverride, &out.DenyEncryptionScopeOverride + *out = new(bool) + **out = **in + } + if in.EnableNfsV3AllSquash != nil { + in, out := &in.EnableNfsV3AllSquash, &out.EnableNfsV3AllSquash + *out = new(bool) + **out = **in + } + if in.EnableNfsV3RootSquash != nil { + in, out := &in.EnableNfsV3RootSquash, &out.EnableNfsV3RootSquash + *out = new(bool) + **out = **in + } + if in.ImmutableStorageWithVersioning != nil { + in, out := &in.ImmutableStorageWithVersioning, &out.ImmutableStorageWithVersioning + *out = new(ImmutableStorageWithVersioning) + (*in).DeepCopyInto(*out) + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.PublicAccess != nil { + in, out := &in.PublicAccess, &out.PublicAccess + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobServices_Container_Spec. +func (in *StorageAccounts_BlobServices_Container_Spec) DeepCopy() *StorageAccounts_BlobServices_Container_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobServices_Container_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileService_STATUS) DeepCopyInto(out *StorageAccounts_FileService_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ProtocolSettings != nil { + in, out := &in.ProtocolSettings, &out.ProtocolSettings + *out = new(ProtocolSettings_STATUS) + (*in).DeepCopyInto(*out) + } + if in.ShareDeleteRetentionPolicy != nil { + in, out := &in.ShareDeleteRetentionPolicy, &out.ShareDeleteRetentionPolicy + *out = new(DeleteRetentionPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Sku != nil { + in, out := &in.Sku, &out.Sku + *out = new(Sku_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileService_STATUS. +func (in *StorageAccounts_FileService_STATUS) DeepCopy() *StorageAccounts_FileService_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_FileService_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileService_Spec) DeepCopyInto(out *StorageAccounts_FileService_Spec) { + *out = *in + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ProtocolSettings != nil { + in, out := &in.ProtocolSettings, &out.ProtocolSettings + *out = new(ProtocolSettings) + (*in).DeepCopyInto(*out) + } + if in.ShareDeleteRetentionPolicy != nil { + in, out := &in.ShareDeleteRetentionPolicy, &out.ShareDeleteRetentionPolicy + *out = new(DeleteRetentionPolicy) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileService_Spec. +func (in *StorageAccounts_FileService_Spec) DeepCopy() *StorageAccounts_FileService_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_FileService_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileServices_Share_STATUS) DeepCopyInto(out *StorageAccounts_FileServices_Share_STATUS) { + *out = *in + if in.AccessTier != nil { + in, out := &in.AccessTier, &out.AccessTier + *out = new(string) + **out = **in + } + if in.AccessTierChangeTime != nil { + in, out := &in.AccessTierChangeTime, &out.AccessTierChangeTime + *out = new(string) + **out = **in + } + if in.AccessTierStatus != nil { + in, out := &in.AccessTierStatus, &out.AccessTierStatus + *out = new(string) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Deleted != nil { + in, out := &in.Deleted, &out.Deleted + *out = new(bool) + **out = **in + } + if in.DeletedTime != nil { + in, out := &in.DeletedTime, &out.DeletedTime + *out = new(string) + **out = **in + } + if in.EnabledProtocols != nil { + in, out := &in.EnabledProtocols, &out.EnabledProtocols + *out = new(string) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.LastModifiedTime != nil { + in, out := &in.LastModifiedTime, &out.LastModifiedTime + *out = new(string) + **out = **in + } + if in.LeaseDuration != nil { + in, out := &in.LeaseDuration, &out.LeaseDuration + *out = new(string) + **out = **in + } + if in.LeaseState != nil { + in, out := &in.LeaseState, &out.LeaseState + *out = new(string) + **out = **in + } + if in.LeaseStatus != nil { + in, out := &in.LeaseStatus, &out.LeaseStatus + *out = new(string) + **out = **in + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RemainingRetentionDays != nil { + in, out := &in.RemainingRetentionDays, &out.RemainingRetentionDays + *out = new(int) + **out = **in + } + if in.RootSquash != nil { + in, out := &in.RootSquash, &out.RootSquash + *out = new(string) + **out = **in + } + if in.ShareQuota != nil { + in, out := &in.ShareQuota, &out.ShareQuota + *out = new(int) + **out = **in + } + if in.ShareUsageBytes != nil { + in, out := &in.ShareUsageBytes, &out.ShareUsageBytes + *out = new(int) + **out = **in + } + if in.SignedIdentifiers != nil { + in, out := &in.SignedIdentifiers, &out.SignedIdentifiers + *out = make([]SignedIdentifier_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SnapshotTime != nil { + in, out := &in.SnapshotTime, &out.SnapshotTime + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileServices_Share_STATUS. +func (in *StorageAccounts_FileServices_Share_STATUS) DeepCopy() *StorageAccounts_FileServices_Share_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_FileServices_Share_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileServices_Share_Spec) DeepCopyInto(out *StorageAccounts_FileServices_Share_Spec) { + *out = *in + if in.AccessTier != nil { + in, out := &in.AccessTier, &out.AccessTier + *out = new(string) + **out = **in + } + if in.EnabledProtocols != nil { + in, out := &in.EnabledProtocols, &out.EnabledProtocols + *out = new(string) + **out = **in + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RootSquash != nil { + in, out := &in.RootSquash, &out.RootSquash + *out = new(string) + **out = **in + } + if in.ShareQuota != nil { + in, out := &in.ShareQuota, &out.ShareQuota + *out = new(int) + **out = **in + } + if in.SignedIdentifiers != nil { + in, out := &in.SignedIdentifiers, &out.SignedIdentifiers + *out = make([]SignedIdentifier, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileServices_Share_Spec. +func (in *StorageAccounts_FileServices_Share_Spec) DeepCopy() *StorageAccounts_FileServices_Share_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_FileServices_Share_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_ManagementPolicy_STATUS) DeepCopyInto(out *StorageAccounts_ManagementPolicy_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.LastModifiedTime != nil { + in, out := &in.LastModifiedTime, &out.LastModifiedTime + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(ManagementPolicySchema_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_ManagementPolicy_STATUS. +func (in *StorageAccounts_ManagementPolicy_STATUS) DeepCopy() *StorageAccounts_ManagementPolicy_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_ManagementPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_ManagementPolicy_Spec) DeepCopyInto(out *StorageAccounts_ManagementPolicy_Spec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(ManagementPolicySchema) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_ManagementPolicy_Spec. +func (in *StorageAccounts_ManagementPolicy_Spec) DeepCopy() *StorageAccounts_ManagementPolicy_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_ManagementPolicy_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueService_STATUS) DeepCopyInto(out *StorageAccounts_QueueService_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueService_STATUS. +func (in *StorageAccounts_QueueService_STATUS) DeepCopy() *StorageAccounts_QueueService_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueService_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueService_Spec) DeepCopyInto(out *StorageAccounts_QueueService_Spec) { + *out = *in + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueService_Spec. +func (in *StorageAccounts_QueueService_Spec) DeepCopy() *StorageAccounts_QueueService_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueService_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueServices_Queue_STATUS) DeepCopyInto(out *StorageAccounts_QueueServices_Queue_STATUS) { + *out = *in + if in.ApproximateMessageCount != nil { + in, out := &in.ApproximateMessageCount, &out.ApproximateMessageCount + *out = new(int) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueServices_Queue_STATUS. +func (in *StorageAccounts_QueueServices_Queue_STATUS) DeepCopy() *StorageAccounts_QueueServices_Queue_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueServices_Queue_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueServices_Queue_Spec) DeepCopyInto(out *StorageAccounts_QueueServices_Queue_Spec) { + *out = *in + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueServices_Queue_Spec. +func (in *StorageAccounts_QueueServices_Queue_Spec) DeepCopy() *StorageAccounts_QueueServices_Queue_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueServices_Queue_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableService_STATUS) DeepCopyInto(out *StorageAccounts_TableService_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableService_STATUS. +func (in *StorageAccounts_TableService_STATUS) DeepCopy() *StorageAccounts_TableService_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_TableService_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableService_Spec) DeepCopyInto(out *StorageAccounts_TableService_Spec) { + *out = *in + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableService_Spec. +func (in *StorageAccounts_TableService_Spec) DeepCopy() *StorageAccounts_TableService_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_TableService_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableServices_Table_STATUS) DeepCopyInto(out *StorageAccounts_TableServices_Table_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SignedIdentifiers != nil { + in, out := &in.SignedIdentifiers, &out.SignedIdentifiers + *out = make([]TableSignedIdentifier_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.TableName != nil { + in, out := &in.TableName, &out.TableName + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableServices_Table_STATUS. +func (in *StorageAccounts_TableServices_Table_STATUS) DeepCopy() *StorageAccounts_TableServices_Table_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_TableServices_Table_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableServices_Table_Spec) DeepCopyInto(out *StorageAccounts_TableServices_Table_Spec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SignedIdentifiers != nil { + in, out := &in.SignedIdentifiers, &out.SignedIdentifiers + *out = make([]TableSignedIdentifier, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableServices_Table_Spec. +func (in *StorageAccounts_TableServices_Table_Spec) DeepCopy() *StorageAccounts_TableServices_Table_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_TableServices_Table_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableAccessPolicy) DeepCopyInto(out *TableAccessPolicy) { + *out = *in + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = new(string) + **out = **in + } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableAccessPolicy. +func (in *TableAccessPolicy) DeepCopy() *TableAccessPolicy { + if in == nil { + return nil + } + out := new(TableAccessPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableAccessPolicy_STATUS) DeepCopyInto(out *TableAccessPolicy_STATUS) { + *out = *in + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = new(string) + **out = **in + } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableAccessPolicy_STATUS. +func (in *TableAccessPolicy_STATUS) DeepCopy() *TableAccessPolicy_STATUS { + if in == nil { + return nil + } + out := new(TableAccessPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableSignedIdentifier) DeepCopyInto(out *TableSignedIdentifier) { + *out = *in + if in.AccessPolicy != nil { + in, out := &in.AccessPolicy, &out.AccessPolicy + *out = new(TableAccessPolicy) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Reference != nil { + in, out := &in.Reference, &out.Reference + *out = new(genruntime.ResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableSignedIdentifier. +func (in *TableSignedIdentifier) DeepCopy() *TableSignedIdentifier { + if in == nil { + return nil + } + out := new(TableSignedIdentifier) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableSignedIdentifier_STATUS) DeepCopyInto(out *TableSignedIdentifier_STATUS) { + *out = *in + if in.AccessPolicy != nil { + in, out := &in.AccessPolicy, &out.AccessPolicy + *out = new(TableAccessPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableSignedIdentifier_STATUS. +func (in *TableSignedIdentifier_STATUS) DeepCopy() *TableSignedIdentifier_STATUS { + if in == nil { + return nil + } + out := new(TableSignedIdentifier_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagFilter) DeepCopyInto(out *TagFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Op != nil { + in, out := &in.Op, &out.Op + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagFilter. +func (in *TagFilter) DeepCopy() *TagFilter { + if in == nil { + return nil + } + out := new(TagFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagFilter_STATUS) DeepCopyInto(out *TagFilter_STATUS) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Op != nil { + in, out := &in.Op, &out.Op + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagFilter_STATUS. +func (in *TagFilter_STATUS) DeepCopy() *TagFilter_STATUS { + if in == nil { + return nil + } + out := new(TagFilter_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagProperty_STATUS) DeepCopyInto(out *TagProperty_STATUS) { + *out = *in + if in.ObjectIdentifier != nil { + in, out := &in.ObjectIdentifier, &out.ObjectIdentifier + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Tag != nil { + in, out := &in.Tag, &out.Tag + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Timestamp != nil { + in, out := &in.Timestamp, &out.Timestamp + *out = new(string) + **out = **in + } + if in.Upn != nil { + in, out := &in.Upn, &out.Upn + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagProperty_STATUS. +func (in *TagProperty_STATUS) DeepCopy() *TagProperty_STATUS { + if in == nil { + return nil + } + out := new(TagProperty_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UpdateHistoryProperty_STATUS) DeepCopyInto(out *UpdateHistoryProperty_STATUS) { + *out = *in + if in.AllowProtectedAppendWrites != nil { + in, out := &in.AllowProtectedAppendWrites, &out.AllowProtectedAppendWrites + *out = new(bool) + **out = **in + } + if in.AllowProtectedAppendWritesAll != nil { + in, out := &in.AllowProtectedAppendWritesAll, &out.AllowProtectedAppendWritesAll + *out = new(bool) + **out = **in + } + if in.ImmutabilityPeriodSinceCreationInDays != nil { + in, out := &in.ImmutabilityPeriodSinceCreationInDays, &out.ImmutabilityPeriodSinceCreationInDays + *out = new(int) + **out = **in + } + if in.ObjectIdentifier != nil { + in, out := &in.ObjectIdentifier, &out.ObjectIdentifier + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Timestamp != nil { + in, out := &in.Timestamp, &out.Timestamp + *out = new(string) + **out = **in + } + if in.Update != nil { + in, out := &in.Update, &out.Update + *out = new(string) + **out = **in + } + if in.Upn != nil { + in, out := &in.Upn, &out.Upn + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateHistoryProperty_STATUS. +func (in *UpdateHistoryProperty_STATUS) DeepCopy() *UpdateHistoryProperty_STATUS { + if in == nil { + return nil + } + out := new(UpdateHistoryProperty_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAssignedIdentityDetails) DeepCopyInto(out *UserAssignedIdentityDetails) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + out.Reference = in.Reference +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentityDetails. +func (in *UserAssignedIdentityDetails) DeepCopy() *UserAssignedIdentityDetails { + if in == nil { + return nil + } + out := new(UserAssignedIdentityDetails) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAssignedIdentity_STATUS) DeepCopyInto(out *UserAssignedIdentity_STATUS) { + *out = *in + if in.ClientId != nil { + in, out := &in.ClientId, &out.ClientId + *out = new(string) + **out = **in + } + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentity_STATUS. +func (in *UserAssignedIdentity_STATUS) DeepCopy() *UserAssignedIdentity_STATUS { + if in == nil { + return nil + } + out := new(UserAssignedIdentity_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualNetworkRule) DeepCopyInto(out *VirtualNetworkRule) { + *out = *in + if in.Action != nil { + in, out := &in.Action, &out.Action + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Reference != nil { + in, out := &in.Reference, &out.Reference + *out = new(genruntime.ResourceReference) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualNetworkRule. +func (in *VirtualNetworkRule) DeepCopy() *VirtualNetworkRule { + if in == nil { + return nil + } + out := new(VirtualNetworkRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualNetworkRule_STATUS) DeepCopyInto(out *VirtualNetworkRule_STATUS) { + *out = *in + if in.Action != nil { + in, out := &in.Action, &out.Action + *out = new(string) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualNetworkRule_STATUS. +func (in *VirtualNetworkRule_STATUS) DeepCopy() *VirtualNetworkRule_STATUS { + if in == nil { + return nil + } + out := new(VirtualNetworkRule_STATUS) + in.DeepCopyInto(out) + return out +} diff --git a/v2/api/storage/v1api20230101/storage_account_spec_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_account_spec_arm_types_gen.go new file mode 100644 index 00000000000..0b38bf7b1df --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_account_spec_arm_types_gen.go @@ -0,0 +1,443 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type StorageAccount_Spec_ARM struct { + // ExtendedLocation: Optional. Set the extended location of the resource. If not set, the storage account will be created + // in Azure main region. Otherwise it will be created in the specified extended location + ExtendedLocation *ExtendedLocation_ARM `json:"extendedLocation,omitempty"` + + // Identity: The identity of the resource. + Identity *Identity_ARM `json:"identity,omitempty"` + + // Kind: Required. Indicates the type of storage account. + Kind *StorageAccount_Kind_Spec `json:"kind,omitempty"` + + // Location: Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure + // Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is + // created, but if an identical geo region is specified on update, the request will succeed. + Location *string `json:"location,omitempty"` + Name string `json:"name,omitempty"` + + // Properties: The parameters used to create the storage account. + Properties *StorageAccountPropertiesCreateParameters_ARM `json:"properties,omitempty"` + + // Sku: Required. Gets or sets the SKU name. + Sku *Sku_ARM `json:"sku,omitempty"` + + // Tags: Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping + // this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key + // with a length no greater than 128 characters and a value with a length no greater than 256 characters. + Tags map[string]string `json:"tags"` +} + +var _ genruntime.ARMResourceSpec = &StorageAccount_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (account StorageAccount_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (account *StorageAccount_Spec_ARM) GetName() string { + return account.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts" +func (account *StorageAccount_Spec_ARM) GetType() string { + return "Microsoft.Storage/storageAccounts" +} + +// The complex type of the extended location. +type ExtendedLocation_ARM struct { + // Name: The name of the extended location. + Name *string `json:"name,omitempty"` + + // Type: The type of the extended location. + Type *ExtendedLocationType `json:"type,omitempty"` +} + +// Identity for the resource. +type Identity_ARM struct { + // Type: The identity type. + Type *Identity_Type `json:"type,omitempty"` + UserAssignedIdentities map[string]UserAssignedIdentityDetails_ARM `json:"userAssignedIdentities,omitempty"` +} + +// The SKU of the storage account. +type Sku_ARM struct { + // Name: The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called + // accountType. + Name *SkuName `json:"name,omitempty"` + + // Tier: The SKU tier. This is based on the SKU name. + Tier *Tier `json:"tier,omitempty"` +} + +// +kubebuilder:validation:Enum={"BlobStorage","BlockBlobStorage","FileStorage","Storage","StorageV2"} +type StorageAccount_Kind_Spec string + +const ( + StorageAccount_Kind_Spec_BlobStorage = StorageAccount_Kind_Spec("BlobStorage") + StorageAccount_Kind_Spec_BlockBlobStorage = StorageAccount_Kind_Spec("BlockBlobStorage") + StorageAccount_Kind_Spec_FileStorage = StorageAccount_Kind_Spec("FileStorage") + StorageAccount_Kind_Spec_Storage = StorageAccount_Kind_Spec("Storage") + StorageAccount_Kind_Spec_StorageV2 = StorageAccount_Kind_Spec("StorageV2") +) + +// The parameters used to create the storage account. +type StorageAccountPropertiesCreateParameters_ARM struct { + // AccessTier: Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' + // access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium + // block blobs storage account type. + AccessTier *StorageAccountPropertiesCreateParameters_AccessTier `json:"accessTier,omitempty"` + + // AllowBlobPublicAccess: Allow or disallow public access to all blobs or containers in the storage account. The default + // interpretation is false for this property. + AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` + + // AllowCrossTenantReplication: Allow or disallow cross AAD tenant object replication. Set this property to true for new or + // existing accounts only if object replication policies will involve storage accounts in different AAD tenants. The + // default interpretation is false for new accounts to follow best security practices by default. + AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + + // AllowSharedKeyAccess: Indicates whether the storage account permits requests to be authorized with the account access + // key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure + // Active Directory (Azure AD). The default value is null, which is equivalent to true. + AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` + + // AllowedCopyScope: Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. + AllowedCopyScope *StorageAccountPropertiesCreateParameters_AllowedCopyScope `json:"allowedCopyScope,omitempty"` + + // AzureFilesIdentityBasedAuthentication: Provides the identity based authentication settings for Azure Files. + AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication_ARM `json:"azureFilesIdentityBasedAuthentication,omitempty"` + + // CustomDomain: User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported + // per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name + // property. + CustomDomain *CustomDomain_ARM `json:"customDomain,omitempty"` + + // DefaultToOAuthAuthentication: A boolean flag which indicates whether the default authentication is OAuth or not. The + // default interpretation is false for this property. + DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + + // DnsEndpointType: Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of + // accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an + // alphanumeric DNS Zone identifier. + DnsEndpointType *StorageAccountPropertiesCreateParameters_DnsEndpointType `json:"dnsEndpointType,omitempty"` + + // Encryption: Encryption settings to be used for server-side encryption for the storage account. + Encryption *Encryption_ARM `json:"encryption,omitempty"` + + // ImmutableStorageWithVersioning: The property is immutable and can only be set to true at the account creation time. When + // set to true, it enables object level immutability for all the new containers in the account by default. + ImmutableStorageWithVersioning *ImmutableStorageAccount_ARM `json:"immutableStorageWithVersioning,omitempty"` + + // IsHnsEnabled: Account HierarchicalNamespace enabled if sets to true. + IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` + + // IsLocalUserEnabled: Enables local users feature, if set to true + IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` + + // IsNfsV3Enabled: NFS 3.0 protocol support enabled if set to true. + IsNfsV3Enabled *bool `json:"isNfsV3Enabled,omitempty"` + + // IsSftpEnabled: Enables Secure File Transfer Protocol, if set to true + IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + + // KeyPolicy: KeyPolicy assigned to the storage account. + KeyPolicy *KeyPolicy_ARM `json:"keyPolicy,omitempty"` + + // LargeFileSharesState: Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. + LargeFileSharesState *StorageAccountPropertiesCreateParameters_LargeFileSharesState `json:"largeFileSharesState,omitempty"` + + // MinimumTlsVersion: Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS + // 1.0 for this property. + MinimumTlsVersion *StorageAccountPropertiesCreateParameters_MinimumTlsVersion `json:"minimumTlsVersion,omitempty"` + + // NetworkAcls: Network rule set + NetworkAcls *NetworkRuleSet_ARM `json:"networkAcls,omitempty"` + + // PublicNetworkAccess: Allow or disallow public network access to Storage Account. Value is optional but if passed in, + // must be 'Enabled' or 'Disabled'. + PublicNetworkAccess *StorageAccountPropertiesCreateParameters_PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + + // RoutingPreference: Maintains information about the network routing choice opted by the user for data transfer + RoutingPreference *RoutingPreference_ARM `json:"routingPreference,omitempty"` + + // SasPolicy: SasPolicy assigned to the storage account. + SasPolicy *SasPolicy_ARM `json:"sasPolicy,omitempty"` + + // SupportsHttpsTrafficOnly: Allows https traffic only to storage service if sets to true. The default value is true since + // API version 2019-04-01. + SupportsHttpsTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` +} + +// Settings for Azure Files identity based authentication. +type AzureFilesIdentityBasedAuthentication_ARM struct { + // ActiveDirectoryProperties: Required if directoryServiceOptions are AD, optional if they are AADKERB. + ActiveDirectoryProperties *ActiveDirectoryProperties_ARM `json:"activeDirectoryProperties,omitempty"` + + // DefaultSharePermission: Default share permission for users using Kerberos authentication if RBAC role is not assigned. + DefaultSharePermission *AzureFilesIdentityBasedAuthentication_DefaultSharePermission `json:"defaultSharePermission,omitempty"` + + // DirectoryServiceOptions: Indicates the directory service used. Note that this enum may be extended in the future. + DirectoryServiceOptions *AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions `json:"directoryServiceOptions,omitempty"` +} + +// The custom domain assigned to this storage account. This can be set via Update. +type CustomDomain_ARM struct { + // Name: Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. + Name *string `json:"name,omitempty"` + + // UseSubDomainName: Indicates whether indirect CName validation is enabled. Default value is false. This should only be + // set on updates. + UseSubDomainName *bool `json:"useSubDomainName,omitempty"` +} + +// The encryption settings on the storage account. +type Encryption_ARM struct { + // Identity: The identity to be used with service-side encryption at rest. + Identity *EncryptionIdentity_ARM `json:"identity,omitempty"` + + // KeySource: The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, + // Microsoft.Keyvault + KeySource *Encryption_KeySource `json:"keySource,omitempty"` + + // Keyvaultproperties: Properties provided by key vault. + Keyvaultproperties *KeyVaultProperties_ARM `json:"keyvaultproperties,omitempty"` + + // RequireInfrastructureEncryption: A boolean indicating whether or not the service applies a secondary layer of encryption + // with platform managed keys for data at rest. + RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` + + // Services: List of services which support encryption. + Services *EncryptionServices_ARM `json:"services,omitempty"` +} + +// The type of extendedLocation. +// +kubebuilder:validation:Enum={"EdgeZone"} +type ExtendedLocationType string + +const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") + +// +kubebuilder:validation:Enum={"None","SystemAssigned","SystemAssigned,UserAssigned","UserAssigned"} +type Identity_Type string + +const ( + Identity_Type_None = Identity_Type("None") + Identity_Type_SystemAssigned = Identity_Type("SystemAssigned") + Identity_Type_SystemAssignedUserAssigned = Identity_Type("SystemAssigned,UserAssigned") + Identity_Type_UserAssigned = Identity_Type("UserAssigned") +) + +// This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. +type ImmutableStorageAccount_ARM struct { + // Enabled: A boolean flag which enables account-level immutability. All the containers under such an account have + // object-level immutability enabled by default. + Enabled *bool `json:"enabled,omitempty"` + + // ImmutabilityPolicy: Specifies the default account-level immutability policy which is inherited and applied to objects + // that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher + // precedence than the container-level immutability policy, which has a higher precedence than the account-level + // immutability policy. + ImmutabilityPolicy *AccountImmutabilityPolicyProperties_ARM `json:"immutabilityPolicy,omitempty"` +} + +// KeyPolicy assigned to the storage account. +type KeyPolicy_ARM struct { + // KeyExpirationPeriodInDays: The key expiration period in days. + KeyExpirationPeriodInDays *int `json:"keyExpirationPeriodInDays,omitempty"` +} + +// Network rule set +type NetworkRuleSet_ARM struct { + // Bypass: Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of + // Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. + Bypass *NetworkRuleSet_Bypass `json:"bypass,omitempty"` + + // DefaultAction: Specifies the default action of allow or deny when no other rules match. + DefaultAction *NetworkRuleSet_DefaultAction `json:"defaultAction,omitempty"` + + // IpRules: Sets the IP ACL rules + IpRules []IPRule_ARM `json:"ipRules"` + + // ResourceAccessRules: Sets the resource access rules + ResourceAccessRules []ResourceAccessRule_ARM `json:"resourceAccessRules"` + + // VirtualNetworkRules: Sets the virtual network rules + VirtualNetworkRules []VirtualNetworkRule_ARM `json:"virtualNetworkRules"` +} + +// Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user +// data, the default option is microsoft routing +type RoutingPreference_ARM struct { + // PublishInternetEndpoints: A boolean flag which indicates whether internet routing storage endpoints are to be published + PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` + + // PublishMicrosoftEndpoints: A boolean flag which indicates whether microsoft routing storage endpoints are to be published + PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` + + // RoutingChoice: Routing Choice defines the kind of network routing opted by the user. + RoutingChoice *RoutingPreference_RoutingChoice `json:"routingChoice,omitempty"` +} + +// SasPolicy assigned to the storage account. +type SasPolicy_ARM struct { + // ExpirationAction: The SAS expiration action. Can only be Log. + ExpirationAction *SasPolicy_ExpirationAction `json:"expirationAction,omitempty"` + + // SasExpirationPeriod: The SAS expiration period, DD.HH:MM:SS. + SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"` +} + +// The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called +// accountType. +// +kubebuilder:validation:Enum={"Premium_LRS","Premium_ZRS","Standard_GRS","Standard_GZRS","Standard_LRS","Standard_RAGRS","Standard_RAGZRS","Standard_ZRS"} +type SkuName string + +const ( + SkuName_Premium_LRS = SkuName("Premium_LRS") + SkuName_Premium_ZRS = SkuName("Premium_ZRS") + SkuName_Standard_GRS = SkuName("Standard_GRS") + SkuName_Standard_GZRS = SkuName("Standard_GZRS") + SkuName_Standard_LRS = SkuName("Standard_LRS") + SkuName_Standard_RAGRS = SkuName("Standard_RAGRS") + SkuName_Standard_RAGZRS = SkuName("Standard_RAGZRS") + SkuName_Standard_ZRS = SkuName("Standard_ZRS") +) + +// The SKU tier. This is based on the SKU name. +// +kubebuilder:validation:Enum={"Premium","Standard"} +type Tier string + +const ( + Tier_Premium = Tier("Premium") + Tier_Standard = Tier("Standard") +) + +// Information about the user assigned identity for the resource +type UserAssignedIdentityDetails_ARM struct { +} + +// This defines account-level immutability policy properties. +type AccountImmutabilityPolicyProperties_ARM struct { + // AllowProtectedAppendWrites: This property can only be changed for disabled and unlocked time-based retention policies. + // When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only + // new blocks can be added and any existing blocks cannot be modified or deleted. + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + + // ImmutabilityPeriodSinceCreationInDays: The immutability period for the blobs in the container since the policy creation, + // in days. + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + + // State: The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state + // allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites + // property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a + // Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition + // to a Locked state which cannot be reverted. + State *AccountImmutabilityPolicyProperties_State `json:"state,omitempty"` +} + +// Settings properties for Active Directory (AD). +type ActiveDirectoryProperties_ARM struct { + // AccountType: Specifies the Active Directory account type for Azure Storage. + AccountType *ActiveDirectoryProperties_AccountType `json:"accountType,omitempty"` + + // AzureStorageSid: Specifies the security identifier (SID) for Azure Storage. + AzureStorageSid *string `json:"azureStorageSid,omitempty"` + + // DomainGuid: Specifies the domain GUID. + DomainGuid *string `json:"domainGuid,omitempty"` + + // DomainName: Specifies the primary domain that the AD DNS server is authoritative for. + DomainName *string `json:"domainName,omitempty"` + + // DomainSid: Specifies the security identifier (SID). + DomainSid *string `json:"domainSid,omitempty"` + + // ForestName: Specifies the Active Directory forest to get. + ForestName *string `json:"forestName,omitempty"` + + // NetBiosDomainName: Specifies the NetBIOS domain name. + NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` + + // SamAccountName: Specifies the Active Directory SAMAccountName for Azure Storage. + SamAccountName *string `json:"samAccountName,omitempty"` +} + +// Encryption identity for the storage account. +type EncryptionIdentity_ARM struct { + // FederatedIdentityClientId: ClientId of the multi-tenant application to be used in conjunction with the user-assigned + // identity for cross-tenant customer-managed-keys server-side encryption on the storage account. + FederatedIdentityClientId *string `json:"federatedIdentityClientId,omitempty"` + UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` +} + +// A list of services that support encryption. +type EncryptionServices_ARM struct { + // Blob: The encryption function of the blob storage service. + Blob *EncryptionService_ARM `json:"blob,omitempty"` + + // File: The encryption function of the file storage service. + File *EncryptionService_ARM `json:"file,omitempty"` + + // Queue: The encryption function of the queue storage service. + Queue *EncryptionService_ARM `json:"queue,omitempty"` + + // Table: The encryption function of the table storage service. + Table *EncryptionService_ARM `json:"table,omitempty"` +} + +// IP rule with specific IP or IP range in CIDR format. +type IPRule_ARM struct { + // Action: The action of IP ACL rule. + Action *IPRule_Action `json:"action,omitempty"` + + // Value: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + Value *string `json:"value,omitempty"` +} + +// Properties of key vault. +type KeyVaultProperties_ARM struct { + // Keyname: The name of KeyVault key. + Keyname *string `json:"keyname,omitempty"` + + // Keyvaulturi: The Uri of KeyVault. + Keyvaulturi *string `json:"keyvaulturi,omitempty"` + + // Keyversion: The version of KeyVault key. + Keyversion *string `json:"keyversion,omitempty"` +} + +// Resource Access Rule. +type ResourceAccessRule_ARM struct { + ResourceId *string `json:"resourceId,omitempty"` + + // TenantId: Tenant Id + TenantId *string `json:"tenantId,omitempty"` +} + +// Virtual Network rule. +type VirtualNetworkRule_ARM struct { + // Action: The action of virtual network rule. + Action *VirtualNetworkRule_Action `json:"action,omitempty"` + Id *string `json:"id,omitempty"` + + // State: Gets the state of virtual network rule. + State *VirtualNetworkRule_State `json:"state,omitempty"` +} + +// A service that allows server-side encryption to be used. +type EncryptionService_ARM struct { + // Enabled: A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is + // enabled by default today and cannot be disabled. + Enabled *bool `json:"enabled,omitempty"` + + // KeyType: Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped + // encryption key will be used. 'Service' key type implies that a default service key is used. + KeyType *EncryptionService_KeyType `json:"keyType,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_account_spec_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_account_spec_arm_types_gen_test.go new file mode 100644 index 00000000000..3371645c6ea --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_account_spec_arm_types_gen_test.go @@ -0,0 +1,1599 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccount_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccount_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccount_Spec_ARM, StorageAccount_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccount_Spec_ARM runs a test to see if a specific instance of StorageAccount_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccount_Spec_ARM(subject StorageAccount_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccount_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccount_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccount_Spec_ARMGenerator() +var storageAccount_Spec_ARMGenerator gopter.Gen + +// StorageAccount_Spec_ARMGenerator returns a generator of StorageAccount_Spec_ARM instances for property testing. +// We first initialize storageAccount_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccount_Spec_ARMGenerator() gopter.Gen { + if storageAccount_Spec_ARMGenerator != nil { + return storageAccount_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccount_Spec_ARM(generators) + storageAccount_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccount_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccount_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccount_Spec_ARM(generators) + storageAccount_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccount_Spec_ARM{}), generators) + + return storageAccount_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccount_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccount_Spec_ARM(gens map[string]gopter.Gen) { + gens["Kind"] = gen.PtrOf(gen.OneConstOf( + StorageAccount_Kind_Spec_BlobStorage, + StorageAccount_Kind_Spec_BlockBlobStorage, + StorageAccount_Kind_Spec_FileStorage, + StorageAccount_Kind_Spec_Storage, + StorageAccount_Kind_Spec_StorageV2)) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.AlphaString() + gens["Tags"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccount_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccount_Spec_ARM(gens map[string]gopter.Gen) { + gens["ExtendedLocation"] = gen.PtrOf(ExtendedLocation_ARMGenerator()) + gens["Identity"] = gen.PtrOf(Identity_ARMGenerator()) + gens["Properties"] = gen.PtrOf(StorageAccountPropertiesCreateParameters_ARMGenerator()) + gens["Sku"] = gen.PtrOf(Sku_ARMGenerator()) +} + +func Test_ExtendedLocation_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ExtendedLocation_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForExtendedLocation_ARM, ExtendedLocation_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForExtendedLocation_ARM runs a test to see if a specific instance of ExtendedLocation_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForExtendedLocation_ARM(subject ExtendedLocation_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ExtendedLocation_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ExtendedLocation_ARM instances for property testing - lazily instantiated by +// ExtendedLocation_ARMGenerator() +var extendedLocation_ARMGenerator gopter.Gen + +// ExtendedLocation_ARMGenerator returns a generator of ExtendedLocation_ARM instances for property testing. +func ExtendedLocation_ARMGenerator() gopter.Gen { + if extendedLocation_ARMGenerator != nil { + return extendedLocation_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForExtendedLocation_ARM(generators) + extendedLocation_ARMGenerator = gen.Struct(reflect.TypeOf(ExtendedLocation_ARM{}), generators) + + return extendedLocation_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForExtendedLocation_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForExtendedLocation_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf(ExtendedLocationType_EdgeZone)) +} + +func Test_Identity_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Identity_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIdentity_ARM, Identity_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIdentity_ARM runs a test to see if a specific instance of Identity_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForIdentity_ARM(subject Identity_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Identity_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Identity_ARM instances for property testing - lazily instantiated by Identity_ARMGenerator() +var identity_ARMGenerator gopter.Gen + +// Identity_ARMGenerator returns a generator of Identity_ARM instances for property testing. +// We first initialize identity_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Identity_ARMGenerator() gopter.Gen { + if identity_ARMGenerator != nil { + return identity_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_ARM(generators) + identity_ARMGenerator = gen.Struct(reflect.TypeOf(Identity_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_ARM(generators) + AddRelatedPropertyGeneratorsForIdentity_ARM(generators) + identity_ARMGenerator = gen.Struct(reflect.TypeOf(Identity_ARM{}), generators) + + return identity_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForIdentity_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIdentity_ARM(gens map[string]gopter.Gen) { + gens["Type"] = gen.PtrOf(gen.OneConstOf( + Identity_Type_None, + Identity_Type_SystemAssigned, + Identity_Type_SystemAssignedUserAssigned, + Identity_Type_UserAssigned)) +} + +// AddRelatedPropertyGeneratorsForIdentity_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForIdentity_ARM(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.MapOf(gen.AlphaString(), UserAssignedIdentityDetails_ARMGenerator()) +} + +func Test_Sku_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Sku_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSku_ARM, Sku_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSku_ARM runs a test to see if a specific instance of Sku_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForSku_ARM(subject Sku_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Sku_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Sku_ARM instances for property testing - lazily instantiated by Sku_ARMGenerator() +var sku_ARMGenerator gopter.Gen + +// Sku_ARMGenerator returns a generator of Sku_ARM instances for property testing. +func Sku_ARMGenerator() gopter.Gen { + if sku_ARMGenerator != nil { + return sku_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSku_ARM(generators) + sku_ARMGenerator = gen.Struct(reflect.TypeOf(Sku_ARM{}), generators) + + return sku_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForSku_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSku_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.OneConstOf( + SkuName_Premium_LRS, + SkuName_Premium_ZRS, + SkuName_Standard_GRS, + SkuName_Standard_GZRS, + SkuName_Standard_LRS, + SkuName_Standard_RAGRS, + SkuName_Standard_RAGZRS, + SkuName_Standard_ZRS)) + gens["Tier"] = gen.PtrOf(gen.OneConstOf(Tier_Premium, Tier_Standard)) +} + +func Test_StorageAccountPropertiesCreateParameters_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountPropertiesCreateParameters_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountPropertiesCreateParameters_ARM, StorageAccountPropertiesCreateParameters_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountPropertiesCreateParameters_ARM runs a test to see if a specific instance of StorageAccountPropertiesCreateParameters_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountPropertiesCreateParameters_ARM(subject StorageAccountPropertiesCreateParameters_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountPropertiesCreateParameters_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountPropertiesCreateParameters_ARM instances for property testing - lazily instantiated by +// StorageAccountPropertiesCreateParameters_ARMGenerator() +var storageAccountPropertiesCreateParameters_ARMGenerator gopter.Gen + +// StorageAccountPropertiesCreateParameters_ARMGenerator returns a generator of StorageAccountPropertiesCreateParameters_ARM instances for property testing. +// We first initialize storageAccountPropertiesCreateParameters_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccountPropertiesCreateParameters_ARMGenerator() gopter.Gen { + if storageAccountPropertiesCreateParameters_ARMGenerator != nil { + return storageAccountPropertiesCreateParameters_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountPropertiesCreateParameters_ARM(generators) + storageAccountPropertiesCreateParameters_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccountPropertiesCreateParameters_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountPropertiesCreateParameters_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccountPropertiesCreateParameters_ARM(generators) + storageAccountPropertiesCreateParameters_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccountPropertiesCreateParameters_ARM{}), generators) + + return storageAccountPropertiesCreateParameters_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccountPropertiesCreateParameters_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccountPropertiesCreateParameters_ARM(gens map[string]gopter.Gen) { + gens["AccessTier"] = gen.PtrOf(gen.OneConstOf(StorageAccountPropertiesCreateParameters_AccessTier_Cool, StorageAccountPropertiesCreateParameters_AccessTier_Hot, StorageAccountPropertiesCreateParameters_AccessTier_Premium)) + gens["AllowBlobPublicAccess"] = gen.PtrOf(gen.Bool()) + gens["AllowCrossTenantReplication"] = gen.PtrOf(gen.Bool()) + gens["AllowSharedKeyAccess"] = gen.PtrOf(gen.Bool()) + gens["AllowedCopyScope"] = gen.PtrOf(gen.OneConstOf(StorageAccountPropertiesCreateParameters_AllowedCopyScope_AAD, StorageAccountPropertiesCreateParameters_AllowedCopyScope_PrivateLink)) + gens["DefaultToOAuthAuthentication"] = gen.PtrOf(gen.Bool()) + gens["DnsEndpointType"] = gen.PtrOf(gen.OneConstOf(StorageAccountPropertiesCreateParameters_DnsEndpointType_AzureDnsZone, StorageAccountPropertiesCreateParameters_DnsEndpointType_Standard)) + gens["IsHnsEnabled"] = gen.PtrOf(gen.Bool()) + gens["IsLocalUserEnabled"] = gen.PtrOf(gen.Bool()) + gens["IsNfsV3Enabled"] = gen.PtrOf(gen.Bool()) + gens["IsSftpEnabled"] = gen.PtrOf(gen.Bool()) + gens["LargeFileSharesState"] = gen.PtrOf(gen.OneConstOf(StorageAccountPropertiesCreateParameters_LargeFileSharesState_Disabled, StorageAccountPropertiesCreateParameters_LargeFileSharesState_Enabled)) + gens["MinimumTlsVersion"] = gen.PtrOf(gen.OneConstOf(StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_0, StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_1, StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_2)) + gens["PublicNetworkAccess"] = gen.PtrOf(gen.OneConstOf(StorageAccountPropertiesCreateParameters_PublicNetworkAccess_Disabled, StorageAccountPropertiesCreateParameters_PublicNetworkAccess_Enabled)) + gens["SupportsHttpsTrafficOnly"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForStorageAccountPropertiesCreateParameters_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountPropertiesCreateParameters_ARM(gens map[string]gopter.Gen) { + gens["AzureFilesIdentityBasedAuthentication"] = gen.PtrOf(AzureFilesIdentityBasedAuthentication_ARMGenerator()) + gens["CustomDomain"] = gen.PtrOf(CustomDomain_ARMGenerator()) + gens["Encryption"] = gen.PtrOf(Encryption_ARMGenerator()) + gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageAccount_ARMGenerator()) + gens["KeyPolicy"] = gen.PtrOf(KeyPolicy_ARMGenerator()) + gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSet_ARMGenerator()) + gens["RoutingPreference"] = gen.PtrOf(RoutingPreference_ARMGenerator()) + gens["SasPolicy"] = gen.PtrOf(SasPolicy_ARMGenerator()) +} + +func Test_AzureFilesIdentityBasedAuthentication_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AzureFilesIdentityBasedAuthentication_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication_ARM, AzureFilesIdentityBasedAuthentication_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication_ARM runs a test to see if a specific instance of AzureFilesIdentityBasedAuthentication_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication_ARM(subject AzureFilesIdentityBasedAuthentication_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AzureFilesIdentityBasedAuthentication_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AzureFilesIdentityBasedAuthentication_ARM instances for property testing - lazily instantiated by +// AzureFilesIdentityBasedAuthentication_ARMGenerator() +var azureFilesIdentityBasedAuthentication_ARMGenerator gopter.Gen + +// AzureFilesIdentityBasedAuthentication_ARMGenerator returns a generator of AzureFilesIdentityBasedAuthentication_ARM instances for property testing. +// We first initialize azureFilesIdentityBasedAuthentication_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func AzureFilesIdentityBasedAuthentication_ARMGenerator() gopter.Gen { + if azureFilesIdentityBasedAuthentication_ARMGenerator != nil { + return azureFilesIdentityBasedAuthentication_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_ARM(generators) + azureFilesIdentityBasedAuthentication_ARMGenerator = gen.Struct(reflect.TypeOf(AzureFilesIdentityBasedAuthentication_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_ARM(generators) + AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_ARM(generators) + azureFilesIdentityBasedAuthentication_ARMGenerator = gen.Struct(reflect.TypeOf(AzureFilesIdentityBasedAuthentication_ARM{}), generators) + + return azureFilesIdentityBasedAuthentication_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_ARM(gens map[string]gopter.Gen) { + gens["DefaultSharePermission"] = gen.PtrOf(gen.OneConstOf( + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_None, + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareContributor, + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareElevatedContributor, + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareReader)) + gens["DirectoryServiceOptions"] = gen.PtrOf(gen.OneConstOf( + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADDS, + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADKERB, + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AD, + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_None)) +} + +// AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_ARM(gens map[string]gopter.Gen) { + gens["ActiveDirectoryProperties"] = gen.PtrOf(ActiveDirectoryProperties_ARMGenerator()) +} + +func Test_CustomDomain_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CustomDomain_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCustomDomain_ARM, CustomDomain_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCustomDomain_ARM runs a test to see if a specific instance of CustomDomain_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForCustomDomain_ARM(subject CustomDomain_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CustomDomain_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CustomDomain_ARM instances for property testing - lazily instantiated by CustomDomain_ARMGenerator() +var customDomain_ARMGenerator gopter.Gen + +// CustomDomain_ARMGenerator returns a generator of CustomDomain_ARM instances for property testing. +func CustomDomain_ARMGenerator() gopter.Gen { + if customDomain_ARMGenerator != nil { + return customDomain_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCustomDomain_ARM(generators) + customDomain_ARMGenerator = gen.Struct(reflect.TypeOf(CustomDomain_ARM{}), generators) + + return customDomain_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForCustomDomain_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCustomDomain_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["UseSubDomainName"] = gen.PtrOf(gen.Bool()) +} + +func Test_Encryption_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Encryption_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryption_ARM, Encryption_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryption_ARM runs a test to see if a specific instance of Encryption_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryption_ARM(subject Encryption_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Encryption_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Encryption_ARM instances for property testing - lazily instantiated by Encryption_ARMGenerator() +var encryption_ARMGenerator gopter.Gen + +// Encryption_ARMGenerator returns a generator of Encryption_ARM instances for property testing. +// We first initialize encryption_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Encryption_ARMGenerator() gopter.Gen { + if encryption_ARMGenerator != nil { + return encryption_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryption_ARM(generators) + encryption_ARMGenerator = gen.Struct(reflect.TypeOf(Encryption_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryption_ARM(generators) + AddRelatedPropertyGeneratorsForEncryption_ARM(generators) + encryption_ARMGenerator = gen.Struct(reflect.TypeOf(Encryption_ARM{}), generators) + + return encryption_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForEncryption_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryption_ARM(gens map[string]gopter.Gen) { + gens["KeySource"] = gen.PtrOf(gen.OneConstOf(Encryption_KeySource_MicrosoftKeyvault, Encryption_KeySource_MicrosoftStorage)) + gens["RequireInfrastructureEncryption"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForEncryption_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryption_ARM(gens map[string]gopter.Gen) { + gens["Identity"] = gen.PtrOf(EncryptionIdentity_ARMGenerator()) + gens["Keyvaultproperties"] = gen.PtrOf(KeyVaultProperties_ARMGenerator()) + gens["Services"] = gen.PtrOf(EncryptionServices_ARMGenerator()) +} + +func Test_ImmutableStorageAccount_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutableStorageAccount_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutableStorageAccount_ARM, ImmutableStorageAccount_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutableStorageAccount_ARM runs a test to see if a specific instance of ImmutableStorageAccount_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutableStorageAccount_ARM(subject ImmutableStorageAccount_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutableStorageAccount_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutableStorageAccount_ARM instances for property testing - lazily instantiated by +// ImmutableStorageAccount_ARMGenerator() +var immutableStorageAccount_ARMGenerator gopter.Gen + +// ImmutableStorageAccount_ARMGenerator returns a generator of ImmutableStorageAccount_ARM instances for property testing. +// We first initialize immutableStorageAccount_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ImmutableStorageAccount_ARMGenerator() gopter.Gen { + if immutableStorageAccount_ARMGenerator != nil { + return immutableStorageAccount_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageAccount_ARM(generators) + immutableStorageAccount_ARMGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageAccount_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageAccount_ARM(generators) + AddRelatedPropertyGeneratorsForImmutableStorageAccount_ARM(generators) + immutableStorageAccount_ARMGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageAccount_ARM{}), generators) + + return immutableStorageAccount_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForImmutableStorageAccount_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutableStorageAccount_ARM(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForImmutableStorageAccount_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForImmutableStorageAccount_ARM(gens map[string]gopter.Gen) { + gens["ImmutabilityPolicy"] = gen.PtrOf(AccountImmutabilityPolicyProperties_ARMGenerator()) +} + +func Test_KeyPolicy_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyPolicy_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyPolicy_ARM, KeyPolicy_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyPolicy_ARM runs a test to see if a specific instance of KeyPolicy_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyPolicy_ARM(subject KeyPolicy_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyPolicy_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyPolicy_ARM instances for property testing - lazily instantiated by KeyPolicy_ARMGenerator() +var keyPolicy_ARMGenerator gopter.Gen + +// KeyPolicy_ARMGenerator returns a generator of KeyPolicy_ARM instances for property testing. +func KeyPolicy_ARMGenerator() gopter.Gen { + if keyPolicy_ARMGenerator != nil { + return keyPolicy_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyPolicy_ARM(generators) + keyPolicy_ARMGenerator = gen.Struct(reflect.TypeOf(KeyPolicy_ARM{}), generators) + + return keyPolicy_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForKeyPolicy_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyPolicy_ARM(gens map[string]gopter.Gen) { + gens["KeyExpirationPeriodInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_NetworkRuleSet_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of NetworkRuleSet_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForNetworkRuleSet_ARM, NetworkRuleSet_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForNetworkRuleSet_ARM runs a test to see if a specific instance of NetworkRuleSet_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForNetworkRuleSet_ARM(subject NetworkRuleSet_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual NetworkRuleSet_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of NetworkRuleSet_ARM instances for property testing - lazily instantiated by NetworkRuleSet_ARMGenerator() +var networkRuleSet_ARMGenerator gopter.Gen + +// NetworkRuleSet_ARMGenerator returns a generator of NetworkRuleSet_ARM instances for property testing. +// We first initialize networkRuleSet_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func NetworkRuleSet_ARMGenerator() gopter.Gen { + if networkRuleSet_ARMGenerator != nil { + return networkRuleSet_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet_ARM(generators) + networkRuleSet_ARMGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet_ARM(generators) + AddRelatedPropertyGeneratorsForNetworkRuleSet_ARM(generators) + networkRuleSet_ARMGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_ARM{}), generators) + + return networkRuleSet_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForNetworkRuleSet_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForNetworkRuleSet_ARM(gens map[string]gopter.Gen) { + gens["Bypass"] = gen.PtrOf(gen.OneConstOf( + NetworkRuleSet_Bypass_AzureServices, + NetworkRuleSet_Bypass_Logging, + NetworkRuleSet_Bypass_Metrics, + NetworkRuleSet_Bypass_None)) + gens["DefaultAction"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_DefaultAction_Allow, NetworkRuleSet_DefaultAction_Deny)) +} + +// AddRelatedPropertyGeneratorsForNetworkRuleSet_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForNetworkRuleSet_ARM(gens map[string]gopter.Gen) { + gens["IpRules"] = gen.SliceOf(IPRule_ARMGenerator()) + gens["ResourceAccessRules"] = gen.SliceOf(ResourceAccessRule_ARMGenerator()) + gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRule_ARMGenerator()) +} + +func Test_RoutingPreference_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RoutingPreference_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRoutingPreference_ARM, RoutingPreference_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRoutingPreference_ARM runs a test to see if a specific instance of RoutingPreference_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForRoutingPreference_ARM(subject RoutingPreference_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RoutingPreference_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RoutingPreference_ARM instances for property testing - lazily instantiated by +// RoutingPreference_ARMGenerator() +var routingPreference_ARMGenerator gopter.Gen + +// RoutingPreference_ARMGenerator returns a generator of RoutingPreference_ARM instances for property testing. +func RoutingPreference_ARMGenerator() gopter.Gen { + if routingPreference_ARMGenerator != nil { + return routingPreference_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRoutingPreference_ARM(generators) + routingPreference_ARMGenerator = gen.Struct(reflect.TypeOf(RoutingPreference_ARM{}), generators) + + return routingPreference_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForRoutingPreference_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRoutingPreference_ARM(gens map[string]gopter.Gen) { + gens["PublishInternetEndpoints"] = gen.PtrOf(gen.Bool()) + gens["PublishMicrosoftEndpoints"] = gen.PtrOf(gen.Bool()) + gens["RoutingChoice"] = gen.PtrOf(gen.OneConstOf(RoutingPreference_RoutingChoice_InternetRouting, RoutingPreference_RoutingChoice_MicrosoftRouting)) +} + +func Test_SasPolicy_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SasPolicy_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSasPolicy_ARM, SasPolicy_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSasPolicy_ARM runs a test to see if a specific instance of SasPolicy_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForSasPolicy_ARM(subject SasPolicy_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SasPolicy_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SasPolicy_ARM instances for property testing - lazily instantiated by SasPolicy_ARMGenerator() +var sasPolicy_ARMGenerator gopter.Gen + +// SasPolicy_ARMGenerator returns a generator of SasPolicy_ARM instances for property testing. +func SasPolicy_ARMGenerator() gopter.Gen { + if sasPolicy_ARMGenerator != nil { + return sasPolicy_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSasPolicy_ARM(generators) + sasPolicy_ARMGenerator = gen.Struct(reflect.TypeOf(SasPolicy_ARM{}), generators) + + return sasPolicy_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForSasPolicy_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSasPolicy_ARM(gens map[string]gopter.Gen) { + gens["ExpirationAction"] = gen.PtrOf(gen.OneConstOf(SasPolicy_ExpirationAction_Log)) + gens["SasExpirationPeriod"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_UserAssignedIdentityDetails_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of UserAssignedIdentityDetails_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserAssignedIdentityDetails_ARM, UserAssignedIdentityDetails_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserAssignedIdentityDetails_ARM runs a test to see if a specific instance of UserAssignedIdentityDetails_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForUserAssignedIdentityDetails_ARM(subject UserAssignedIdentityDetails_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserAssignedIdentityDetails_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of UserAssignedIdentityDetails_ARM instances for property testing - lazily instantiated by +// UserAssignedIdentityDetails_ARMGenerator() +var userAssignedIdentityDetails_ARMGenerator gopter.Gen + +// UserAssignedIdentityDetails_ARMGenerator returns a generator of UserAssignedIdentityDetails_ARM instances for property testing. +func UserAssignedIdentityDetails_ARMGenerator() gopter.Gen { + if userAssignedIdentityDetails_ARMGenerator != nil { + return userAssignedIdentityDetails_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + userAssignedIdentityDetails_ARMGenerator = gen.Struct(reflect.TypeOf(UserAssignedIdentityDetails_ARM{}), generators) + + return userAssignedIdentityDetails_ARMGenerator +} + +func Test_AccountImmutabilityPolicyProperties_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccountImmutabilityPolicyProperties_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccountImmutabilityPolicyProperties_ARM, AccountImmutabilityPolicyProperties_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccountImmutabilityPolicyProperties_ARM runs a test to see if a specific instance of AccountImmutabilityPolicyProperties_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForAccountImmutabilityPolicyProperties_ARM(subject AccountImmutabilityPolicyProperties_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccountImmutabilityPolicyProperties_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccountImmutabilityPolicyProperties_ARM instances for property testing - lazily instantiated by +// AccountImmutabilityPolicyProperties_ARMGenerator() +var accountImmutabilityPolicyProperties_ARMGenerator gopter.Gen + +// AccountImmutabilityPolicyProperties_ARMGenerator returns a generator of AccountImmutabilityPolicyProperties_ARM instances for property testing. +func AccountImmutabilityPolicyProperties_ARMGenerator() gopter.Gen { + if accountImmutabilityPolicyProperties_ARMGenerator != nil { + return accountImmutabilityPolicyProperties_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_ARM(generators) + accountImmutabilityPolicyProperties_ARMGenerator = gen.Struct(reflect.TypeOf(AccountImmutabilityPolicyProperties_ARM{}), generators) + + return accountImmutabilityPolicyProperties_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_ARM(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWrites"] = gen.PtrOf(gen.Bool()) + gens["ImmutabilityPeriodSinceCreationInDays"] = gen.PtrOf(gen.Int()) + gens["State"] = gen.PtrOf(gen.OneConstOf(AccountImmutabilityPolicyProperties_State_Disabled, AccountImmutabilityPolicyProperties_State_Locked, AccountImmutabilityPolicyProperties_State_Unlocked)) +} + +func Test_ActiveDirectoryProperties_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ActiveDirectoryProperties_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForActiveDirectoryProperties_ARM, ActiveDirectoryProperties_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForActiveDirectoryProperties_ARM runs a test to see if a specific instance of ActiveDirectoryProperties_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForActiveDirectoryProperties_ARM(subject ActiveDirectoryProperties_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ActiveDirectoryProperties_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ActiveDirectoryProperties_ARM instances for property testing - lazily instantiated by +// ActiveDirectoryProperties_ARMGenerator() +var activeDirectoryProperties_ARMGenerator gopter.Gen + +// ActiveDirectoryProperties_ARMGenerator returns a generator of ActiveDirectoryProperties_ARM instances for property testing. +func ActiveDirectoryProperties_ARMGenerator() gopter.Gen { + if activeDirectoryProperties_ARMGenerator != nil { + return activeDirectoryProperties_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForActiveDirectoryProperties_ARM(generators) + activeDirectoryProperties_ARMGenerator = gen.Struct(reflect.TypeOf(ActiveDirectoryProperties_ARM{}), generators) + + return activeDirectoryProperties_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForActiveDirectoryProperties_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForActiveDirectoryProperties_ARM(gens map[string]gopter.Gen) { + gens["AccountType"] = gen.PtrOf(gen.OneConstOf(ActiveDirectoryProperties_AccountType_Computer, ActiveDirectoryProperties_AccountType_User)) + gens["AzureStorageSid"] = gen.PtrOf(gen.AlphaString()) + gens["DomainGuid"] = gen.PtrOf(gen.AlphaString()) + gens["DomainName"] = gen.PtrOf(gen.AlphaString()) + gens["DomainSid"] = gen.PtrOf(gen.AlphaString()) + gens["ForestName"] = gen.PtrOf(gen.AlphaString()) + gens["NetBiosDomainName"] = gen.PtrOf(gen.AlphaString()) + gens["SamAccountName"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionIdentity_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionIdentity_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionIdentity_ARM, EncryptionIdentity_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionIdentity_ARM runs a test to see if a specific instance of EncryptionIdentity_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionIdentity_ARM(subject EncryptionIdentity_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionIdentity_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionIdentity_ARM instances for property testing - lazily instantiated by +// EncryptionIdentity_ARMGenerator() +var encryptionIdentity_ARMGenerator gopter.Gen + +// EncryptionIdentity_ARMGenerator returns a generator of EncryptionIdentity_ARM instances for property testing. +func EncryptionIdentity_ARMGenerator() gopter.Gen { + if encryptionIdentity_ARMGenerator != nil { + return encryptionIdentity_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionIdentity_ARM(generators) + encryptionIdentity_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionIdentity_ARM{}), generators) + + return encryptionIdentity_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionIdentity_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionIdentity_ARM(gens map[string]gopter.Gen) { + gens["FederatedIdentityClientId"] = gen.PtrOf(gen.AlphaString()) + gens["UserAssignedIdentity"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionServices_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionServices_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionServices_ARM, EncryptionServices_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionServices_ARM runs a test to see if a specific instance of EncryptionServices_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionServices_ARM(subject EncryptionServices_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionServices_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionServices_ARM instances for property testing - lazily instantiated by +// EncryptionServices_ARMGenerator() +var encryptionServices_ARMGenerator gopter.Gen + +// EncryptionServices_ARMGenerator returns a generator of EncryptionServices_ARM instances for property testing. +func EncryptionServices_ARMGenerator() gopter.Gen { + if encryptionServices_ARMGenerator != nil { + return encryptionServices_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForEncryptionServices_ARM(generators) + encryptionServices_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionServices_ARM{}), generators) + + return encryptionServices_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForEncryptionServices_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionServices_ARM(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(EncryptionService_ARMGenerator()) + gens["File"] = gen.PtrOf(EncryptionService_ARMGenerator()) + gens["Queue"] = gen.PtrOf(EncryptionService_ARMGenerator()) + gens["Table"] = gen.PtrOf(EncryptionService_ARMGenerator()) +} + +func Test_IPRule_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of IPRule_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIPRule_ARM, IPRule_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIPRule_ARM runs a test to see if a specific instance of IPRule_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForIPRule_ARM(subject IPRule_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual IPRule_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of IPRule_ARM instances for property testing - lazily instantiated by IPRule_ARMGenerator() +var ipRule_ARMGenerator gopter.Gen + +// IPRule_ARMGenerator returns a generator of IPRule_ARM instances for property testing. +func IPRule_ARMGenerator() gopter.Gen { + if ipRule_ARMGenerator != nil { + return ipRule_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIPRule_ARM(generators) + ipRule_ARMGenerator = gen.Struct(reflect.TypeOf(IPRule_ARM{}), generators) + + return ipRule_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForIPRule_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIPRule_ARM(gens map[string]gopter.Gen) { + gens["Action"] = gen.PtrOf(gen.OneConstOf(IPRule_Action_Allow)) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_KeyVaultProperties_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyVaultProperties_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyVaultProperties_ARM, KeyVaultProperties_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyVaultProperties_ARM runs a test to see if a specific instance of KeyVaultProperties_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyVaultProperties_ARM(subject KeyVaultProperties_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyVaultProperties_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyVaultProperties_ARM instances for property testing - lazily instantiated by +// KeyVaultProperties_ARMGenerator() +var keyVaultProperties_ARMGenerator gopter.Gen + +// KeyVaultProperties_ARMGenerator returns a generator of KeyVaultProperties_ARM instances for property testing. +func KeyVaultProperties_ARMGenerator() gopter.Gen { + if keyVaultProperties_ARMGenerator != nil { + return keyVaultProperties_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyVaultProperties_ARM(generators) + keyVaultProperties_ARMGenerator = gen.Struct(reflect.TypeOf(KeyVaultProperties_ARM{}), generators) + + return keyVaultProperties_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForKeyVaultProperties_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyVaultProperties_ARM(gens map[string]gopter.Gen) { + gens["Keyname"] = gen.PtrOf(gen.AlphaString()) + gens["Keyvaulturi"] = gen.PtrOf(gen.AlphaString()) + gens["Keyversion"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ResourceAccessRule_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ResourceAccessRule_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForResourceAccessRule_ARM, ResourceAccessRule_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForResourceAccessRule_ARM runs a test to see if a specific instance of ResourceAccessRule_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForResourceAccessRule_ARM(subject ResourceAccessRule_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ResourceAccessRule_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ResourceAccessRule_ARM instances for property testing - lazily instantiated by +// ResourceAccessRule_ARMGenerator() +var resourceAccessRule_ARMGenerator gopter.Gen + +// ResourceAccessRule_ARMGenerator returns a generator of ResourceAccessRule_ARM instances for property testing. +func ResourceAccessRule_ARMGenerator() gopter.Gen { + if resourceAccessRule_ARMGenerator != nil { + return resourceAccessRule_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForResourceAccessRule_ARM(generators) + resourceAccessRule_ARMGenerator = gen.Struct(reflect.TypeOf(ResourceAccessRule_ARM{}), generators) + + return resourceAccessRule_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForResourceAccessRule_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForResourceAccessRule_ARM(gens map[string]gopter.Gen) { + gens["ResourceId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_VirtualNetworkRule_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VirtualNetworkRule_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule_ARM, VirtualNetworkRule_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVirtualNetworkRule_ARM runs a test to see if a specific instance of VirtualNetworkRule_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForVirtualNetworkRule_ARM(subject VirtualNetworkRule_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VirtualNetworkRule_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VirtualNetworkRule_ARM instances for property testing - lazily instantiated by +// VirtualNetworkRule_ARMGenerator() +var virtualNetworkRule_ARMGenerator gopter.Gen + +// VirtualNetworkRule_ARMGenerator returns a generator of VirtualNetworkRule_ARM instances for property testing. +func VirtualNetworkRule_ARMGenerator() gopter.Gen { + if virtualNetworkRule_ARMGenerator != nil { + return virtualNetworkRule_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVirtualNetworkRule_ARM(generators) + virtualNetworkRule_ARMGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule_ARM{}), generators) + + return virtualNetworkRule_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForVirtualNetworkRule_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVirtualNetworkRule_ARM(gens map[string]gopter.Gen) { + gens["Action"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkRule_Action_Allow)) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["State"] = gen.PtrOf(gen.OneConstOf( + VirtualNetworkRule_State_Deprovisioning, + VirtualNetworkRule_State_Failed, + VirtualNetworkRule_State_NetworkSourceDeleted, + VirtualNetworkRule_State_Provisioning, + VirtualNetworkRule_State_Succeeded)) +} + +func Test_EncryptionService_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionService_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionService_ARM, EncryptionService_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionService_ARM runs a test to see if a specific instance of EncryptionService_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionService_ARM(subject EncryptionService_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionService_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionService_ARM instances for property testing - lazily instantiated by +// EncryptionService_ARMGenerator() +var encryptionService_ARMGenerator gopter.Gen + +// EncryptionService_ARMGenerator returns a generator of EncryptionService_ARM instances for property testing. +func EncryptionService_ARMGenerator() gopter.Gen { + if encryptionService_ARMGenerator != nil { + return encryptionService_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionService_ARM(generators) + encryptionService_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionService_ARM{}), generators) + + return encryptionService_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionService_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionService_ARM(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["KeyType"] = gen.PtrOf(gen.OneConstOf(EncryptionService_KeyType_Account, EncryptionService_KeyType_Service)) +} diff --git a/v2/api/storage/v1api20230101/storage_account_status_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_account_status_arm_types_gen.go new file mode 100644 index 00000000000..c1191df3532 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_account_status_arm_types_gen.go @@ -0,0 +1,671 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +// The storage account. +type StorageAccount_STATUS_ARM struct { + // ExtendedLocation: The extendedLocation of the resource. + ExtendedLocation *ExtendedLocation_STATUS_ARM `json:"extendedLocation,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Identity: The identity of the resource. + Identity *Identity_STATUS_ARM `json:"identity,omitempty"` + + // Kind: Gets the Kind. + Kind *StorageAccount_Kind_STATUS `json:"kind,omitempty"` + + // Location: The geo-location where the resource lives + Location *string `json:"location,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Properties: Properties of the storage account. + Properties *StorageAccountProperties_STATUS_ARM `json:"properties,omitempty"` + + // Sku: Gets the SKU. + Sku *Sku_STATUS_ARM `json:"sku,omitempty"` + + // Tags: Resource tags. + Tags map[string]string `json:"tags"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// The complex type of the extended location. +type ExtendedLocation_STATUS_ARM struct { + // Name: The name of the extended location. + Name *string `json:"name,omitempty"` + + // Type: The type of the extended location. + Type *ExtendedLocationType_STATUS `json:"type,omitempty"` +} + +// Identity for the resource. +type Identity_STATUS_ARM struct { + // PrincipalId: The principal ID of resource identity. + PrincipalId *string `json:"principalId,omitempty"` + + // TenantId: The tenant ID of resource. + TenantId *string `json:"tenantId,omitempty"` + + // Type: The identity type. + Type *Identity_Type_STATUS `json:"type,omitempty"` + + // UserAssignedIdentities: Gets or sets a list of key value pairs that describe the set of User Assigned identities that + // will be used with this storage account. The key is the ARM resource identifier of the identity. Only 1 User Assigned + // identity is permitted here. + UserAssignedIdentities map[string]UserAssignedIdentity_STATUS_ARM `json:"userAssignedIdentities"` +} + +// The SKU of the storage account. +type Sku_STATUS_ARM struct { + // Name: The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called + // accountType. + Name *SkuName_STATUS `json:"name,omitempty"` + + // Tier: The SKU tier. This is based on the SKU name. + Tier *Tier_STATUS `json:"tier,omitempty"` +} + +type StorageAccount_Kind_STATUS string + +const ( + StorageAccount_Kind_STATUS_BlobStorage = StorageAccount_Kind_STATUS("BlobStorage") + StorageAccount_Kind_STATUS_BlockBlobStorage = StorageAccount_Kind_STATUS("BlockBlobStorage") + StorageAccount_Kind_STATUS_FileStorage = StorageAccount_Kind_STATUS("FileStorage") + StorageAccount_Kind_STATUS_Storage = StorageAccount_Kind_STATUS("Storage") + StorageAccount_Kind_STATUS_StorageV2 = StorageAccount_Kind_STATUS("StorageV2") +) + +// Properties of the storage account. +type StorageAccountProperties_STATUS_ARM struct { + // AccessTier: Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' + // access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium + // block blobs storage account type. + AccessTier *StorageAccountProperties_AccessTier_STATUS `json:"accessTier,omitempty"` + + // AccountMigrationInProgress: If customer initiated account migration is in progress, the value will be true else it will + // be null. + AccountMigrationInProgress *bool `json:"accountMigrationInProgress,omitempty"` + + // AllowBlobPublicAccess: Allow or disallow public access to all blobs or containers in the storage account. The default + // interpretation is false for this property. + AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` + + // AllowCrossTenantReplication: Allow or disallow cross AAD tenant object replication. Set this property to true for new or + // existing accounts only if object replication policies will involve storage accounts in different AAD tenants. The + // default interpretation is false for new accounts to follow best security practices by default. + AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + + // AllowSharedKeyAccess: Indicates whether the storage account permits requests to be authorized with the account access + // key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure + // Active Directory (Azure AD). The default value is null, which is equivalent to true. + AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` + + // AllowedCopyScope: Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. + AllowedCopyScope *StorageAccountProperties_AllowedCopyScope_STATUS `json:"allowedCopyScope,omitempty"` + + // AzureFilesIdentityBasedAuthentication: Provides the identity based authentication settings for Azure Files. + AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication_STATUS_ARM `json:"azureFilesIdentityBasedAuthentication,omitempty"` + + // BlobRestoreStatus: Blob restore status + BlobRestoreStatus *BlobRestoreStatus_STATUS_ARM `json:"blobRestoreStatus,omitempty"` + + // CreationTime: Gets the creation date and time of the storage account in UTC. + CreationTime *string `json:"creationTime,omitempty"` + + // CustomDomain: Gets the custom domain the user assigned to this storage account. + CustomDomain *CustomDomain_STATUS_ARM `json:"customDomain,omitempty"` + + // DefaultToOAuthAuthentication: A boolean flag which indicates whether the default authentication is OAuth or not. The + // default interpretation is false for this property. + DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + + // DnsEndpointType: Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of + // accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an + // alphanumeric DNS Zone identifier. + DnsEndpointType *StorageAccountProperties_DnsEndpointType_STATUS `json:"dnsEndpointType,omitempty"` + + // Encryption: Encryption settings to be used for server-side encryption for the storage account. + Encryption *Encryption_STATUS_ARM `json:"encryption,omitempty"` + + // FailoverInProgress: If the failover is in progress, the value will be true, otherwise, it will be null. + FailoverInProgress *bool `json:"failoverInProgress,omitempty"` + + // GeoReplicationStats: Geo Replication Stats + GeoReplicationStats *GeoReplicationStats_STATUS_ARM `json:"geoReplicationStats,omitempty"` + + // ImmutableStorageWithVersioning: The property is immutable and can only be set to true at the account creation time. When + // set to true, it enables object level immutability for all the containers in the account by default. + ImmutableStorageWithVersioning *ImmutableStorageAccount_STATUS_ARM `json:"immutableStorageWithVersioning,omitempty"` + + // IsHnsEnabled: Account HierarchicalNamespace enabled if sets to true. + IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` + + // IsLocalUserEnabled: Enables local users feature, if set to true + IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` + + // IsNfsV3Enabled: NFS 3.0 protocol support enabled if set to true. + IsNfsV3Enabled *bool `json:"isNfsV3Enabled,omitempty"` + + // IsSftpEnabled: Enables Secure File Transfer Protocol, if set to true + IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + + // IsSkuConversionBlocked: This property will be set to true or false on an event of ongoing migration. Default value is + // null. + IsSkuConversionBlocked *bool `json:"isSkuConversionBlocked,omitempty"` + + // KeyCreationTime: Storage account keys creation time. + KeyCreationTime *KeyCreationTime_STATUS_ARM `json:"keyCreationTime,omitempty"` + + // KeyPolicy: KeyPolicy assigned to the storage account. + KeyPolicy *KeyPolicy_STATUS_ARM `json:"keyPolicy,omitempty"` + + // LargeFileSharesState: Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. + LargeFileSharesState *StorageAccountProperties_LargeFileSharesState_STATUS `json:"largeFileSharesState,omitempty"` + + // LastGeoFailoverTime: Gets the timestamp of the most recent instance of a failover to the secondary location. Only the + // most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only + // available if the accountType is Standard_GRS or Standard_RAGRS. + LastGeoFailoverTime *string `json:"lastGeoFailoverTime,omitempty"` + + // MinimumTlsVersion: Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS + // 1.0 for this property. + MinimumTlsVersion *StorageAccountProperties_MinimumTlsVersion_STATUS `json:"minimumTlsVersion,omitempty"` + + // NetworkAcls: Network rule set + NetworkAcls *NetworkRuleSet_STATUS_ARM `json:"networkAcls,omitempty"` + + // PrimaryEndpoints: Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that + // Standard_ZRS and Premium_LRS accounts only return the blob endpoint. + PrimaryEndpoints *Endpoints_STATUS_ARM `json:"primaryEndpoints,omitempty"` + + // PrimaryLocation: Gets the location of the primary data center for the storage account. + PrimaryLocation *string `json:"primaryLocation,omitempty"` + + // PrivateEndpointConnections: List of private endpoint connection associated with the specified storage account + PrivateEndpointConnections []PrivateEndpointConnection_STATUS_ARM `json:"privateEndpointConnections"` + + // ProvisioningState: Gets the status of the storage account at the time the operation was called. + ProvisioningState *StorageAccountProperties_ProvisioningState_STATUS `json:"provisioningState,omitempty"` + + // PublicNetworkAccess: Allow or disallow public network access to Storage Account. Value is optional but if passed in, + // must be 'Enabled' or 'Disabled'. + PublicNetworkAccess *StorageAccountProperties_PublicNetworkAccess_STATUS `json:"publicNetworkAccess,omitempty"` + + // RoutingPreference: Maintains information about the network routing choice opted by the user for data transfer + RoutingPreference *RoutingPreference_STATUS_ARM `json:"routingPreference,omitempty"` + + // SasPolicy: SasPolicy assigned to the storage account. + SasPolicy *SasPolicy_STATUS_ARM `json:"sasPolicy,omitempty"` + + // SecondaryEndpoints: Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the + // secondary location of the storage account. Only available if the SKU name is Standard_RAGRS. + SecondaryEndpoints *Endpoints_STATUS_ARM `json:"secondaryEndpoints,omitempty"` + + // SecondaryLocation: Gets the location of the geo-replicated secondary for the storage account. Only available if the + // accountType is Standard_GRS or Standard_RAGRS. + SecondaryLocation *string `json:"secondaryLocation,omitempty"` + + // StatusOfPrimary: Gets the status indicating whether the primary location of the storage account is available or + // unavailable. + StatusOfPrimary *StorageAccountProperties_StatusOfPrimary_STATUS `json:"statusOfPrimary,omitempty"` + + // StatusOfSecondary: Gets the status indicating whether the secondary location of the storage account is available or + // unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS. + StatusOfSecondary *StorageAccountProperties_StatusOfSecondary_STATUS `json:"statusOfSecondary,omitempty"` + + // StorageAccountSkuConversionStatus: This property is readOnly and is set by server during asynchronous storage account + // sku conversion operations. + StorageAccountSkuConversionStatus *StorageAccountSkuConversionStatus_STATUS_ARM `json:"storageAccountSkuConversionStatus,omitempty"` + + // SupportsHttpsTrafficOnly: Allows https traffic only to storage service if sets to true. + SupportsHttpsTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` +} + +// Settings for Azure Files identity based authentication. +type AzureFilesIdentityBasedAuthentication_STATUS_ARM struct { + // ActiveDirectoryProperties: Required if directoryServiceOptions are AD, optional if they are AADKERB. + ActiveDirectoryProperties *ActiveDirectoryProperties_STATUS_ARM `json:"activeDirectoryProperties,omitempty"` + + // DefaultSharePermission: Default share permission for users using Kerberos authentication if RBAC role is not assigned. + DefaultSharePermission *AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS `json:"defaultSharePermission,omitempty"` + + // DirectoryServiceOptions: Indicates the directory service used. Note that this enum may be extended in the future. + DirectoryServiceOptions *AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS `json:"directoryServiceOptions,omitempty"` +} + +// Blob restore status. +type BlobRestoreStatus_STATUS_ARM struct { + // FailureReason: Failure reason when blob restore is failed. + FailureReason *string `json:"failureReason,omitempty"` + + // Parameters: Blob restore request parameters. + Parameters *BlobRestoreParameters_STATUS_ARM `json:"parameters,omitempty"` + + // RestoreId: Id for tracking blob restore request. + RestoreId *string `json:"restoreId,omitempty"` + + // Status: The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. + // - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed. + Status *BlobRestoreStatus_Status_STATUS `json:"status,omitempty"` +} + +// The custom domain assigned to this storage account. This can be set via Update. +type CustomDomain_STATUS_ARM struct { + // Name: Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. + Name *string `json:"name,omitempty"` + + // UseSubDomainName: Indicates whether indirect CName validation is enabled. Default value is false. This should only be + // set on updates. + UseSubDomainName *bool `json:"useSubDomainName,omitempty"` +} + +// The encryption settings on the storage account. +type Encryption_STATUS_ARM struct { + // Identity: The identity to be used with service-side encryption at rest. + Identity *EncryptionIdentity_STATUS_ARM `json:"identity,omitempty"` + + // KeySource: The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, + // Microsoft.Keyvault + KeySource *Encryption_KeySource_STATUS `json:"keySource,omitempty"` + + // Keyvaultproperties: Properties provided by key vault. + Keyvaultproperties *KeyVaultProperties_STATUS_ARM `json:"keyvaultproperties,omitempty"` + + // RequireInfrastructureEncryption: A boolean indicating whether or not the service applies a secondary layer of encryption + // with platform managed keys for data at rest. + RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` + + // Services: List of services which support encryption. + Services *EncryptionServices_STATUS_ARM `json:"services,omitempty"` +} + +// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object. +type Endpoints_STATUS_ARM struct { + // Blob: Gets the blob endpoint. + Blob *string `json:"blob,omitempty"` + + // Dfs: Gets the dfs endpoint. + Dfs *string `json:"dfs,omitempty"` + + // File: Gets the file endpoint. + File *string `json:"file,omitempty"` + + // InternetEndpoints: Gets the internet routing storage endpoints + InternetEndpoints *StorageAccountInternetEndpoints_STATUS_ARM `json:"internetEndpoints,omitempty"` + + // MicrosoftEndpoints: Gets the microsoft routing storage endpoints. + MicrosoftEndpoints *StorageAccountMicrosoftEndpoints_STATUS_ARM `json:"microsoftEndpoints,omitempty"` + + // Queue: Gets the queue endpoint. + Queue *string `json:"queue,omitempty"` + + // Table: Gets the table endpoint. + Table *string `json:"table,omitempty"` + + // Web: Gets the web endpoint. + Web *string `json:"web,omitempty"` +} + +// The type of extendedLocation. +type ExtendedLocationType_STATUS string + +const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") + +// Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when +// geo-redundant replication is enabled for the storage account. +type GeoReplicationStats_STATUS_ARM struct { + // CanFailover: A boolean flag which indicates whether or not account failover is supported for the account. + CanFailover *bool `json:"canFailover,omitempty"` + + // CanPlannedFailover: A boolean flag which indicates whether or not planned account failover is supported for the account. + CanPlannedFailover *bool `json:"canPlannedFailover,omitempty"` + + // LastSyncTime: All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. + // Primary writes following this point in time may or may not be available for reads. Element may be default value if value + // of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. + LastSyncTime *string `json:"lastSyncTime,omitempty"` + + // PostFailoverRedundancy: The redundancy type of the account after an account failover is performed. + PostFailoverRedundancy *GeoReplicationStats_PostFailoverRedundancy_STATUS `json:"postFailoverRedundancy,omitempty"` + + // PostPlannedFailoverRedundancy: The redundancy type of the account after a planned account failover is performed. + PostPlannedFailoverRedundancy *GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS `json:"postPlannedFailoverRedundancy,omitempty"` + + // Status: The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is + // active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary + // location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the + // secondary location is temporarily unavailable. + Status *GeoReplicationStats_Status_STATUS `json:"status,omitempty"` +} + +type Identity_Type_STATUS string + +const ( + Identity_Type_STATUS_None = Identity_Type_STATUS("None") + Identity_Type_STATUS_SystemAssigned = Identity_Type_STATUS("SystemAssigned") + Identity_Type_STATUS_SystemAssignedUserAssigned = Identity_Type_STATUS("SystemAssigned,UserAssigned") + Identity_Type_STATUS_UserAssigned = Identity_Type_STATUS("UserAssigned") +) + +// This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. +type ImmutableStorageAccount_STATUS_ARM struct { + // Enabled: A boolean flag which enables account-level immutability. All the containers under such an account have + // object-level immutability enabled by default. + Enabled *bool `json:"enabled,omitempty"` + + // ImmutabilityPolicy: Specifies the default account-level immutability policy which is inherited and applied to objects + // that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher + // precedence than the container-level immutability policy, which has a higher precedence than the account-level + // immutability policy. + ImmutabilityPolicy *AccountImmutabilityPolicyProperties_STATUS_ARM `json:"immutabilityPolicy,omitempty"` +} + +// Storage account keys creation time. +type KeyCreationTime_STATUS_ARM struct { + Key1 *string `json:"key1,omitempty"` + Key2 *string `json:"key2,omitempty"` +} + +// KeyPolicy assigned to the storage account. +type KeyPolicy_STATUS_ARM struct { + // KeyExpirationPeriodInDays: The key expiration period in days. + KeyExpirationPeriodInDays *int `json:"keyExpirationPeriodInDays,omitempty"` +} + +// Network rule set +type NetworkRuleSet_STATUS_ARM struct { + // Bypass: Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of + // Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. + Bypass *NetworkRuleSet_Bypass_STATUS `json:"bypass,omitempty"` + + // DefaultAction: Specifies the default action of allow or deny when no other rules match. + DefaultAction *NetworkRuleSet_DefaultAction_STATUS `json:"defaultAction,omitempty"` + + // IpRules: Sets the IP ACL rules + IpRules []IPRule_STATUS_ARM `json:"ipRules"` + + // ResourceAccessRules: Sets the resource access rules + ResourceAccessRules []ResourceAccessRule_STATUS_ARM `json:"resourceAccessRules"` + + // VirtualNetworkRules: Sets the virtual network rules + VirtualNetworkRules []VirtualNetworkRule_STATUS_ARM `json:"virtualNetworkRules"` +} + +// The Private Endpoint Connection resource. +type PrivateEndpointConnection_STATUS_ARM struct { + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` +} + +// Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user +// data, the default option is microsoft routing +type RoutingPreference_STATUS_ARM struct { + // PublishInternetEndpoints: A boolean flag which indicates whether internet routing storage endpoints are to be published + PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` + + // PublishMicrosoftEndpoints: A boolean flag which indicates whether microsoft routing storage endpoints are to be published + PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` + + // RoutingChoice: Routing Choice defines the kind of network routing opted by the user. + RoutingChoice *RoutingPreference_RoutingChoice_STATUS `json:"routingChoice,omitempty"` +} + +// SasPolicy assigned to the storage account. +type SasPolicy_STATUS_ARM struct { + // ExpirationAction: The SAS expiration action. Can only be Log. + ExpirationAction *SasPolicy_ExpirationAction_STATUS `json:"expirationAction,omitempty"` + + // SasExpirationPeriod: The SAS expiration period, DD.HH:MM:SS. + SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"` +} + +// The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called +// accountType. +type SkuName_STATUS string + +const ( + SkuName_STATUS_Premium_LRS = SkuName_STATUS("Premium_LRS") + SkuName_STATUS_Premium_ZRS = SkuName_STATUS("Premium_ZRS") + SkuName_STATUS_Standard_GRS = SkuName_STATUS("Standard_GRS") + SkuName_STATUS_Standard_GZRS = SkuName_STATUS("Standard_GZRS") + SkuName_STATUS_Standard_LRS = SkuName_STATUS("Standard_LRS") + SkuName_STATUS_Standard_RAGRS = SkuName_STATUS("Standard_RAGRS") + SkuName_STATUS_Standard_RAGZRS = SkuName_STATUS("Standard_RAGZRS") + SkuName_STATUS_Standard_ZRS = SkuName_STATUS("Standard_ZRS") +) + +// This defines the sku conversion status object for asynchronous sku conversions. +type StorageAccountSkuConversionStatus_STATUS_ARM struct { + // EndTime: This property represents the sku conversion end time. + EndTime *string `json:"endTime,omitempty"` + + // SkuConversionStatus: This property indicates the current sku conversion status. + SkuConversionStatus *StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS `json:"skuConversionStatus,omitempty"` + + // StartTime: This property represents the sku conversion start time. + StartTime *string `json:"startTime,omitempty"` + + // TargetSkuName: This property represents the target sku name to which the account sku is being converted asynchronously. + TargetSkuName *SkuName_STATUS `json:"targetSkuName,omitempty"` +} + +// The SKU tier. This is based on the SKU name. +type Tier_STATUS string + +const ( + Tier_STATUS_Premium = Tier_STATUS("Premium") + Tier_STATUS_Standard = Tier_STATUS("Standard") +) + +// UserAssignedIdentity for the resource. +type UserAssignedIdentity_STATUS_ARM struct { + // ClientId: The client ID of the identity. + ClientId *string `json:"clientId,omitempty"` + + // PrincipalId: The principal ID of the identity. + PrincipalId *string `json:"principalId,omitempty"` +} + +// This defines account-level immutability policy properties. +type AccountImmutabilityPolicyProperties_STATUS_ARM struct { + // AllowProtectedAppendWrites: This property can only be changed for disabled and unlocked time-based retention policies. + // When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only + // new blocks can be added and any existing blocks cannot be modified or deleted. + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + + // ImmutabilityPeriodSinceCreationInDays: The immutability period for the blobs in the container since the policy creation, + // in days. + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + + // State: The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state + // allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites + // property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a + // Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition + // to a Locked state which cannot be reverted. + State *AccountImmutabilityPolicyProperties_State_STATUS `json:"state,omitempty"` +} + +// Settings properties for Active Directory (AD). +type ActiveDirectoryProperties_STATUS_ARM struct { + // AccountType: Specifies the Active Directory account type for Azure Storage. + AccountType *ActiveDirectoryProperties_AccountType_STATUS `json:"accountType,omitempty"` + + // AzureStorageSid: Specifies the security identifier (SID) for Azure Storage. + AzureStorageSid *string `json:"azureStorageSid,omitempty"` + + // DomainGuid: Specifies the domain GUID. + DomainGuid *string `json:"domainGuid,omitempty"` + + // DomainName: Specifies the primary domain that the AD DNS server is authoritative for. + DomainName *string `json:"domainName,omitempty"` + + // DomainSid: Specifies the security identifier (SID). + DomainSid *string `json:"domainSid,omitempty"` + + // ForestName: Specifies the Active Directory forest to get. + ForestName *string `json:"forestName,omitempty"` + + // NetBiosDomainName: Specifies the NetBIOS domain name. + NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` + + // SamAccountName: Specifies the Active Directory SAMAccountName for Azure Storage. + SamAccountName *string `json:"samAccountName,omitempty"` +} + +// Blob restore parameters +type BlobRestoreParameters_STATUS_ARM struct { + // BlobRanges: Blob ranges to restore. + BlobRanges []BlobRestoreRange_STATUS_ARM `json:"blobRanges"` + + // TimeToRestore: Restore blob to the specified time. + TimeToRestore *string `json:"timeToRestore,omitempty"` +} + +// Encryption identity for the storage account. +type EncryptionIdentity_STATUS_ARM struct { + // FederatedIdentityClientId: ClientId of the multi-tenant application to be used in conjunction with the user-assigned + // identity for cross-tenant customer-managed-keys server-side encryption on the storage account. + FederatedIdentityClientId *string `json:"federatedIdentityClientId,omitempty"` + + // UserAssignedIdentity: Resource identifier of the UserAssigned identity to be associated with server-side encryption on + // the storage account. + UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` +} + +// A list of services that support encryption. +type EncryptionServices_STATUS_ARM struct { + // Blob: The encryption function of the blob storage service. + Blob *EncryptionService_STATUS_ARM `json:"blob,omitempty"` + + // File: The encryption function of the file storage service. + File *EncryptionService_STATUS_ARM `json:"file,omitempty"` + + // Queue: The encryption function of the queue storage service. + Queue *EncryptionService_STATUS_ARM `json:"queue,omitempty"` + + // Table: The encryption function of the table storage service. + Table *EncryptionService_STATUS_ARM `json:"table,omitempty"` +} + +// IP rule with specific IP or IP range in CIDR format. +type IPRule_STATUS_ARM struct { + // Action: The action of IP ACL rule. + Action *IPRule_Action_STATUS `json:"action,omitempty"` + + // Value: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + Value *string `json:"value,omitempty"` +} + +// Properties of key vault. +type KeyVaultProperties_STATUS_ARM struct { + // CurrentVersionedKeyExpirationTimestamp: This is a read only property that represents the expiration time of the current + // version of the customer managed key used for encryption. + CurrentVersionedKeyExpirationTimestamp *string `json:"currentVersionedKeyExpirationTimestamp,omitempty"` + + // CurrentVersionedKeyIdentifier: The object identifier of the current versioned Key Vault Key in use. + CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"` + + // Keyname: The name of KeyVault key. + Keyname *string `json:"keyname,omitempty"` + + // Keyvaulturi: The Uri of KeyVault. + Keyvaulturi *string `json:"keyvaulturi,omitempty"` + + // Keyversion: The version of KeyVault key. + Keyversion *string `json:"keyversion,omitempty"` + + // LastKeyRotationTimestamp: Timestamp of last rotation of the Key Vault Key. + LastKeyRotationTimestamp *string `json:"lastKeyRotationTimestamp,omitempty"` +} + +// Resource Access Rule. +type ResourceAccessRule_STATUS_ARM struct { + // ResourceId: Resource Id + ResourceId *string `json:"resourceId,omitempty"` + + // TenantId: Tenant Id + TenantId *string `json:"tenantId,omitempty"` +} + +// The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint. +type StorageAccountInternetEndpoints_STATUS_ARM struct { + // Blob: Gets the blob endpoint. + Blob *string `json:"blob,omitempty"` + + // Dfs: Gets the dfs endpoint. + Dfs *string `json:"dfs,omitempty"` + + // File: Gets the file endpoint. + File *string `json:"file,omitempty"` + + // Web: Gets the web endpoint. + Web *string `json:"web,omitempty"` +} + +// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object via a microsoft routing +// endpoint. +type StorageAccountMicrosoftEndpoints_STATUS_ARM struct { + // Blob: Gets the blob endpoint. + Blob *string `json:"blob,omitempty"` + + // Dfs: Gets the dfs endpoint. + Dfs *string `json:"dfs,omitempty"` + + // File: Gets the file endpoint. + File *string `json:"file,omitempty"` + + // Queue: Gets the queue endpoint. + Queue *string `json:"queue,omitempty"` + + // Table: Gets the table endpoint. + Table *string `json:"table,omitempty"` + + // Web: Gets the web endpoint. + Web *string `json:"web,omitempty"` +} + +// Virtual Network rule. +type VirtualNetworkRule_STATUS_ARM struct { + // Action: The action of virtual network rule. + Action *VirtualNetworkRule_Action_STATUS `json:"action,omitempty"` + + // Id: Resource ID of a subnet, for example: + // /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + Id *string `json:"id,omitempty"` + + // State: Gets the state of virtual network rule. + State *VirtualNetworkRule_State_STATUS `json:"state,omitempty"` +} + +// Blob range +type BlobRestoreRange_STATUS_ARM struct { + // EndRange: Blob end range. This is exclusive. Empty means account end. + EndRange *string `json:"endRange,omitempty"` + + // StartRange: Blob start range. This is inclusive. Empty means account start. + StartRange *string `json:"startRange,omitempty"` +} + +// A service that allows server-side encryption to be used. +type EncryptionService_STATUS_ARM struct { + // Enabled: A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is + // enabled by default today and cannot be disabled. + Enabled *bool `json:"enabled,omitempty"` + + // KeyType: Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped + // encryption key will be used. 'Service' key type implies that a default service key is used. + KeyType *EncryptionService_KeyType_STATUS `json:"keyType,omitempty"` + + // LastEnabledTime: Gets a rough estimate of the date/time when the encryption was last enabled by the user. Data is + // encrypted at rest by default today and cannot be disabled. + LastEnabledTime *string `json:"lastEnabledTime,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_account_status_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_account_status_arm_types_gen_test.go new file mode 100644 index 00000000000..e8a4b8fad8f --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_account_status_arm_types_gen_test.go @@ -0,0 +1,2327 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccount_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccount_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccount_STATUS_ARM, StorageAccount_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccount_STATUS_ARM runs a test to see if a specific instance of StorageAccount_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccount_STATUS_ARM(subject StorageAccount_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccount_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccount_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccount_STATUS_ARMGenerator() +var storageAccount_STATUS_ARMGenerator gopter.Gen + +// StorageAccount_STATUS_ARMGenerator returns a generator of StorageAccount_STATUS_ARM instances for property testing. +// We first initialize storageAccount_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccount_STATUS_ARMGenerator() gopter.Gen { + if storageAccount_STATUS_ARMGenerator != nil { + return storageAccount_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccount_STATUS_ARM(generators) + storageAccount_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccount_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccount_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccount_STATUS_ARM(generators) + storageAccount_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccount_STATUS_ARM{}), generators) + + return storageAccount_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccount_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccount_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Kind"] = gen.PtrOf(gen.OneConstOf( + StorageAccount_Kind_STATUS_BlobStorage, + StorageAccount_Kind_STATUS_BlockBlobStorage, + StorageAccount_Kind_STATUS_FileStorage, + StorageAccount_Kind_STATUS_Storage, + StorageAccount_Kind_STATUS_StorageV2)) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Tags"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccount_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccount_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ExtendedLocation"] = gen.PtrOf(ExtendedLocation_STATUS_ARMGenerator()) + gens["Identity"] = gen.PtrOf(Identity_STATUS_ARMGenerator()) + gens["Properties"] = gen.PtrOf(StorageAccountProperties_STATUS_ARMGenerator()) + gens["Sku"] = gen.PtrOf(Sku_STATUS_ARMGenerator()) +} + +func Test_ExtendedLocation_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ExtendedLocation_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForExtendedLocation_STATUS_ARM, ExtendedLocation_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForExtendedLocation_STATUS_ARM runs a test to see if a specific instance of ExtendedLocation_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForExtendedLocation_STATUS_ARM(subject ExtendedLocation_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ExtendedLocation_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ExtendedLocation_STATUS_ARM instances for property testing - lazily instantiated by +// ExtendedLocation_STATUS_ARMGenerator() +var extendedLocation_STATUS_ARMGenerator gopter.Gen + +// ExtendedLocation_STATUS_ARMGenerator returns a generator of ExtendedLocation_STATUS_ARM instances for property testing. +func ExtendedLocation_STATUS_ARMGenerator() gopter.Gen { + if extendedLocation_STATUS_ARMGenerator != nil { + return extendedLocation_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForExtendedLocation_STATUS_ARM(generators) + extendedLocation_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ExtendedLocation_STATUS_ARM{}), generators) + + return extendedLocation_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForExtendedLocation_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForExtendedLocation_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf(ExtendedLocationType_STATUS_EdgeZone)) +} + +func Test_Identity_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Identity_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIdentity_STATUS_ARM, Identity_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIdentity_STATUS_ARM runs a test to see if a specific instance of Identity_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForIdentity_STATUS_ARM(subject Identity_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Identity_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Identity_STATUS_ARM instances for property testing - lazily instantiated by +// Identity_STATUS_ARMGenerator() +var identity_STATUS_ARMGenerator gopter.Gen + +// Identity_STATUS_ARMGenerator returns a generator of Identity_STATUS_ARM instances for property testing. +// We first initialize identity_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Identity_STATUS_ARMGenerator() gopter.Gen { + if identity_STATUS_ARMGenerator != nil { + return identity_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_STATUS_ARM(generators) + identity_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Identity_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForIdentity_STATUS_ARM(generators) + identity_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Identity_STATUS_ARM{}), generators) + + return identity_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForIdentity_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIdentity_STATUS_ARM(gens map[string]gopter.Gen) { + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf( + Identity_Type_STATUS_None, + Identity_Type_STATUS_SystemAssigned, + Identity_Type_STATUS_SystemAssignedUserAssigned, + Identity_Type_STATUS_UserAssigned)) +} + +// AddRelatedPropertyGeneratorsForIdentity_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForIdentity_STATUS_ARM(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.MapOf(gen.AlphaString(), UserAssignedIdentity_STATUS_ARMGenerator()) +} + +func Test_Sku_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Sku_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSku_STATUS_ARM, Sku_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSku_STATUS_ARM runs a test to see if a specific instance of Sku_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForSku_STATUS_ARM(subject Sku_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Sku_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Sku_STATUS_ARM instances for property testing - lazily instantiated by Sku_STATUS_ARMGenerator() +var sku_STATUS_ARMGenerator gopter.Gen + +// Sku_STATUS_ARMGenerator returns a generator of Sku_STATUS_ARM instances for property testing. +func Sku_STATUS_ARMGenerator() gopter.Gen { + if sku_STATUS_ARMGenerator != nil { + return sku_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSku_STATUS_ARM(generators) + sku_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Sku_STATUS_ARM{}), generators) + + return sku_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForSku_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSku_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.OneConstOf( + SkuName_STATUS_Premium_LRS, + SkuName_STATUS_Premium_ZRS, + SkuName_STATUS_Standard_GRS, + SkuName_STATUS_Standard_GZRS, + SkuName_STATUS_Standard_LRS, + SkuName_STATUS_Standard_RAGRS, + SkuName_STATUS_Standard_RAGZRS, + SkuName_STATUS_Standard_ZRS)) + gens["Tier"] = gen.PtrOf(gen.OneConstOf(Tier_STATUS_Premium, Tier_STATUS_Standard)) +} + +func Test_StorageAccountProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountProperties_STATUS_ARM, StorageAccountProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountProperties_STATUS_ARM runs a test to see if a specific instance of StorageAccountProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountProperties_STATUS_ARM(subject StorageAccountProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountProperties_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccountProperties_STATUS_ARMGenerator() +var storageAccountProperties_STATUS_ARMGenerator gopter.Gen + +// StorageAccountProperties_STATUS_ARMGenerator returns a generator of StorageAccountProperties_STATUS_ARM instances for property testing. +// We first initialize storageAccountProperties_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccountProperties_STATUS_ARMGenerator() gopter.Gen { + if storageAccountProperties_STATUS_ARMGenerator != nil { + return storageAccountProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountProperties_STATUS_ARM(generators) + storageAccountProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccountProperties_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountProperties_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccountProperties_STATUS_ARM(generators) + storageAccountProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccountProperties_STATUS_ARM{}), generators) + + return storageAccountProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccountProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccountProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AccessTier"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_AccessTier_STATUS_Cool, StorageAccountProperties_AccessTier_STATUS_Hot, StorageAccountProperties_AccessTier_STATUS_Premium)) + gens["AccountMigrationInProgress"] = gen.PtrOf(gen.Bool()) + gens["AllowBlobPublicAccess"] = gen.PtrOf(gen.Bool()) + gens["AllowCrossTenantReplication"] = gen.PtrOf(gen.Bool()) + gens["AllowSharedKeyAccess"] = gen.PtrOf(gen.Bool()) + gens["AllowedCopyScope"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_AllowedCopyScope_STATUS_AAD, StorageAccountProperties_AllowedCopyScope_STATUS_PrivateLink)) + gens["CreationTime"] = gen.PtrOf(gen.AlphaString()) + gens["DefaultToOAuthAuthentication"] = gen.PtrOf(gen.Bool()) + gens["DnsEndpointType"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_DnsEndpointType_STATUS_AzureDnsZone, StorageAccountProperties_DnsEndpointType_STATUS_Standard)) + gens["FailoverInProgress"] = gen.PtrOf(gen.Bool()) + gens["IsHnsEnabled"] = gen.PtrOf(gen.Bool()) + gens["IsLocalUserEnabled"] = gen.PtrOf(gen.Bool()) + gens["IsNfsV3Enabled"] = gen.PtrOf(gen.Bool()) + gens["IsSftpEnabled"] = gen.PtrOf(gen.Bool()) + gens["IsSkuConversionBlocked"] = gen.PtrOf(gen.Bool()) + gens["LargeFileSharesState"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_LargeFileSharesState_STATUS_Disabled, StorageAccountProperties_LargeFileSharesState_STATUS_Enabled)) + gens["LastGeoFailoverTime"] = gen.PtrOf(gen.AlphaString()) + gens["MinimumTlsVersion"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_0, StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_1, StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_2)) + gens["PrimaryLocation"] = gen.PtrOf(gen.AlphaString()) + gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_ProvisioningState_STATUS_Creating, StorageAccountProperties_ProvisioningState_STATUS_ResolvingDNS, StorageAccountProperties_ProvisioningState_STATUS_Succeeded)) + gens["PublicNetworkAccess"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_PublicNetworkAccess_STATUS_Disabled, StorageAccountProperties_PublicNetworkAccess_STATUS_Enabled)) + gens["SecondaryLocation"] = gen.PtrOf(gen.AlphaString()) + gens["StatusOfPrimary"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_StatusOfPrimary_STATUS_Available, StorageAccountProperties_StatusOfPrimary_STATUS_Unavailable)) + gens["StatusOfSecondary"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_StatusOfSecondary_STATUS_Available, StorageAccountProperties_StatusOfSecondary_STATUS_Unavailable)) + gens["SupportsHttpsTrafficOnly"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForStorageAccountProperties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AzureFilesIdentityBasedAuthentication"] = gen.PtrOf(AzureFilesIdentityBasedAuthentication_STATUS_ARMGenerator()) + gens["BlobRestoreStatus"] = gen.PtrOf(BlobRestoreStatus_STATUS_ARMGenerator()) + gens["CustomDomain"] = gen.PtrOf(CustomDomain_STATUS_ARMGenerator()) + gens["Encryption"] = gen.PtrOf(Encryption_STATUS_ARMGenerator()) + gens["GeoReplicationStats"] = gen.PtrOf(GeoReplicationStats_STATUS_ARMGenerator()) + gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageAccount_STATUS_ARMGenerator()) + gens["KeyCreationTime"] = gen.PtrOf(KeyCreationTime_STATUS_ARMGenerator()) + gens["KeyPolicy"] = gen.PtrOf(KeyPolicy_STATUS_ARMGenerator()) + gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSet_STATUS_ARMGenerator()) + gens["PrimaryEndpoints"] = gen.PtrOf(Endpoints_STATUS_ARMGenerator()) + gens["PrivateEndpointConnections"] = gen.SliceOf(PrivateEndpointConnection_STATUS_ARMGenerator()) + gens["RoutingPreference"] = gen.PtrOf(RoutingPreference_STATUS_ARMGenerator()) + gens["SasPolicy"] = gen.PtrOf(SasPolicy_STATUS_ARMGenerator()) + gens["SecondaryEndpoints"] = gen.PtrOf(Endpoints_STATUS_ARMGenerator()) + gens["StorageAccountSkuConversionStatus"] = gen.PtrOf(StorageAccountSkuConversionStatus_STATUS_ARMGenerator()) +} + +func Test_AzureFilesIdentityBasedAuthentication_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AzureFilesIdentityBasedAuthentication_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication_STATUS_ARM, AzureFilesIdentityBasedAuthentication_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication_STATUS_ARM runs a test to see if a specific instance of AzureFilesIdentityBasedAuthentication_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication_STATUS_ARM(subject AzureFilesIdentityBasedAuthentication_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AzureFilesIdentityBasedAuthentication_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AzureFilesIdentityBasedAuthentication_STATUS_ARM instances for property testing - lazily instantiated by +// AzureFilesIdentityBasedAuthentication_STATUS_ARMGenerator() +var azureFilesIdentityBasedAuthentication_STATUS_ARMGenerator gopter.Gen + +// AzureFilesIdentityBasedAuthentication_STATUS_ARMGenerator returns a generator of AzureFilesIdentityBasedAuthentication_STATUS_ARM instances for property testing. +// We first initialize azureFilesIdentityBasedAuthentication_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func AzureFilesIdentityBasedAuthentication_STATUS_ARMGenerator() gopter.Gen { + if azureFilesIdentityBasedAuthentication_STATUS_ARMGenerator != nil { + return azureFilesIdentityBasedAuthentication_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS_ARM(generators) + azureFilesIdentityBasedAuthentication_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(AzureFilesIdentityBasedAuthentication_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS_ARM(generators) + azureFilesIdentityBasedAuthentication_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(AzureFilesIdentityBasedAuthentication_STATUS_ARM{}), generators) + + return azureFilesIdentityBasedAuthentication_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS_ARM(gens map[string]gopter.Gen) { + gens["DefaultSharePermission"] = gen.PtrOf(gen.OneConstOf( + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_None, + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareContributor, + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareElevatedContributor, + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareReader)) + gens["DirectoryServiceOptions"] = gen.PtrOf(gen.OneConstOf( + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADDS, + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADKERB, + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AD, + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_None)) +} + +// AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ActiveDirectoryProperties"] = gen.PtrOf(ActiveDirectoryProperties_STATUS_ARMGenerator()) +} + +func Test_BlobRestoreStatus_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of BlobRestoreStatus_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForBlobRestoreStatus_STATUS_ARM, BlobRestoreStatus_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForBlobRestoreStatus_STATUS_ARM runs a test to see if a specific instance of BlobRestoreStatus_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForBlobRestoreStatus_STATUS_ARM(subject BlobRestoreStatus_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual BlobRestoreStatus_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of BlobRestoreStatus_STATUS_ARM instances for property testing - lazily instantiated by +// BlobRestoreStatus_STATUS_ARMGenerator() +var blobRestoreStatus_STATUS_ARMGenerator gopter.Gen + +// BlobRestoreStatus_STATUS_ARMGenerator returns a generator of BlobRestoreStatus_STATUS_ARM instances for property testing. +// We first initialize blobRestoreStatus_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func BlobRestoreStatus_STATUS_ARMGenerator() gopter.Gen { + if blobRestoreStatus_STATUS_ARMGenerator != nil { + return blobRestoreStatus_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreStatus_STATUS_ARM(generators) + blobRestoreStatus_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(BlobRestoreStatus_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreStatus_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForBlobRestoreStatus_STATUS_ARM(generators) + blobRestoreStatus_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(BlobRestoreStatus_STATUS_ARM{}), generators) + + return blobRestoreStatus_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForBlobRestoreStatus_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForBlobRestoreStatus_STATUS_ARM(gens map[string]gopter.Gen) { + gens["FailureReason"] = gen.PtrOf(gen.AlphaString()) + gens["RestoreId"] = gen.PtrOf(gen.AlphaString()) + gens["Status"] = gen.PtrOf(gen.OneConstOf(BlobRestoreStatus_Status_STATUS_Complete, BlobRestoreStatus_Status_STATUS_Failed, BlobRestoreStatus_Status_STATUS_InProgress)) +} + +// AddRelatedPropertyGeneratorsForBlobRestoreStatus_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForBlobRestoreStatus_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Parameters"] = gen.PtrOf(BlobRestoreParameters_STATUS_ARMGenerator()) +} + +func Test_CustomDomain_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CustomDomain_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCustomDomain_STATUS_ARM, CustomDomain_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCustomDomain_STATUS_ARM runs a test to see if a specific instance of CustomDomain_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForCustomDomain_STATUS_ARM(subject CustomDomain_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CustomDomain_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CustomDomain_STATUS_ARM instances for property testing - lazily instantiated by +// CustomDomain_STATUS_ARMGenerator() +var customDomain_STATUS_ARMGenerator gopter.Gen + +// CustomDomain_STATUS_ARMGenerator returns a generator of CustomDomain_STATUS_ARM instances for property testing. +func CustomDomain_STATUS_ARMGenerator() gopter.Gen { + if customDomain_STATUS_ARMGenerator != nil { + return customDomain_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCustomDomain_STATUS_ARM(generators) + customDomain_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(CustomDomain_STATUS_ARM{}), generators) + + return customDomain_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForCustomDomain_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCustomDomain_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["UseSubDomainName"] = gen.PtrOf(gen.Bool()) +} + +func Test_Encryption_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Encryption_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryption_STATUS_ARM, Encryption_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryption_STATUS_ARM runs a test to see if a specific instance of Encryption_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryption_STATUS_ARM(subject Encryption_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Encryption_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Encryption_STATUS_ARM instances for property testing - lazily instantiated by +// Encryption_STATUS_ARMGenerator() +var encryption_STATUS_ARMGenerator gopter.Gen + +// Encryption_STATUS_ARMGenerator returns a generator of Encryption_STATUS_ARM instances for property testing. +// We first initialize encryption_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Encryption_STATUS_ARMGenerator() gopter.Gen { + if encryption_STATUS_ARMGenerator != nil { + return encryption_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryption_STATUS_ARM(generators) + encryption_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Encryption_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryption_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForEncryption_STATUS_ARM(generators) + encryption_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Encryption_STATUS_ARM{}), generators) + + return encryption_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForEncryption_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryption_STATUS_ARM(gens map[string]gopter.Gen) { + gens["KeySource"] = gen.PtrOf(gen.OneConstOf(Encryption_KeySource_STATUS_MicrosoftKeyvault, Encryption_KeySource_STATUS_MicrosoftStorage)) + gens["RequireInfrastructureEncryption"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForEncryption_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryption_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Identity"] = gen.PtrOf(EncryptionIdentity_STATUS_ARMGenerator()) + gens["Keyvaultproperties"] = gen.PtrOf(KeyVaultProperties_STATUS_ARMGenerator()) + gens["Services"] = gen.PtrOf(EncryptionServices_STATUS_ARMGenerator()) +} + +func Test_Endpoints_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Endpoints_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEndpoints_STATUS_ARM, Endpoints_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEndpoints_STATUS_ARM runs a test to see if a specific instance of Endpoints_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEndpoints_STATUS_ARM(subject Endpoints_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Endpoints_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Endpoints_STATUS_ARM instances for property testing - lazily instantiated by +// Endpoints_STATUS_ARMGenerator() +var endpoints_STATUS_ARMGenerator gopter.Gen + +// Endpoints_STATUS_ARMGenerator returns a generator of Endpoints_STATUS_ARM instances for property testing. +// We first initialize endpoints_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Endpoints_STATUS_ARMGenerator() gopter.Gen { + if endpoints_STATUS_ARMGenerator != nil { + return endpoints_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEndpoints_STATUS_ARM(generators) + endpoints_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Endpoints_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEndpoints_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForEndpoints_STATUS_ARM(generators) + endpoints_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Endpoints_STATUS_ARM{}), generators) + + return endpoints_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForEndpoints_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEndpoints_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(gen.AlphaString()) + gens["Dfs"] = gen.PtrOf(gen.AlphaString()) + gens["File"] = gen.PtrOf(gen.AlphaString()) + gens["Queue"] = gen.PtrOf(gen.AlphaString()) + gens["Table"] = gen.PtrOf(gen.AlphaString()) + gens["Web"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForEndpoints_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEndpoints_STATUS_ARM(gens map[string]gopter.Gen) { + gens["InternetEndpoints"] = gen.PtrOf(StorageAccountInternetEndpoints_STATUS_ARMGenerator()) + gens["MicrosoftEndpoints"] = gen.PtrOf(StorageAccountMicrosoftEndpoints_STATUS_ARMGenerator()) +} + +func Test_GeoReplicationStats_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of GeoReplicationStats_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForGeoReplicationStats_STATUS_ARM, GeoReplicationStats_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForGeoReplicationStats_STATUS_ARM runs a test to see if a specific instance of GeoReplicationStats_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForGeoReplicationStats_STATUS_ARM(subject GeoReplicationStats_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual GeoReplicationStats_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of GeoReplicationStats_STATUS_ARM instances for property testing - lazily instantiated by +// GeoReplicationStats_STATUS_ARMGenerator() +var geoReplicationStats_STATUS_ARMGenerator gopter.Gen + +// GeoReplicationStats_STATUS_ARMGenerator returns a generator of GeoReplicationStats_STATUS_ARM instances for property testing. +func GeoReplicationStats_STATUS_ARMGenerator() gopter.Gen { + if geoReplicationStats_STATUS_ARMGenerator != nil { + return geoReplicationStats_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForGeoReplicationStats_STATUS_ARM(generators) + geoReplicationStats_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(GeoReplicationStats_STATUS_ARM{}), generators) + + return geoReplicationStats_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForGeoReplicationStats_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForGeoReplicationStats_STATUS_ARM(gens map[string]gopter.Gen) { + gens["CanFailover"] = gen.PtrOf(gen.Bool()) + gens["CanPlannedFailover"] = gen.PtrOf(gen.Bool()) + gens["LastSyncTime"] = gen.PtrOf(gen.AlphaString()) + gens["PostFailoverRedundancy"] = gen.PtrOf(gen.OneConstOf(GeoReplicationStats_PostFailoverRedundancy_STATUS_Standard_LRS, GeoReplicationStats_PostFailoverRedundancy_STATUS_Standard_ZRS)) + gens["PostPlannedFailoverRedundancy"] = gen.PtrOf(gen.OneConstOf( + GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_GRS, + GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_GZRS, + GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_RAGRS, + GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_RAGZRS)) + gens["Status"] = gen.PtrOf(gen.OneConstOf(GeoReplicationStats_Status_STATUS_Bootstrap, GeoReplicationStats_Status_STATUS_Live, GeoReplicationStats_Status_STATUS_Unavailable)) +} + +func Test_ImmutableStorageAccount_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutableStorageAccount_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutableStorageAccount_STATUS_ARM, ImmutableStorageAccount_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutableStorageAccount_STATUS_ARM runs a test to see if a specific instance of ImmutableStorageAccount_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutableStorageAccount_STATUS_ARM(subject ImmutableStorageAccount_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutableStorageAccount_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutableStorageAccount_STATUS_ARM instances for property testing - lazily instantiated by +// ImmutableStorageAccount_STATUS_ARMGenerator() +var immutableStorageAccount_STATUS_ARMGenerator gopter.Gen + +// ImmutableStorageAccount_STATUS_ARMGenerator returns a generator of ImmutableStorageAccount_STATUS_ARM instances for property testing. +// We first initialize immutableStorageAccount_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ImmutableStorageAccount_STATUS_ARMGenerator() gopter.Gen { + if immutableStorageAccount_STATUS_ARMGenerator != nil { + return immutableStorageAccount_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageAccount_STATUS_ARM(generators) + immutableStorageAccount_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageAccount_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageAccount_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForImmutableStorageAccount_STATUS_ARM(generators) + immutableStorageAccount_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageAccount_STATUS_ARM{}), generators) + + return immutableStorageAccount_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForImmutableStorageAccount_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutableStorageAccount_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForImmutableStorageAccount_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForImmutableStorageAccount_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ImmutabilityPolicy"] = gen.PtrOf(AccountImmutabilityPolicyProperties_STATUS_ARMGenerator()) +} + +func Test_KeyCreationTime_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyCreationTime_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyCreationTime_STATUS_ARM, KeyCreationTime_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyCreationTime_STATUS_ARM runs a test to see if a specific instance of KeyCreationTime_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyCreationTime_STATUS_ARM(subject KeyCreationTime_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyCreationTime_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyCreationTime_STATUS_ARM instances for property testing - lazily instantiated by +// KeyCreationTime_STATUS_ARMGenerator() +var keyCreationTime_STATUS_ARMGenerator gopter.Gen + +// KeyCreationTime_STATUS_ARMGenerator returns a generator of KeyCreationTime_STATUS_ARM instances for property testing. +func KeyCreationTime_STATUS_ARMGenerator() gopter.Gen { + if keyCreationTime_STATUS_ARMGenerator != nil { + return keyCreationTime_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyCreationTime_STATUS_ARM(generators) + keyCreationTime_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(KeyCreationTime_STATUS_ARM{}), generators) + + return keyCreationTime_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForKeyCreationTime_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyCreationTime_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Key1"] = gen.PtrOf(gen.AlphaString()) + gens["Key2"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_KeyPolicy_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyPolicy_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyPolicy_STATUS_ARM, KeyPolicy_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyPolicy_STATUS_ARM runs a test to see if a specific instance of KeyPolicy_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyPolicy_STATUS_ARM(subject KeyPolicy_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyPolicy_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyPolicy_STATUS_ARM instances for property testing - lazily instantiated by +// KeyPolicy_STATUS_ARMGenerator() +var keyPolicy_STATUS_ARMGenerator gopter.Gen + +// KeyPolicy_STATUS_ARMGenerator returns a generator of KeyPolicy_STATUS_ARM instances for property testing. +func KeyPolicy_STATUS_ARMGenerator() gopter.Gen { + if keyPolicy_STATUS_ARMGenerator != nil { + return keyPolicy_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyPolicy_STATUS_ARM(generators) + keyPolicy_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(KeyPolicy_STATUS_ARM{}), generators) + + return keyPolicy_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForKeyPolicy_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyPolicy_STATUS_ARM(gens map[string]gopter.Gen) { + gens["KeyExpirationPeriodInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_NetworkRuleSet_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of NetworkRuleSet_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForNetworkRuleSet_STATUS_ARM, NetworkRuleSet_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForNetworkRuleSet_STATUS_ARM runs a test to see if a specific instance of NetworkRuleSet_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForNetworkRuleSet_STATUS_ARM(subject NetworkRuleSet_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual NetworkRuleSet_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of NetworkRuleSet_STATUS_ARM instances for property testing - lazily instantiated by +// NetworkRuleSet_STATUS_ARMGenerator() +var networkRuleSet_STATUS_ARMGenerator gopter.Gen + +// NetworkRuleSet_STATUS_ARMGenerator returns a generator of NetworkRuleSet_STATUS_ARM instances for property testing. +// We first initialize networkRuleSet_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func NetworkRuleSet_STATUS_ARMGenerator() gopter.Gen { + if networkRuleSet_STATUS_ARMGenerator != nil { + return networkRuleSet_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(generators) + networkRuleSet_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(generators) + networkRuleSet_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS_ARM{}), generators) + + return networkRuleSet_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Bypass"] = gen.PtrOf(gen.OneConstOf( + NetworkRuleSet_Bypass_STATUS_AzureServices, + NetworkRuleSet_Bypass_STATUS_Logging, + NetworkRuleSet_Bypass_STATUS_Metrics, + NetworkRuleSet_Bypass_STATUS_None)) + gens["DefaultAction"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_DefaultAction_STATUS_Allow, NetworkRuleSet_DefaultAction_STATUS_Deny)) +} + +// AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(gens map[string]gopter.Gen) { + gens["IpRules"] = gen.SliceOf(IPRule_STATUS_ARMGenerator()) + gens["ResourceAccessRules"] = gen.SliceOf(ResourceAccessRule_STATUS_ARMGenerator()) + gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRule_STATUS_ARMGenerator()) +} + +func Test_PrivateEndpointConnection_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of PrivateEndpointConnection_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPrivateEndpointConnection_STATUS_ARM, PrivateEndpointConnection_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPrivateEndpointConnection_STATUS_ARM runs a test to see if a specific instance of PrivateEndpointConnection_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForPrivateEndpointConnection_STATUS_ARM(subject PrivateEndpointConnection_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual PrivateEndpointConnection_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of PrivateEndpointConnection_STATUS_ARM instances for property testing - lazily instantiated by +// PrivateEndpointConnection_STATUS_ARMGenerator() +var privateEndpointConnection_STATUS_ARMGenerator gopter.Gen + +// PrivateEndpointConnection_STATUS_ARMGenerator returns a generator of PrivateEndpointConnection_STATUS_ARM instances for property testing. +func PrivateEndpointConnection_STATUS_ARMGenerator() gopter.Gen { + if privateEndpointConnection_STATUS_ARMGenerator != nil { + return privateEndpointConnection_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpointConnection_STATUS_ARM(generators) + privateEndpointConnection_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnection_STATUS_ARM{}), generators) + + return privateEndpointConnection_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForPrivateEndpointConnection_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPrivateEndpointConnection_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_RoutingPreference_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RoutingPreference_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRoutingPreference_STATUS_ARM, RoutingPreference_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRoutingPreference_STATUS_ARM runs a test to see if a specific instance of RoutingPreference_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForRoutingPreference_STATUS_ARM(subject RoutingPreference_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RoutingPreference_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RoutingPreference_STATUS_ARM instances for property testing - lazily instantiated by +// RoutingPreference_STATUS_ARMGenerator() +var routingPreference_STATUS_ARMGenerator gopter.Gen + +// RoutingPreference_STATUS_ARMGenerator returns a generator of RoutingPreference_STATUS_ARM instances for property testing. +func RoutingPreference_STATUS_ARMGenerator() gopter.Gen { + if routingPreference_STATUS_ARMGenerator != nil { + return routingPreference_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRoutingPreference_STATUS_ARM(generators) + routingPreference_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(RoutingPreference_STATUS_ARM{}), generators) + + return routingPreference_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForRoutingPreference_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRoutingPreference_STATUS_ARM(gens map[string]gopter.Gen) { + gens["PublishInternetEndpoints"] = gen.PtrOf(gen.Bool()) + gens["PublishMicrosoftEndpoints"] = gen.PtrOf(gen.Bool()) + gens["RoutingChoice"] = gen.PtrOf(gen.OneConstOf(RoutingPreference_RoutingChoice_STATUS_InternetRouting, RoutingPreference_RoutingChoice_STATUS_MicrosoftRouting)) +} + +func Test_SasPolicy_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SasPolicy_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSasPolicy_STATUS_ARM, SasPolicy_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSasPolicy_STATUS_ARM runs a test to see if a specific instance of SasPolicy_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForSasPolicy_STATUS_ARM(subject SasPolicy_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SasPolicy_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SasPolicy_STATUS_ARM instances for property testing - lazily instantiated by +// SasPolicy_STATUS_ARMGenerator() +var sasPolicy_STATUS_ARMGenerator gopter.Gen + +// SasPolicy_STATUS_ARMGenerator returns a generator of SasPolicy_STATUS_ARM instances for property testing. +func SasPolicy_STATUS_ARMGenerator() gopter.Gen { + if sasPolicy_STATUS_ARMGenerator != nil { + return sasPolicy_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSasPolicy_STATUS_ARM(generators) + sasPolicy_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(SasPolicy_STATUS_ARM{}), generators) + + return sasPolicy_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForSasPolicy_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSasPolicy_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ExpirationAction"] = gen.PtrOf(gen.OneConstOf(SasPolicy_ExpirationAction_STATUS_Log)) + gens["SasExpirationPeriod"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_StorageAccountSkuConversionStatus_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountSkuConversionStatus_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountSkuConversionStatus_STATUS_ARM, StorageAccountSkuConversionStatus_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountSkuConversionStatus_STATUS_ARM runs a test to see if a specific instance of StorageAccountSkuConversionStatus_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountSkuConversionStatus_STATUS_ARM(subject StorageAccountSkuConversionStatus_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountSkuConversionStatus_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountSkuConversionStatus_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccountSkuConversionStatus_STATUS_ARMGenerator() +var storageAccountSkuConversionStatus_STATUS_ARMGenerator gopter.Gen + +// StorageAccountSkuConversionStatus_STATUS_ARMGenerator returns a generator of StorageAccountSkuConversionStatus_STATUS_ARM instances for property testing. +func StorageAccountSkuConversionStatus_STATUS_ARMGenerator() gopter.Gen { + if storageAccountSkuConversionStatus_STATUS_ARMGenerator != nil { + return storageAccountSkuConversionStatus_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountSkuConversionStatus_STATUS_ARM(generators) + storageAccountSkuConversionStatus_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccountSkuConversionStatus_STATUS_ARM{}), generators) + + return storageAccountSkuConversionStatus_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccountSkuConversionStatus_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccountSkuConversionStatus_STATUS_ARM(gens map[string]gopter.Gen) { + gens["EndTime"] = gen.PtrOf(gen.AlphaString()) + gens["SkuConversionStatus"] = gen.PtrOf(gen.OneConstOf(StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Failed, StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_InProgress, StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Succeeded)) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) + gens["TargetSkuName"] = gen.PtrOf(gen.OneConstOf( + SkuName_STATUS_Premium_LRS, + SkuName_STATUS_Premium_ZRS, + SkuName_STATUS_Standard_GRS, + SkuName_STATUS_Standard_GZRS, + SkuName_STATUS_Standard_LRS, + SkuName_STATUS_Standard_RAGRS, + SkuName_STATUS_Standard_RAGZRS, + SkuName_STATUS_Standard_ZRS)) +} + +func Test_UserAssignedIdentity_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of UserAssignedIdentity_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserAssignedIdentity_STATUS_ARM, UserAssignedIdentity_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserAssignedIdentity_STATUS_ARM runs a test to see if a specific instance of UserAssignedIdentity_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForUserAssignedIdentity_STATUS_ARM(subject UserAssignedIdentity_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserAssignedIdentity_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of UserAssignedIdentity_STATUS_ARM instances for property testing - lazily instantiated by +// UserAssignedIdentity_STATUS_ARMGenerator() +var userAssignedIdentity_STATUS_ARMGenerator gopter.Gen + +// UserAssignedIdentity_STATUS_ARMGenerator returns a generator of UserAssignedIdentity_STATUS_ARM instances for property testing. +func UserAssignedIdentity_STATUS_ARMGenerator() gopter.Gen { + if userAssignedIdentity_STATUS_ARMGenerator != nil { + return userAssignedIdentity_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForUserAssignedIdentity_STATUS_ARM(generators) + userAssignedIdentity_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(UserAssignedIdentity_STATUS_ARM{}), generators) + + return userAssignedIdentity_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForUserAssignedIdentity_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForUserAssignedIdentity_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ClientId"] = gen.PtrOf(gen.AlphaString()) + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_AccountImmutabilityPolicyProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccountImmutabilityPolicyProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccountImmutabilityPolicyProperties_STATUS_ARM, AccountImmutabilityPolicyProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccountImmutabilityPolicyProperties_STATUS_ARM runs a test to see if a specific instance of AccountImmutabilityPolicyProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForAccountImmutabilityPolicyProperties_STATUS_ARM(subject AccountImmutabilityPolicyProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccountImmutabilityPolicyProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccountImmutabilityPolicyProperties_STATUS_ARM instances for property testing - lazily instantiated by +// AccountImmutabilityPolicyProperties_STATUS_ARMGenerator() +var accountImmutabilityPolicyProperties_STATUS_ARMGenerator gopter.Gen + +// AccountImmutabilityPolicyProperties_STATUS_ARMGenerator returns a generator of AccountImmutabilityPolicyProperties_STATUS_ARM instances for property testing. +func AccountImmutabilityPolicyProperties_STATUS_ARMGenerator() gopter.Gen { + if accountImmutabilityPolicyProperties_STATUS_ARMGenerator != nil { + return accountImmutabilityPolicyProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_STATUS_ARM(generators) + accountImmutabilityPolicyProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(AccountImmutabilityPolicyProperties_STATUS_ARM{}), generators) + + return accountImmutabilityPolicyProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWrites"] = gen.PtrOf(gen.Bool()) + gens["ImmutabilityPeriodSinceCreationInDays"] = gen.PtrOf(gen.Int()) + gens["State"] = gen.PtrOf(gen.OneConstOf(AccountImmutabilityPolicyProperties_State_STATUS_Disabled, AccountImmutabilityPolicyProperties_State_STATUS_Locked, AccountImmutabilityPolicyProperties_State_STATUS_Unlocked)) +} + +func Test_ActiveDirectoryProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ActiveDirectoryProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForActiveDirectoryProperties_STATUS_ARM, ActiveDirectoryProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForActiveDirectoryProperties_STATUS_ARM runs a test to see if a specific instance of ActiveDirectoryProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForActiveDirectoryProperties_STATUS_ARM(subject ActiveDirectoryProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ActiveDirectoryProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ActiveDirectoryProperties_STATUS_ARM instances for property testing - lazily instantiated by +// ActiveDirectoryProperties_STATUS_ARMGenerator() +var activeDirectoryProperties_STATUS_ARMGenerator gopter.Gen + +// ActiveDirectoryProperties_STATUS_ARMGenerator returns a generator of ActiveDirectoryProperties_STATUS_ARM instances for property testing. +func ActiveDirectoryProperties_STATUS_ARMGenerator() gopter.Gen { + if activeDirectoryProperties_STATUS_ARMGenerator != nil { + return activeDirectoryProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForActiveDirectoryProperties_STATUS_ARM(generators) + activeDirectoryProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ActiveDirectoryProperties_STATUS_ARM{}), generators) + + return activeDirectoryProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForActiveDirectoryProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForActiveDirectoryProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AccountType"] = gen.PtrOf(gen.OneConstOf(ActiveDirectoryProperties_AccountType_STATUS_Computer, ActiveDirectoryProperties_AccountType_STATUS_User)) + gens["AzureStorageSid"] = gen.PtrOf(gen.AlphaString()) + gens["DomainGuid"] = gen.PtrOf(gen.AlphaString()) + gens["DomainName"] = gen.PtrOf(gen.AlphaString()) + gens["DomainSid"] = gen.PtrOf(gen.AlphaString()) + gens["ForestName"] = gen.PtrOf(gen.AlphaString()) + gens["NetBiosDomainName"] = gen.PtrOf(gen.AlphaString()) + gens["SamAccountName"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_BlobRestoreParameters_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of BlobRestoreParameters_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForBlobRestoreParameters_STATUS_ARM, BlobRestoreParameters_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForBlobRestoreParameters_STATUS_ARM runs a test to see if a specific instance of BlobRestoreParameters_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForBlobRestoreParameters_STATUS_ARM(subject BlobRestoreParameters_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual BlobRestoreParameters_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of BlobRestoreParameters_STATUS_ARM instances for property testing - lazily instantiated by +// BlobRestoreParameters_STATUS_ARMGenerator() +var blobRestoreParameters_STATUS_ARMGenerator gopter.Gen + +// BlobRestoreParameters_STATUS_ARMGenerator returns a generator of BlobRestoreParameters_STATUS_ARM instances for property testing. +// We first initialize blobRestoreParameters_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func BlobRestoreParameters_STATUS_ARMGenerator() gopter.Gen { + if blobRestoreParameters_STATUS_ARMGenerator != nil { + return blobRestoreParameters_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreParameters_STATUS_ARM(generators) + blobRestoreParameters_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(BlobRestoreParameters_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreParameters_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForBlobRestoreParameters_STATUS_ARM(generators) + blobRestoreParameters_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(BlobRestoreParameters_STATUS_ARM{}), generators) + + return blobRestoreParameters_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForBlobRestoreParameters_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForBlobRestoreParameters_STATUS_ARM(gens map[string]gopter.Gen) { + gens["TimeToRestore"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForBlobRestoreParameters_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForBlobRestoreParameters_STATUS_ARM(gens map[string]gopter.Gen) { + gens["BlobRanges"] = gen.SliceOf(BlobRestoreRange_STATUS_ARMGenerator()) +} + +func Test_EncryptionIdentity_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionIdentity_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionIdentity_STATUS_ARM, EncryptionIdentity_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionIdentity_STATUS_ARM runs a test to see if a specific instance of EncryptionIdentity_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionIdentity_STATUS_ARM(subject EncryptionIdentity_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionIdentity_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionIdentity_STATUS_ARM instances for property testing - lazily instantiated by +// EncryptionIdentity_STATUS_ARMGenerator() +var encryptionIdentity_STATUS_ARMGenerator gopter.Gen + +// EncryptionIdentity_STATUS_ARMGenerator returns a generator of EncryptionIdentity_STATUS_ARM instances for property testing. +func EncryptionIdentity_STATUS_ARMGenerator() gopter.Gen { + if encryptionIdentity_STATUS_ARMGenerator != nil { + return encryptionIdentity_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionIdentity_STATUS_ARM(generators) + encryptionIdentity_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionIdentity_STATUS_ARM{}), generators) + + return encryptionIdentity_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionIdentity_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionIdentity_STATUS_ARM(gens map[string]gopter.Gen) { + gens["FederatedIdentityClientId"] = gen.PtrOf(gen.AlphaString()) + gens["UserAssignedIdentity"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionServices_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionServices_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionServices_STATUS_ARM, EncryptionServices_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionServices_STATUS_ARM runs a test to see if a specific instance of EncryptionServices_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionServices_STATUS_ARM(subject EncryptionServices_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionServices_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionServices_STATUS_ARM instances for property testing - lazily instantiated by +// EncryptionServices_STATUS_ARMGenerator() +var encryptionServices_STATUS_ARMGenerator gopter.Gen + +// EncryptionServices_STATUS_ARMGenerator returns a generator of EncryptionServices_STATUS_ARM instances for property testing. +func EncryptionServices_STATUS_ARMGenerator() gopter.Gen { + if encryptionServices_STATUS_ARMGenerator != nil { + return encryptionServices_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForEncryptionServices_STATUS_ARM(generators) + encryptionServices_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionServices_STATUS_ARM{}), generators) + + return encryptionServices_STATUS_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForEncryptionServices_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionServices_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(EncryptionService_STATUS_ARMGenerator()) + gens["File"] = gen.PtrOf(EncryptionService_STATUS_ARMGenerator()) + gens["Queue"] = gen.PtrOf(EncryptionService_STATUS_ARMGenerator()) + gens["Table"] = gen.PtrOf(EncryptionService_STATUS_ARMGenerator()) +} + +func Test_IPRule_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of IPRule_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIPRule_STATUS_ARM, IPRule_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIPRule_STATUS_ARM runs a test to see if a specific instance of IPRule_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForIPRule_STATUS_ARM(subject IPRule_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual IPRule_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of IPRule_STATUS_ARM instances for property testing - lazily instantiated by IPRule_STATUS_ARMGenerator() +var ipRule_STATUS_ARMGenerator gopter.Gen + +// IPRule_STATUS_ARMGenerator returns a generator of IPRule_STATUS_ARM instances for property testing. +func IPRule_STATUS_ARMGenerator() gopter.Gen { + if ipRule_STATUS_ARMGenerator != nil { + return ipRule_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIPRule_STATUS_ARM(generators) + ipRule_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(IPRule_STATUS_ARM{}), generators) + + return ipRule_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForIPRule_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIPRule_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Action"] = gen.PtrOf(gen.OneConstOf(IPRule_Action_STATUS_Allow)) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_KeyVaultProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyVaultProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyVaultProperties_STATUS_ARM, KeyVaultProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyVaultProperties_STATUS_ARM runs a test to see if a specific instance of KeyVaultProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyVaultProperties_STATUS_ARM(subject KeyVaultProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyVaultProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyVaultProperties_STATUS_ARM instances for property testing - lazily instantiated by +// KeyVaultProperties_STATUS_ARMGenerator() +var keyVaultProperties_STATUS_ARMGenerator gopter.Gen + +// KeyVaultProperties_STATUS_ARMGenerator returns a generator of KeyVaultProperties_STATUS_ARM instances for property testing. +func KeyVaultProperties_STATUS_ARMGenerator() gopter.Gen { + if keyVaultProperties_STATUS_ARMGenerator != nil { + return keyVaultProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyVaultProperties_STATUS_ARM(generators) + keyVaultProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(KeyVaultProperties_STATUS_ARM{}), generators) + + return keyVaultProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForKeyVaultProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyVaultProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["CurrentVersionedKeyExpirationTimestamp"] = gen.PtrOf(gen.AlphaString()) + gens["CurrentVersionedKeyIdentifier"] = gen.PtrOf(gen.AlphaString()) + gens["Keyname"] = gen.PtrOf(gen.AlphaString()) + gens["Keyvaulturi"] = gen.PtrOf(gen.AlphaString()) + gens["Keyversion"] = gen.PtrOf(gen.AlphaString()) + gens["LastKeyRotationTimestamp"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ResourceAccessRule_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ResourceAccessRule_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForResourceAccessRule_STATUS_ARM, ResourceAccessRule_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForResourceAccessRule_STATUS_ARM runs a test to see if a specific instance of ResourceAccessRule_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForResourceAccessRule_STATUS_ARM(subject ResourceAccessRule_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ResourceAccessRule_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ResourceAccessRule_STATUS_ARM instances for property testing - lazily instantiated by +// ResourceAccessRule_STATUS_ARMGenerator() +var resourceAccessRule_STATUS_ARMGenerator gopter.Gen + +// ResourceAccessRule_STATUS_ARMGenerator returns a generator of ResourceAccessRule_STATUS_ARM instances for property testing. +func ResourceAccessRule_STATUS_ARMGenerator() gopter.Gen { + if resourceAccessRule_STATUS_ARMGenerator != nil { + return resourceAccessRule_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForResourceAccessRule_STATUS_ARM(generators) + resourceAccessRule_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ResourceAccessRule_STATUS_ARM{}), generators) + + return resourceAccessRule_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForResourceAccessRule_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForResourceAccessRule_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ResourceId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_StorageAccountInternetEndpoints_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountInternetEndpoints_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountInternetEndpoints_STATUS_ARM, StorageAccountInternetEndpoints_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountInternetEndpoints_STATUS_ARM runs a test to see if a specific instance of StorageAccountInternetEndpoints_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountInternetEndpoints_STATUS_ARM(subject StorageAccountInternetEndpoints_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountInternetEndpoints_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountInternetEndpoints_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccountInternetEndpoints_STATUS_ARMGenerator() +var storageAccountInternetEndpoints_STATUS_ARMGenerator gopter.Gen + +// StorageAccountInternetEndpoints_STATUS_ARMGenerator returns a generator of StorageAccountInternetEndpoints_STATUS_ARM instances for property testing. +func StorageAccountInternetEndpoints_STATUS_ARMGenerator() gopter.Gen { + if storageAccountInternetEndpoints_STATUS_ARMGenerator != nil { + return storageAccountInternetEndpoints_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountInternetEndpoints_STATUS_ARM(generators) + storageAccountInternetEndpoints_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccountInternetEndpoints_STATUS_ARM{}), generators) + + return storageAccountInternetEndpoints_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccountInternetEndpoints_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccountInternetEndpoints_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(gen.AlphaString()) + gens["Dfs"] = gen.PtrOf(gen.AlphaString()) + gens["File"] = gen.PtrOf(gen.AlphaString()) + gens["Web"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_StorageAccountMicrosoftEndpoints_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountMicrosoftEndpoints_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountMicrosoftEndpoints_STATUS_ARM, StorageAccountMicrosoftEndpoints_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountMicrosoftEndpoints_STATUS_ARM runs a test to see if a specific instance of StorageAccountMicrosoftEndpoints_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountMicrosoftEndpoints_STATUS_ARM(subject StorageAccountMicrosoftEndpoints_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountMicrosoftEndpoints_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountMicrosoftEndpoints_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccountMicrosoftEndpoints_STATUS_ARMGenerator() +var storageAccountMicrosoftEndpoints_STATUS_ARMGenerator gopter.Gen + +// StorageAccountMicrosoftEndpoints_STATUS_ARMGenerator returns a generator of StorageAccountMicrosoftEndpoints_STATUS_ARM instances for property testing. +func StorageAccountMicrosoftEndpoints_STATUS_ARMGenerator() gopter.Gen { + if storageAccountMicrosoftEndpoints_STATUS_ARMGenerator != nil { + return storageAccountMicrosoftEndpoints_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountMicrosoftEndpoints_STATUS_ARM(generators) + storageAccountMicrosoftEndpoints_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccountMicrosoftEndpoints_STATUS_ARM{}), generators) + + return storageAccountMicrosoftEndpoints_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccountMicrosoftEndpoints_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccountMicrosoftEndpoints_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(gen.AlphaString()) + gens["Dfs"] = gen.PtrOf(gen.AlphaString()) + gens["File"] = gen.PtrOf(gen.AlphaString()) + gens["Queue"] = gen.PtrOf(gen.AlphaString()) + gens["Table"] = gen.PtrOf(gen.AlphaString()) + gens["Web"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_VirtualNetworkRule_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VirtualNetworkRule_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule_STATUS_ARM, VirtualNetworkRule_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVirtualNetworkRule_STATUS_ARM runs a test to see if a specific instance of VirtualNetworkRule_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForVirtualNetworkRule_STATUS_ARM(subject VirtualNetworkRule_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VirtualNetworkRule_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VirtualNetworkRule_STATUS_ARM instances for property testing - lazily instantiated by +// VirtualNetworkRule_STATUS_ARMGenerator() +var virtualNetworkRule_STATUS_ARMGenerator gopter.Gen + +// VirtualNetworkRule_STATUS_ARMGenerator returns a generator of VirtualNetworkRule_STATUS_ARM instances for property testing. +func VirtualNetworkRule_STATUS_ARMGenerator() gopter.Gen { + if virtualNetworkRule_STATUS_ARMGenerator != nil { + return virtualNetworkRule_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS_ARM(generators) + virtualNetworkRule_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule_STATUS_ARM{}), generators) + + return virtualNetworkRule_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Action"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkRule_Action_STATUS_Allow)) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["State"] = gen.PtrOf(gen.OneConstOf( + VirtualNetworkRule_State_STATUS_Deprovisioning, + VirtualNetworkRule_State_STATUS_Failed, + VirtualNetworkRule_State_STATUS_NetworkSourceDeleted, + VirtualNetworkRule_State_STATUS_Provisioning, + VirtualNetworkRule_State_STATUS_Succeeded)) +} + +func Test_BlobRestoreRange_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of BlobRestoreRange_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForBlobRestoreRange_STATUS_ARM, BlobRestoreRange_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForBlobRestoreRange_STATUS_ARM runs a test to see if a specific instance of BlobRestoreRange_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForBlobRestoreRange_STATUS_ARM(subject BlobRestoreRange_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual BlobRestoreRange_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of BlobRestoreRange_STATUS_ARM instances for property testing - lazily instantiated by +// BlobRestoreRange_STATUS_ARMGenerator() +var blobRestoreRange_STATUS_ARMGenerator gopter.Gen + +// BlobRestoreRange_STATUS_ARMGenerator returns a generator of BlobRestoreRange_STATUS_ARM instances for property testing. +func BlobRestoreRange_STATUS_ARMGenerator() gopter.Gen { + if blobRestoreRange_STATUS_ARMGenerator != nil { + return blobRestoreRange_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreRange_STATUS_ARM(generators) + blobRestoreRange_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(BlobRestoreRange_STATUS_ARM{}), generators) + + return blobRestoreRange_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForBlobRestoreRange_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForBlobRestoreRange_STATUS_ARM(gens map[string]gopter.Gen) { + gens["EndRange"] = gen.PtrOf(gen.AlphaString()) + gens["StartRange"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionService_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionService_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionService_STATUS_ARM, EncryptionService_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionService_STATUS_ARM runs a test to see if a specific instance of EncryptionService_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionService_STATUS_ARM(subject EncryptionService_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionService_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionService_STATUS_ARM instances for property testing - lazily instantiated by +// EncryptionService_STATUS_ARMGenerator() +var encryptionService_STATUS_ARMGenerator gopter.Gen + +// EncryptionService_STATUS_ARMGenerator returns a generator of EncryptionService_STATUS_ARM instances for property testing. +func EncryptionService_STATUS_ARMGenerator() gopter.Gen { + if encryptionService_STATUS_ARMGenerator != nil { + return encryptionService_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionService_STATUS_ARM(generators) + encryptionService_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionService_STATUS_ARM{}), generators) + + return encryptionService_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionService_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionService_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["KeyType"] = gen.PtrOf(gen.OneConstOf(EncryptionService_KeyType_STATUS_Account, EncryptionService_KeyType_STATUS_Service)) + gens["LastEnabledTime"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage_account_types_gen.go b/v2/api/storage/v1api20230101/storage_account_types_gen.go new file mode 100644 index 00000000000..2e7c9f1ce28 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_account_types_gen.go @@ -0,0 +1,11768 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "context" + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" + "github.com/go-logr/logr" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName} +type StorageAccount struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccount_Spec `json:"spec,omitempty"` + Status StorageAccount_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccount{} + +// GetConditions returns the conditions of the resource +func (account *StorageAccount) GetConditions() conditions.Conditions { + return account.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (account *StorageAccount) SetConditions(conditions conditions.Conditions) { + account.Status.Conditions = conditions +} + +var _ conversion.Convertible = &StorageAccount{} + +// ConvertFrom populates our StorageAccount from the provided hub StorageAccount +func (account *StorageAccount) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccount) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccount but received %T instead", hub) + } + + return account.AssignProperties_From_StorageAccount(source) +} + +// ConvertTo populates the provided hub StorageAccount from our StorageAccount +func (account *StorageAccount) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccount) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccount but received %T instead", hub) + } + + return account.AssignProperties_To_StorageAccount(destination) +} + +// +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20230101-storageaccount,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccounts,verbs=create;update,versions=v1api20230101,name=default.v1api20230101.storageaccounts.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &StorageAccount{} + +// Default applies defaults to the StorageAccount resource +func (account *StorageAccount) Default() { + account.defaultImpl() + var temp any = account + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (account *StorageAccount) defaultAzureName() { + if account.Spec.AzureName == "" { + account.Spec.AzureName = account.Name + } +} + +// defaultImpl applies the code generated defaults to the StorageAccount resource +func (account *StorageAccount) defaultImpl() { account.defaultAzureName() } + +var _ genruntime.ImportableResource = &StorageAccount{} + +// InitializeSpec initializes the spec for this resource from the given status +func (account *StorageAccount) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*StorageAccount_STATUS); ok { + return account.Spec.Initialize_From_StorageAccount_STATUS(s) + } + + return fmt.Errorf("expected Status of type StorageAccount_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesExporter = &StorageAccount{} + +// ExportKubernetesResources defines a resource which can create other resources in Kubernetes. +func (account *StorageAccount) ExportKubernetesResources(_ context.Context, _ genruntime.MetaObject, _ *genericarmclient.GenericClient, _ logr.Logger) ([]client.Object, error) { + collector := configmaps.NewCollector(account.Namespace) + if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil { + if account.Status.PrimaryEndpoints != nil { + if account.Status.PrimaryEndpoints.Blob != nil { + collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.BlobEndpoint, *account.Status.PrimaryEndpoints.Blob) + } + } + } + if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil { + if account.Status.PrimaryEndpoints != nil { + if account.Status.PrimaryEndpoints.Dfs != nil { + collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.DfsEndpoint, *account.Status.PrimaryEndpoints.Dfs) + } + } + } + if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil { + if account.Status.PrimaryEndpoints != nil { + if account.Status.PrimaryEndpoints.File != nil { + collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.FileEndpoint, *account.Status.PrimaryEndpoints.File) + } + } + } + if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil { + if account.Status.PrimaryEndpoints != nil { + if account.Status.PrimaryEndpoints.Queue != nil { + collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.QueueEndpoint, *account.Status.PrimaryEndpoints.Queue) + } + } + } + if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil { + if account.Status.PrimaryEndpoints != nil { + if account.Status.PrimaryEndpoints.Table != nil { + collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.TableEndpoint, *account.Status.PrimaryEndpoints.Table) + } + } + } + if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil { + if account.Status.PrimaryEndpoints != nil { + if account.Status.PrimaryEndpoints.Web != nil { + collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.WebEndpoint, *account.Status.PrimaryEndpoints.Web) + } + } + } + result, err := collector.Values() + if err != nil { + return nil, err + } + return configmaps.SliceToClientObjectSlice(result), nil +} + +var _ genruntime.KubernetesResource = &StorageAccount{} + +// AzureName returns the Azure name of the resource +func (account *StorageAccount) AzureName() string { + return account.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (account StorageAccount) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (account *StorageAccount) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (account *StorageAccount) GetSpec() genruntime.ConvertibleSpec { + return &account.Spec +} + +// GetStatus returns the status of this resource +func (account *StorageAccount) GetStatus() genruntime.ConvertibleStatus { + return &account.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (account *StorageAccount) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts" +func (account *StorageAccount) GetType() string { + return "Microsoft.Storage/storageAccounts" +} + +// NewEmptyStatus returns a new empty (blank) status +func (account *StorageAccount) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccount_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (account *StorageAccount) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(account.Spec) + return account.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (account *StorageAccount) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccount_STATUS); ok { + account.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccount_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + account.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-storage-azure-com-v1api20230101-storageaccount,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccounts,verbs=create;update,versions=v1api20230101,name=validate.v1api20230101.storageaccounts.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &StorageAccount{} + +// ValidateCreate validates the creation of the resource +func (account *StorageAccount) ValidateCreate() (admission.Warnings, error) { + validations := account.createValidations() + var temp any = account + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (account *StorageAccount) ValidateDelete() (admission.Warnings, error) { + validations := account.deleteValidations() + var temp any = account + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (account *StorageAccount) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := account.updateValidations() + var temp any = account + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (account *StorageAccount) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){account.validateResourceReferences, account.validateOwnerReference, account.validateSecretDestinations, account.validateConfigMapDestinations} +} + +// deleteValidations validates the deletion of the resource +func (account *StorageAccount) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (account *StorageAccount) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return account.validateResourceReferences() + }, + account.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return account.validateOwnerReference() + }, + func(old runtime.Object) (admission.Warnings, error) { + return account.validateSecretDestinations() + }, + func(old runtime.Object) (admission.Warnings, error) { + return account.validateConfigMapDestinations() + }, + } +} + +// validateConfigMapDestinations validates there are no colliding genruntime.ConfigMapDestinations +func (account *StorageAccount) validateConfigMapDestinations() (admission.Warnings, error) { + if account.Spec.OperatorSpec == nil { + return nil, nil + } + if account.Spec.OperatorSpec.ConfigMaps == nil { + return nil, nil + } + toValidate := []*genruntime.ConfigMapDestination{ + account.Spec.OperatorSpec.ConfigMaps.BlobEndpoint, + account.Spec.OperatorSpec.ConfigMaps.DfsEndpoint, + account.Spec.OperatorSpec.ConfigMaps.FileEndpoint, + account.Spec.OperatorSpec.ConfigMaps.QueueEndpoint, + account.Spec.OperatorSpec.ConfigMaps.TableEndpoint, + account.Spec.OperatorSpec.ConfigMaps.WebEndpoint, + } + return genruntime.ValidateConfigMapDestinations(toValidate) +} + +// validateOwnerReference validates the owner field +func (account *StorageAccount) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(account) +} + +// validateResourceReferences validates all resource references +func (account *StorageAccount) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&account.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateSecretDestinations validates there are no colliding genruntime.SecretDestination's +func (account *StorageAccount) validateSecretDestinations() (admission.Warnings, error) { + if account.Spec.OperatorSpec == nil { + return nil, nil + } + if account.Spec.OperatorSpec.Secrets == nil { + return nil, nil + } + toValidate := []*genruntime.SecretDestination{ + account.Spec.OperatorSpec.Secrets.BlobEndpoint, + account.Spec.OperatorSpec.Secrets.DfsEndpoint, + account.Spec.OperatorSpec.Secrets.FileEndpoint, + account.Spec.OperatorSpec.Secrets.Key1, + account.Spec.OperatorSpec.Secrets.Key2, + account.Spec.OperatorSpec.Secrets.QueueEndpoint, + account.Spec.OperatorSpec.Secrets.TableEndpoint, + account.Spec.OperatorSpec.Secrets.WebEndpoint, + } + return genruntime.ValidateSecretDestinations(toValidate) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (account *StorageAccount) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*StorageAccount) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, account) +} + +// AssignProperties_From_StorageAccount populates our StorageAccount from the provided source StorageAccount +func (account *StorageAccount) AssignProperties_From_StorageAccount(source *v20230101s.StorageAccount) error { + + // ObjectMeta + account.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccount_Spec + err := spec.AssignProperties_From_StorageAccount_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccount_Spec() to populate field Spec") + } + account.Spec = spec + + // Status + var status StorageAccount_STATUS + err = status.AssignProperties_From_StorageAccount_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccount_STATUS() to populate field Status") + } + account.Status = status + + // No error + return nil +} + +// AssignProperties_To_StorageAccount populates the provided destination StorageAccount from our StorageAccount +func (account *StorageAccount) AssignProperties_To_StorageAccount(destination *v20230101s.StorageAccount) error { + + // ObjectMeta + destination.ObjectMeta = *account.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccount_Spec + err := account.Spec.AssignProperties_To_StorageAccount_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccount_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccount_STATUS + err = account.Status.AssignProperties_To_StorageAccount_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccount_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (account *StorageAccount) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: account.Spec.OriginalVersion(), + Kind: "StorageAccount", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName} +type StorageAccountList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccount `json:"items"` +} + +// +kubebuilder:validation:Enum={"2023-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2023-01-01") + +type StorageAccount_Spec struct { + // AccessTier: Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' + // access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium + // block blobs storage account type. + AccessTier *StorageAccountPropertiesCreateParameters_AccessTier `json:"accessTier,omitempty"` + + // AllowBlobPublicAccess: Allow or disallow public access to all blobs or containers in the storage account. The default + // interpretation is false for this property. + AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` + + // AllowCrossTenantReplication: Allow or disallow cross AAD tenant object replication. Set this property to true for new or + // existing accounts only if object replication policies will involve storage accounts in different AAD tenants. The + // default interpretation is false for new accounts to follow best security practices by default. + AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + + // AllowSharedKeyAccess: Indicates whether the storage account permits requests to be authorized with the account access + // key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure + // Active Directory (Azure AD). The default value is null, which is equivalent to true. + AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` + + // AllowedCopyScope: Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. + AllowedCopyScope *StorageAccountPropertiesCreateParameters_AllowedCopyScope `json:"allowedCopyScope,omitempty"` + + // AzureFilesIdentityBasedAuthentication: Provides the identity based authentication settings for Azure Files. + AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` + + // +kubebuilder:validation:MaxLength=24 + // +kubebuilder:validation:MinLength=3 + // +kubebuilder:validation:Pattern="^[a-z0-9]+$" + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // CustomDomain: User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported + // per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name + // property. + CustomDomain *CustomDomain `json:"customDomain,omitempty"` + + // DefaultToOAuthAuthentication: A boolean flag which indicates whether the default authentication is OAuth or not. The + // default interpretation is false for this property. + DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + + // DnsEndpointType: Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of + // accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an + // alphanumeric DNS Zone identifier. + DnsEndpointType *StorageAccountPropertiesCreateParameters_DnsEndpointType `json:"dnsEndpointType,omitempty"` + + // Encryption: Encryption settings to be used for server-side encryption for the storage account. + Encryption *Encryption `json:"encryption,omitempty"` + + // ExtendedLocation: Optional. Set the extended location of the resource. If not set, the storage account will be created + // in Azure main region. Otherwise it will be created in the specified extended location + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + + // Identity: The identity of the resource. + Identity *Identity `json:"identity,omitempty"` + + // ImmutableStorageWithVersioning: The property is immutable and can only be set to true at the account creation time. When + // set to true, it enables object level immutability for all the new containers in the account by default. + ImmutableStorageWithVersioning *ImmutableStorageAccount `json:"immutableStorageWithVersioning,omitempty"` + + // IsHnsEnabled: Account HierarchicalNamespace enabled if sets to true. + IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` + + // IsLocalUserEnabled: Enables local users feature, if set to true + IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` + + // IsNfsV3Enabled: NFS 3.0 protocol support enabled if set to true. + IsNfsV3Enabled *bool `json:"isNfsV3Enabled,omitempty"` + + // IsSftpEnabled: Enables Secure File Transfer Protocol, if set to true + IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + + // KeyPolicy: KeyPolicy assigned to the storage account. + KeyPolicy *KeyPolicy `json:"keyPolicy,omitempty"` + + // +kubebuilder:validation:Required + // Kind: Required. Indicates the type of storage account. + Kind *StorageAccount_Kind_Spec `json:"kind,omitempty"` + + // LargeFileSharesState: Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. + LargeFileSharesState *StorageAccountPropertiesCreateParameters_LargeFileSharesState `json:"largeFileSharesState,omitempty"` + + // +kubebuilder:validation:Required + // Location: Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure + // Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is + // created, but if an identical geo region is specified on update, the request will succeed. + Location *string `json:"location,omitempty"` + + // MinimumTlsVersion: Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS + // 1.0 for this property. + MinimumTlsVersion *StorageAccountPropertiesCreateParameters_MinimumTlsVersion `json:"minimumTlsVersion,omitempty"` + + // NetworkAcls: Network rule set + NetworkAcls *NetworkRuleSet `json:"networkAcls,omitempty"` + + // OperatorSpec: The specification for configuring operator behavior. This field is interpreted by the operator and not + // passed directly to Azure + OperatorSpec *StorageAccountOperatorSpec `json:"operatorSpec,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // PublicNetworkAccess: Allow or disallow public network access to Storage Account. Value is optional but if passed in, + // must be 'Enabled' or 'Disabled'. + PublicNetworkAccess *StorageAccountPropertiesCreateParameters_PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + + // RoutingPreference: Maintains information about the network routing choice opted by the user for data transfer + RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` + + // SasPolicy: SasPolicy assigned to the storage account. + SasPolicy *SasPolicy `json:"sasPolicy,omitempty"` + + // +kubebuilder:validation:Required + // Sku: Required. Gets or sets the SKU name. + Sku *Sku `json:"sku,omitempty"` + + // SupportsHttpsTrafficOnly: Allows https traffic only to storage service if sets to true. The default value is true since + // API version 2019-04-01. + SupportsHttpsTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + + // Tags: Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping + // this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key + // with a length no greater than 128 characters and a value with a length no greater than 256 characters. + Tags map[string]string `json:"tags,omitempty"` +} + +var _ genruntime.ARMTransformer = &StorageAccount_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (account *StorageAccount_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if account == nil { + return nil, nil + } + result := &StorageAccount_Spec_ARM{} + + // Set property "ExtendedLocation": + if account.ExtendedLocation != nil { + extendedLocation_ARM, err := (*account.ExtendedLocation).ConvertToARM(resolved) + if err != nil { + return nil, err + } + extendedLocation := *extendedLocation_ARM.(*ExtendedLocation_ARM) + result.ExtendedLocation = &extendedLocation + } + + // Set property "Identity": + if account.Identity != nil { + identity_ARM, err := (*account.Identity).ConvertToARM(resolved) + if err != nil { + return nil, err + } + identity := *identity_ARM.(*Identity_ARM) + result.Identity = &identity + } + + // Set property "Kind": + if account.Kind != nil { + kind := *account.Kind + result.Kind = &kind + } + + // Set property "Location": + if account.Location != nil { + location := *account.Location + result.Location = &location + } + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if account.AccessTier != nil || + account.AllowBlobPublicAccess != nil || + account.AllowCrossTenantReplication != nil || + account.AllowSharedKeyAccess != nil || + account.AllowedCopyScope != nil || + account.AzureFilesIdentityBasedAuthentication != nil || + account.CustomDomain != nil || + account.DefaultToOAuthAuthentication != nil || + account.DnsEndpointType != nil || + account.Encryption != nil || + account.ImmutableStorageWithVersioning != nil || + account.IsHnsEnabled != nil || + account.IsLocalUserEnabled != nil || + account.IsNfsV3Enabled != nil || + account.IsSftpEnabled != nil || + account.KeyPolicy != nil || + account.LargeFileSharesState != nil || + account.MinimumTlsVersion != nil || + account.NetworkAcls != nil || + account.PublicNetworkAccess != nil || + account.RoutingPreference != nil || + account.SasPolicy != nil || + account.SupportsHttpsTrafficOnly != nil { + result.Properties = &StorageAccountPropertiesCreateParameters_ARM{} + } + if account.AccessTier != nil { + accessTier := *account.AccessTier + result.Properties.AccessTier = &accessTier + } + if account.AllowBlobPublicAccess != nil { + allowBlobPublicAccess := *account.AllowBlobPublicAccess + result.Properties.AllowBlobPublicAccess = &allowBlobPublicAccess + } + if account.AllowCrossTenantReplication != nil { + allowCrossTenantReplication := *account.AllowCrossTenantReplication + result.Properties.AllowCrossTenantReplication = &allowCrossTenantReplication + } + if account.AllowSharedKeyAccess != nil { + allowSharedKeyAccess := *account.AllowSharedKeyAccess + result.Properties.AllowSharedKeyAccess = &allowSharedKeyAccess + } + if account.AllowedCopyScope != nil { + allowedCopyScope := *account.AllowedCopyScope + result.Properties.AllowedCopyScope = &allowedCopyScope + } + if account.AzureFilesIdentityBasedAuthentication != nil { + azureFilesIdentityBasedAuthentication_ARM, err := (*account.AzureFilesIdentityBasedAuthentication).ConvertToARM(resolved) + if err != nil { + return nil, err + } + azureFilesIdentityBasedAuthentication := *azureFilesIdentityBasedAuthentication_ARM.(*AzureFilesIdentityBasedAuthentication_ARM) + result.Properties.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication + } + if account.CustomDomain != nil { + customDomain_ARM, err := (*account.CustomDomain).ConvertToARM(resolved) + if err != nil { + return nil, err + } + customDomain := *customDomain_ARM.(*CustomDomain_ARM) + result.Properties.CustomDomain = &customDomain + } + if account.DefaultToOAuthAuthentication != nil { + defaultToOAuthAuthentication := *account.DefaultToOAuthAuthentication + result.Properties.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication + } + if account.DnsEndpointType != nil { + dnsEndpointType := *account.DnsEndpointType + result.Properties.DnsEndpointType = &dnsEndpointType + } + if account.Encryption != nil { + encryption_ARM, err := (*account.Encryption).ConvertToARM(resolved) + if err != nil { + return nil, err + } + encryption := *encryption_ARM.(*Encryption_ARM) + result.Properties.Encryption = &encryption + } + if account.ImmutableStorageWithVersioning != nil { + immutableStorageWithVersioning_ARM, err := (*account.ImmutableStorageWithVersioning).ConvertToARM(resolved) + if err != nil { + return nil, err + } + immutableStorageWithVersioning := *immutableStorageWithVersioning_ARM.(*ImmutableStorageAccount_ARM) + result.Properties.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } + if account.IsHnsEnabled != nil { + isHnsEnabled := *account.IsHnsEnabled + result.Properties.IsHnsEnabled = &isHnsEnabled + } + if account.IsLocalUserEnabled != nil { + isLocalUserEnabled := *account.IsLocalUserEnabled + result.Properties.IsLocalUserEnabled = &isLocalUserEnabled + } + if account.IsNfsV3Enabled != nil { + isNfsV3Enabled := *account.IsNfsV3Enabled + result.Properties.IsNfsV3Enabled = &isNfsV3Enabled + } + if account.IsSftpEnabled != nil { + isSftpEnabled := *account.IsSftpEnabled + result.Properties.IsSftpEnabled = &isSftpEnabled + } + if account.KeyPolicy != nil { + keyPolicy_ARM, err := (*account.KeyPolicy).ConvertToARM(resolved) + if err != nil { + return nil, err + } + keyPolicy := *keyPolicy_ARM.(*KeyPolicy_ARM) + result.Properties.KeyPolicy = &keyPolicy + } + if account.LargeFileSharesState != nil { + largeFileSharesState := *account.LargeFileSharesState + result.Properties.LargeFileSharesState = &largeFileSharesState + } + if account.MinimumTlsVersion != nil { + minimumTlsVersion := *account.MinimumTlsVersion + result.Properties.MinimumTlsVersion = &minimumTlsVersion + } + if account.NetworkAcls != nil { + networkAcls_ARM, err := (*account.NetworkAcls).ConvertToARM(resolved) + if err != nil { + return nil, err + } + networkAcls := *networkAcls_ARM.(*NetworkRuleSet_ARM) + result.Properties.NetworkAcls = &networkAcls + } + if account.PublicNetworkAccess != nil { + publicNetworkAccess := *account.PublicNetworkAccess + result.Properties.PublicNetworkAccess = &publicNetworkAccess + } + if account.RoutingPreference != nil { + routingPreference_ARM, err := (*account.RoutingPreference).ConvertToARM(resolved) + if err != nil { + return nil, err + } + routingPreference := *routingPreference_ARM.(*RoutingPreference_ARM) + result.Properties.RoutingPreference = &routingPreference + } + if account.SasPolicy != nil { + sasPolicy_ARM, err := (*account.SasPolicy).ConvertToARM(resolved) + if err != nil { + return nil, err + } + sasPolicy := *sasPolicy_ARM.(*SasPolicy_ARM) + result.Properties.SasPolicy = &sasPolicy + } + if account.SupportsHttpsTrafficOnly != nil { + supportsHttpsTrafficOnly := *account.SupportsHttpsTrafficOnly + result.Properties.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly + } + + // Set property "Sku": + if account.Sku != nil { + sku_ARM, err := (*account.Sku).ConvertToARM(resolved) + if err != nil { + return nil, err + } + sku := *sku_ARM.(*Sku_ARM) + result.Sku = &sku + } + + // Set property "Tags": + if account.Tags != nil { + result.Tags = make(map[string]string, len(account.Tags)) + for key, value := range account.Tags { + result.Tags[key] = value + } + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (account *StorageAccount_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccount_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (account *StorageAccount_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccount_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccount_Spec_ARM, got %T", armInput) + } + + // Set property "AccessTier": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AccessTier != nil { + accessTier := *typedInput.Properties.AccessTier + account.AccessTier = &accessTier + } + } + + // Set property "AllowBlobPublicAccess": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AllowBlobPublicAccess != nil { + allowBlobPublicAccess := *typedInput.Properties.AllowBlobPublicAccess + account.AllowBlobPublicAccess = &allowBlobPublicAccess + } + } + + // Set property "AllowCrossTenantReplication": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AllowCrossTenantReplication != nil { + allowCrossTenantReplication := *typedInput.Properties.AllowCrossTenantReplication + account.AllowCrossTenantReplication = &allowCrossTenantReplication + } + } + + // Set property "AllowSharedKeyAccess": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AllowSharedKeyAccess != nil { + allowSharedKeyAccess := *typedInput.Properties.AllowSharedKeyAccess + account.AllowSharedKeyAccess = &allowSharedKeyAccess + } + } + + // Set property "AllowedCopyScope": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AllowedCopyScope != nil { + allowedCopyScope := *typedInput.Properties.AllowedCopyScope + account.AllowedCopyScope = &allowedCopyScope + } + } + + // Set property "AzureFilesIdentityBasedAuthentication": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AzureFilesIdentityBasedAuthentication != nil { + var azureFilesIdentityBasedAuthentication1 AzureFilesIdentityBasedAuthentication + err := azureFilesIdentityBasedAuthentication1.PopulateFromARM(owner, *typedInput.Properties.AzureFilesIdentityBasedAuthentication) + if err != nil { + return err + } + azureFilesIdentityBasedAuthentication := azureFilesIdentityBasedAuthentication1 + account.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication + } + } + + // Set property "AzureName": + account.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "CustomDomain": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.CustomDomain != nil { + var customDomain1 CustomDomain + err := customDomain1.PopulateFromARM(owner, *typedInput.Properties.CustomDomain) + if err != nil { + return err + } + customDomain := customDomain1 + account.CustomDomain = &customDomain + } + } + + // Set property "DefaultToOAuthAuthentication": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DefaultToOAuthAuthentication != nil { + defaultToOAuthAuthentication := *typedInput.Properties.DefaultToOAuthAuthentication + account.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication + } + } + + // Set property "DnsEndpointType": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DnsEndpointType != nil { + dnsEndpointType := *typedInput.Properties.DnsEndpointType + account.DnsEndpointType = &dnsEndpointType + } + } + + // Set property "Encryption": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Encryption != nil { + var encryption1 Encryption + err := encryption1.PopulateFromARM(owner, *typedInput.Properties.Encryption) + if err != nil { + return err + } + encryption := encryption1 + account.Encryption = &encryption + } + } + + // Set property "ExtendedLocation": + if typedInput.ExtendedLocation != nil { + var extendedLocation1 ExtendedLocation + err := extendedLocation1.PopulateFromARM(owner, *typedInput.ExtendedLocation) + if err != nil { + return err + } + extendedLocation := extendedLocation1 + account.ExtendedLocation = &extendedLocation + } + + // Set property "Identity": + if typedInput.Identity != nil { + var identity1 Identity + err := identity1.PopulateFromARM(owner, *typedInput.Identity) + if err != nil { + return err + } + identity := identity1 + account.Identity = &identity + } + + // Set property "ImmutableStorageWithVersioning": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning1 ImmutableStorageAccount + err := immutableStorageWithVersioning1.PopulateFromARM(owner, *typedInput.Properties.ImmutableStorageWithVersioning) + if err != nil { + return err + } + immutableStorageWithVersioning := immutableStorageWithVersioning1 + account.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } + } + + // Set property "IsHnsEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsHnsEnabled != nil { + isHnsEnabled := *typedInput.Properties.IsHnsEnabled + account.IsHnsEnabled = &isHnsEnabled + } + } + + // Set property "IsLocalUserEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsLocalUserEnabled != nil { + isLocalUserEnabled := *typedInput.Properties.IsLocalUserEnabled + account.IsLocalUserEnabled = &isLocalUserEnabled + } + } + + // Set property "IsNfsV3Enabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsNfsV3Enabled != nil { + isNfsV3Enabled := *typedInput.Properties.IsNfsV3Enabled + account.IsNfsV3Enabled = &isNfsV3Enabled + } + } + + // Set property "IsSftpEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsSftpEnabled != nil { + isSftpEnabled := *typedInput.Properties.IsSftpEnabled + account.IsSftpEnabled = &isSftpEnabled + } + } + + // Set property "KeyPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.KeyPolicy != nil { + var keyPolicy1 KeyPolicy + err := keyPolicy1.PopulateFromARM(owner, *typedInput.Properties.KeyPolicy) + if err != nil { + return err + } + keyPolicy := keyPolicy1 + account.KeyPolicy = &keyPolicy + } + } + + // Set property "Kind": + if typedInput.Kind != nil { + kind := *typedInput.Kind + account.Kind = &kind + } + + // Set property "LargeFileSharesState": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LargeFileSharesState != nil { + largeFileSharesState := *typedInput.Properties.LargeFileSharesState + account.LargeFileSharesState = &largeFileSharesState + } + } + + // Set property "Location": + if typedInput.Location != nil { + location := *typedInput.Location + account.Location = &location + } + + // Set property "MinimumTlsVersion": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.MinimumTlsVersion != nil { + minimumTlsVersion := *typedInput.Properties.MinimumTlsVersion + account.MinimumTlsVersion = &minimumTlsVersion + } + } + + // Set property "NetworkAcls": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.NetworkAcls != nil { + var networkAcls1 NetworkRuleSet + err := networkAcls1.PopulateFromARM(owner, *typedInput.Properties.NetworkAcls) + if err != nil { + return err + } + networkAcls := networkAcls1 + account.NetworkAcls = &networkAcls + } + } + + // no assignment for property "OperatorSpec" + + // Set property "Owner": + account.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "PublicNetworkAccess": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.PublicNetworkAccess != nil { + publicNetworkAccess := *typedInput.Properties.PublicNetworkAccess + account.PublicNetworkAccess = &publicNetworkAccess + } + } + + // Set property "RoutingPreference": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.RoutingPreference != nil { + var routingPreference1 RoutingPreference + err := routingPreference1.PopulateFromARM(owner, *typedInput.Properties.RoutingPreference) + if err != nil { + return err + } + routingPreference := routingPreference1 + account.RoutingPreference = &routingPreference + } + } + + // Set property "SasPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.SasPolicy != nil { + var sasPolicy1 SasPolicy + err := sasPolicy1.PopulateFromARM(owner, *typedInput.Properties.SasPolicy) + if err != nil { + return err + } + sasPolicy := sasPolicy1 + account.SasPolicy = &sasPolicy + } + } + + // Set property "Sku": + if typedInput.Sku != nil { + var sku1 Sku + err := sku1.PopulateFromARM(owner, *typedInput.Sku) + if err != nil { + return err + } + sku := sku1 + account.Sku = &sku + } + + // Set property "SupportsHttpsTrafficOnly": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.SupportsHttpsTrafficOnly != nil { + supportsHttpsTrafficOnly := *typedInput.Properties.SupportsHttpsTrafficOnly + account.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly + } + } + + // Set property "Tags": + if typedInput.Tags != nil { + account.Tags = make(map[string]string, len(typedInput.Tags)) + for key, value := range typedInput.Tags { + account.Tags[key] = value + } + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &StorageAccount_Spec{} + +// ConvertSpecFrom populates our StorageAccount_Spec from the provided source +func (account *StorageAccount_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20230101s.StorageAccount_Spec) + if ok { + // Populate our instance from source + return account.AssignProperties_From_StorageAccount_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccount_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = account.AssignProperties_From_StorageAccount_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our StorageAccount_Spec +func (account *StorageAccount_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20230101s.StorageAccount_Spec) + if ok { + // Populate destination from our instance + return account.AssignProperties_To_StorageAccount_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccount_Spec{} + err := account.AssignProperties_To_StorageAccount_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccount_Spec populates our StorageAccount_Spec from the provided source StorageAccount_Spec +func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(source *v20230101s.StorageAccount_Spec) error { + + // AccessTier + if source.AccessTier != nil { + accessTier := StorageAccountPropertiesCreateParameters_AccessTier(*source.AccessTier) + account.AccessTier = &accessTier + } else { + account.AccessTier = nil + } + + // AllowBlobPublicAccess + if source.AllowBlobPublicAccess != nil { + allowBlobPublicAccess := *source.AllowBlobPublicAccess + account.AllowBlobPublicAccess = &allowBlobPublicAccess + } else { + account.AllowBlobPublicAccess = nil + } + + // AllowCrossTenantReplication + if source.AllowCrossTenantReplication != nil { + allowCrossTenantReplication := *source.AllowCrossTenantReplication + account.AllowCrossTenantReplication = &allowCrossTenantReplication + } else { + account.AllowCrossTenantReplication = nil + } + + // AllowSharedKeyAccess + if source.AllowSharedKeyAccess != nil { + allowSharedKeyAccess := *source.AllowSharedKeyAccess + account.AllowSharedKeyAccess = &allowSharedKeyAccess + } else { + account.AllowSharedKeyAccess = nil + } + + // AllowedCopyScope + if source.AllowedCopyScope != nil { + allowedCopyScope := StorageAccountPropertiesCreateParameters_AllowedCopyScope(*source.AllowedCopyScope) + account.AllowedCopyScope = &allowedCopyScope + } else { + account.AllowedCopyScope = nil + } + + // AzureFilesIdentityBasedAuthentication + if source.AzureFilesIdentityBasedAuthentication != nil { + var azureFilesIdentityBasedAuthentication AzureFilesIdentityBasedAuthentication + err := azureFilesIdentityBasedAuthentication.AssignProperties_From_AzureFilesIdentityBasedAuthentication(source.AzureFilesIdentityBasedAuthentication) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AzureFilesIdentityBasedAuthentication() to populate field AzureFilesIdentityBasedAuthentication") + } + account.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication + } else { + account.AzureFilesIdentityBasedAuthentication = nil + } + + // AzureName + account.AzureName = source.AzureName + + // CustomDomain + if source.CustomDomain != nil { + var customDomain CustomDomain + err := customDomain.AssignProperties_From_CustomDomain(source.CustomDomain) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CustomDomain() to populate field CustomDomain") + } + account.CustomDomain = &customDomain + } else { + account.CustomDomain = nil + } + + // DefaultToOAuthAuthentication + if source.DefaultToOAuthAuthentication != nil { + defaultToOAuthAuthentication := *source.DefaultToOAuthAuthentication + account.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication + } else { + account.DefaultToOAuthAuthentication = nil + } + + // DnsEndpointType + if source.DnsEndpointType != nil { + dnsEndpointType := StorageAccountPropertiesCreateParameters_DnsEndpointType(*source.DnsEndpointType) + account.DnsEndpointType = &dnsEndpointType + } else { + account.DnsEndpointType = nil + } + + // Encryption + if source.Encryption != nil { + var encryption Encryption + err := encryption.AssignProperties_From_Encryption(source.Encryption) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Encryption() to populate field Encryption") + } + account.Encryption = &encryption + } else { + account.Encryption = nil + } + + // ExtendedLocation + if source.ExtendedLocation != nil { + var extendedLocation ExtendedLocation + err := extendedLocation.AssignProperties_From_ExtendedLocation(source.ExtendedLocation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ExtendedLocation() to populate field ExtendedLocation") + } + account.ExtendedLocation = &extendedLocation + } else { + account.ExtendedLocation = nil + } + + // Identity + if source.Identity != nil { + var identity Identity + err := identity.AssignProperties_From_Identity(source.Identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Identity() to populate field Identity") + } + account.Identity = &identity + } else { + account.Identity = nil + } + + // ImmutableStorageWithVersioning + if source.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning ImmutableStorageAccount + err := immutableStorageWithVersioning.AssignProperties_From_ImmutableStorageAccount(source.ImmutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ImmutableStorageAccount() to populate field ImmutableStorageWithVersioning") + } + account.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + account.ImmutableStorageWithVersioning = nil + } + + // IsHnsEnabled + if source.IsHnsEnabled != nil { + isHnsEnabled := *source.IsHnsEnabled + account.IsHnsEnabled = &isHnsEnabled + } else { + account.IsHnsEnabled = nil + } + + // IsLocalUserEnabled + if source.IsLocalUserEnabled != nil { + isLocalUserEnabled := *source.IsLocalUserEnabled + account.IsLocalUserEnabled = &isLocalUserEnabled + } else { + account.IsLocalUserEnabled = nil + } + + // IsNfsV3Enabled + if source.IsNfsV3Enabled != nil { + isNfsV3Enabled := *source.IsNfsV3Enabled + account.IsNfsV3Enabled = &isNfsV3Enabled + } else { + account.IsNfsV3Enabled = nil + } + + // IsSftpEnabled + if source.IsSftpEnabled != nil { + isSftpEnabled := *source.IsSftpEnabled + account.IsSftpEnabled = &isSftpEnabled + } else { + account.IsSftpEnabled = nil + } + + // KeyPolicy + if source.KeyPolicy != nil { + var keyPolicy KeyPolicy + err := keyPolicy.AssignProperties_From_KeyPolicy(source.KeyPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyPolicy() to populate field KeyPolicy") + } + account.KeyPolicy = &keyPolicy + } else { + account.KeyPolicy = nil + } + + // Kind + if source.Kind != nil { + kind := StorageAccount_Kind_Spec(*source.Kind) + account.Kind = &kind + } else { + account.Kind = nil + } + + // LargeFileSharesState + if source.LargeFileSharesState != nil { + largeFileSharesState := StorageAccountPropertiesCreateParameters_LargeFileSharesState(*source.LargeFileSharesState) + account.LargeFileSharesState = &largeFileSharesState + } else { + account.LargeFileSharesState = nil + } + + // Location + account.Location = genruntime.ClonePointerToString(source.Location) + + // MinimumTlsVersion + if source.MinimumTlsVersion != nil { + minimumTlsVersion := StorageAccountPropertiesCreateParameters_MinimumTlsVersion(*source.MinimumTlsVersion) + account.MinimumTlsVersion = &minimumTlsVersion + } else { + account.MinimumTlsVersion = nil + } + + // NetworkAcls + if source.NetworkAcls != nil { + var networkAcl NetworkRuleSet + err := networkAcl.AssignProperties_From_NetworkRuleSet(source.NetworkAcls) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_NetworkRuleSet() to populate field NetworkAcls") + } + account.NetworkAcls = &networkAcl + } else { + account.NetworkAcls = nil + } + + // OperatorSpec + if source.OperatorSpec != nil { + var operatorSpec StorageAccountOperatorSpec + err := operatorSpec.AssignProperties_From_StorageAccountOperatorSpec(source.OperatorSpec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccountOperatorSpec() to populate field OperatorSpec") + } + account.OperatorSpec = &operatorSpec + } else { + account.OperatorSpec = nil + } + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + account.Owner = &owner + } else { + account.Owner = nil + } + + // PublicNetworkAccess + if source.PublicNetworkAccess != nil { + publicNetworkAccess := StorageAccountPropertiesCreateParameters_PublicNetworkAccess(*source.PublicNetworkAccess) + account.PublicNetworkAccess = &publicNetworkAccess + } else { + account.PublicNetworkAccess = nil + } + + // RoutingPreference + if source.RoutingPreference != nil { + var routingPreference RoutingPreference + err := routingPreference.AssignProperties_From_RoutingPreference(source.RoutingPreference) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_RoutingPreference() to populate field RoutingPreference") + } + account.RoutingPreference = &routingPreference + } else { + account.RoutingPreference = nil + } + + // SasPolicy + if source.SasPolicy != nil { + var sasPolicy SasPolicy + err := sasPolicy.AssignProperties_From_SasPolicy(source.SasPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SasPolicy() to populate field SasPolicy") + } + account.SasPolicy = &sasPolicy + } else { + account.SasPolicy = nil + } + + // Sku + if source.Sku != nil { + var sku Sku + err := sku.AssignProperties_From_Sku(source.Sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Sku() to populate field Sku") + } + account.Sku = &sku + } else { + account.Sku = nil + } + + // SupportsHttpsTrafficOnly + if source.SupportsHttpsTrafficOnly != nil { + supportsHttpsTrafficOnly := *source.SupportsHttpsTrafficOnly + account.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly + } else { + account.SupportsHttpsTrafficOnly = nil + } + + // Tags + account.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // No error + return nil +} + +// AssignProperties_To_StorageAccount_Spec populates the provided destination StorageAccount_Spec from our StorageAccount_Spec +func (account *StorageAccount_Spec) AssignProperties_To_StorageAccount_Spec(destination *v20230101s.StorageAccount_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AccessTier + if account.AccessTier != nil { + accessTier := string(*account.AccessTier) + destination.AccessTier = &accessTier + } else { + destination.AccessTier = nil + } + + // AllowBlobPublicAccess + if account.AllowBlobPublicAccess != nil { + allowBlobPublicAccess := *account.AllowBlobPublicAccess + destination.AllowBlobPublicAccess = &allowBlobPublicAccess + } else { + destination.AllowBlobPublicAccess = nil + } + + // AllowCrossTenantReplication + if account.AllowCrossTenantReplication != nil { + allowCrossTenantReplication := *account.AllowCrossTenantReplication + destination.AllowCrossTenantReplication = &allowCrossTenantReplication + } else { + destination.AllowCrossTenantReplication = nil + } + + // AllowSharedKeyAccess + if account.AllowSharedKeyAccess != nil { + allowSharedKeyAccess := *account.AllowSharedKeyAccess + destination.AllowSharedKeyAccess = &allowSharedKeyAccess + } else { + destination.AllowSharedKeyAccess = nil + } + + // AllowedCopyScope + if account.AllowedCopyScope != nil { + allowedCopyScope := string(*account.AllowedCopyScope) + destination.AllowedCopyScope = &allowedCopyScope + } else { + destination.AllowedCopyScope = nil + } + + // AzureFilesIdentityBasedAuthentication + if account.AzureFilesIdentityBasedAuthentication != nil { + var azureFilesIdentityBasedAuthentication v20230101s.AzureFilesIdentityBasedAuthentication + err := account.AzureFilesIdentityBasedAuthentication.AssignProperties_To_AzureFilesIdentityBasedAuthentication(&azureFilesIdentityBasedAuthentication) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AzureFilesIdentityBasedAuthentication() to populate field AzureFilesIdentityBasedAuthentication") + } + destination.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication + } else { + destination.AzureFilesIdentityBasedAuthentication = nil + } + + // AzureName + destination.AzureName = account.AzureName + + // CustomDomain + if account.CustomDomain != nil { + var customDomain v20230101s.CustomDomain + err := account.CustomDomain.AssignProperties_To_CustomDomain(&customDomain) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CustomDomain() to populate field CustomDomain") + } + destination.CustomDomain = &customDomain + } else { + destination.CustomDomain = nil + } + + // DefaultToOAuthAuthentication + if account.DefaultToOAuthAuthentication != nil { + defaultToOAuthAuthentication := *account.DefaultToOAuthAuthentication + destination.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication + } else { + destination.DefaultToOAuthAuthentication = nil + } + + // DnsEndpointType + if account.DnsEndpointType != nil { + dnsEndpointType := string(*account.DnsEndpointType) + destination.DnsEndpointType = &dnsEndpointType + } else { + destination.DnsEndpointType = nil + } + + // Encryption + if account.Encryption != nil { + var encryption v20230101s.Encryption + err := account.Encryption.AssignProperties_To_Encryption(&encryption) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Encryption() to populate field Encryption") + } + destination.Encryption = &encryption + } else { + destination.Encryption = nil + } + + // ExtendedLocation + if account.ExtendedLocation != nil { + var extendedLocation v20230101s.ExtendedLocation + err := account.ExtendedLocation.AssignProperties_To_ExtendedLocation(&extendedLocation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ExtendedLocation() to populate field ExtendedLocation") + } + destination.ExtendedLocation = &extendedLocation + } else { + destination.ExtendedLocation = nil + } + + // Identity + if account.Identity != nil { + var identity v20230101s.Identity + err := account.Identity.AssignProperties_To_Identity(&identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Identity() to populate field Identity") + } + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // ImmutableStorageWithVersioning + if account.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning v20230101s.ImmutableStorageAccount + err := account.ImmutableStorageWithVersioning.AssignProperties_To_ImmutableStorageAccount(&immutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ImmutableStorageAccount() to populate field ImmutableStorageWithVersioning") + } + destination.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + destination.ImmutableStorageWithVersioning = nil + } + + // IsHnsEnabled + if account.IsHnsEnabled != nil { + isHnsEnabled := *account.IsHnsEnabled + destination.IsHnsEnabled = &isHnsEnabled + } else { + destination.IsHnsEnabled = nil + } + + // IsLocalUserEnabled + if account.IsLocalUserEnabled != nil { + isLocalUserEnabled := *account.IsLocalUserEnabled + destination.IsLocalUserEnabled = &isLocalUserEnabled + } else { + destination.IsLocalUserEnabled = nil + } + + // IsNfsV3Enabled + if account.IsNfsV3Enabled != nil { + isNfsV3Enabled := *account.IsNfsV3Enabled + destination.IsNfsV3Enabled = &isNfsV3Enabled + } else { + destination.IsNfsV3Enabled = nil + } + + // IsSftpEnabled + if account.IsSftpEnabled != nil { + isSftpEnabled := *account.IsSftpEnabled + destination.IsSftpEnabled = &isSftpEnabled + } else { + destination.IsSftpEnabled = nil + } + + // KeyPolicy + if account.KeyPolicy != nil { + var keyPolicy v20230101s.KeyPolicy + err := account.KeyPolicy.AssignProperties_To_KeyPolicy(&keyPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyPolicy() to populate field KeyPolicy") + } + destination.KeyPolicy = &keyPolicy + } else { + destination.KeyPolicy = nil + } + + // Kind + if account.Kind != nil { + kind := string(*account.Kind) + destination.Kind = &kind + } else { + destination.Kind = nil + } + + // LargeFileSharesState + if account.LargeFileSharesState != nil { + largeFileSharesState := string(*account.LargeFileSharesState) + destination.LargeFileSharesState = &largeFileSharesState + } else { + destination.LargeFileSharesState = nil + } + + // Location + destination.Location = genruntime.ClonePointerToString(account.Location) + + // MinimumTlsVersion + if account.MinimumTlsVersion != nil { + minimumTlsVersion := string(*account.MinimumTlsVersion) + destination.MinimumTlsVersion = &minimumTlsVersion + } else { + destination.MinimumTlsVersion = nil + } + + // NetworkAcls + if account.NetworkAcls != nil { + var networkAcl v20230101s.NetworkRuleSet + err := account.NetworkAcls.AssignProperties_To_NetworkRuleSet(&networkAcl) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_NetworkRuleSet() to populate field NetworkAcls") + } + destination.NetworkAcls = &networkAcl + } else { + destination.NetworkAcls = nil + } + + // OperatorSpec + if account.OperatorSpec != nil { + var operatorSpec v20230101s.StorageAccountOperatorSpec + err := account.OperatorSpec.AssignProperties_To_StorageAccountOperatorSpec(&operatorSpec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccountOperatorSpec() to populate field OperatorSpec") + } + destination.OperatorSpec = &operatorSpec + } else { + destination.OperatorSpec = nil + } + + // OriginalVersion + destination.OriginalVersion = account.OriginalVersion() + + // Owner + if account.Owner != nil { + owner := account.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // PublicNetworkAccess + if account.PublicNetworkAccess != nil { + publicNetworkAccess := string(*account.PublicNetworkAccess) + destination.PublicNetworkAccess = &publicNetworkAccess + } else { + destination.PublicNetworkAccess = nil + } + + // RoutingPreference + if account.RoutingPreference != nil { + var routingPreference v20230101s.RoutingPreference + err := account.RoutingPreference.AssignProperties_To_RoutingPreference(&routingPreference) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_RoutingPreference() to populate field RoutingPreference") + } + destination.RoutingPreference = &routingPreference + } else { + destination.RoutingPreference = nil + } + + // SasPolicy + if account.SasPolicy != nil { + var sasPolicy v20230101s.SasPolicy + err := account.SasPolicy.AssignProperties_To_SasPolicy(&sasPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SasPolicy() to populate field SasPolicy") + } + destination.SasPolicy = &sasPolicy + } else { + destination.SasPolicy = nil + } + + // Sku + if account.Sku != nil { + var sku v20230101s.Sku + err := account.Sku.AssignProperties_To_Sku(&sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Sku() to populate field Sku") + } + destination.Sku = &sku + } else { + destination.Sku = nil + } + + // SupportsHttpsTrafficOnly + if account.SupportsHttpsTrafficOnly != nil { + supportsHttpsTrafficOnly := *account.SupportsHttpsTrafficOnly + destination.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly + } else { + destination.SupportsHttpsTrafficOnly = nil + } + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(account.Tags) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_StorageAccount_STATUS populates our StorageAccount_Spec from the provided source StorageAccount_STATUS +func (account *StorageAccount_Spec) Initialize_From_StorageAccount_STATUS(source *StorageAccount_STATUS) error { + + // AccessTier + if source.AccessTier != nil { + accessTier := StorageAccountPropertiesCreateParameters_AccessTier(*source.AccessTier) + account.AccessTier = &accessTier + } else { + account.AccessTier = nil + } + + // AllowBlobPublicAccess + if source.AllowBlobPublicAccess != nil { + allowBlobPublicAccess := *source.AllowBlobPublicAccess + account.AllowBlobPublicAccess = &allowBlobPublicAccess + } else { + account.AllowBlobPublicAccess = nil + } + + // AllowCrossTenantReplication + if source.AllowCrossTenantReplication != nil { + allowCrossTenantReplication := *source.AllowCrossTenantReplication + account.AllowCrossTenantReplication = &allowCrossTenantReplication + } else { + account.AllowCrossTenantReplication = nil + } + + // AllowSharedKeyAccess + if source.AllowSharedKeyAccess != nil { + allowSharedKeyAccess := *source.AllowSharedKeyAccess + account.AllowSharedKeyAccess = &allowSharedKeyAccess + } else { + account.AllowSharedKeyAccess = nil + } + + // AllowedCopyScope + if source.AllowedCopyScope != nil { + allowedCopyScope := StorageAccountPropertiesCreateParameters_AllowedCopyScope(*source.AllowedCopyScope) + account.AllowedCopyScope = &allowedCopyScope + } else { + account.AllowedCopyScope = nil + } + + // AzureFilesIdentityBasedAuthentication + if source.AzureFilesIdentityBasedAuthentication != nil { + var azureFilesIdentityBasedAuthentication AzureFilesIdentityBasedAuthentication + err := azureFilesIdentityBasedAuthentication.Initialize_From_AzureFilesIdentityBasedAuthentication_STATUS(source.AzureFilesIdentityBasedAuthentication) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_AzureFilesIdentityBasedAuthentication_STATUS() to populate field AzureFilesIdentityBasedAuthentication") + } + account.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication + } else { + account.AzureFilesIdentityBasedAuthentication = nil + } + + // CustomDomain + if source.CustomDomain != nil { + var customDomain CustomDomain + err := customDomain.Initialize_From_CustomDomain_STATUS(source.CustomDomain) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_CustomDomain_STATUS() to populate field CustomDomain") + } + account.CustomDomain = &customDomain + } else { + account.CustomDomain = nil + } + + // DefaultToOAuthAuthentication + if source.DefaultToOAuthAuthentication != nil { + defaultToOAuthAuthentication := *source.DefaultToOAuthAuthentication + account.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication + } else { + account.DefaultToOAuthAuthentication = nil + } + + // DnsEndpointType + if source.DnsEndpointType != nil { + dnsEndpointType := StorageAccountPropertiesCreateParameters_DnsEndpointType(*source.DnsEndpointType) + account.DnsEndpointType = &dnsEndpointType + } else { + account.DnsEndpointType = nil + } + + // Encryption + if source.Encryption != nil { + var encryption Encryption + err := encryption.Initialize_From_Encryption_STATUS(source.Encryption) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_Encryption_STATUS() to populate field Encryption") + } + account.Encryption = &encryption + } else { + account.Encryption = nil + } + + // ExtendedLocation + if source.ExtendedLocation != nil { + var extendedLocation ExtendedLocation + err := extendedLocation.Initialize_From_ExtendedLocation_STATUS(source.ExtendedLocation) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ExtendedLocation_STATUS() to populate field ExtendedLocation") + } + account.ExtendedLocation = &extendedLocation + } else { + account.ExtendedLocation = nil + } + + // Identity + if source.Identity != nil { + var identity Identity + err := identity.Initialize_From_Identity_STATUS(source.Identity) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_Identity_STATUS() to populate field Identity") + } + account.Identity = &identity + } else { + account.Identity = nil + } + + // ImmutableStorageWithVersioning + if source.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning ImmutableStorageAccount + err := immutableStorageWithVersioning.Initialize_From_ImmutableStorageAccount_STATUS(source.ImmutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ImmutableStorageAccount_STATUS() to populate field ImmutableStorageWithVersioning") + } + account.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + account.ImmutableStorageWithVersioning = nil + } + + // IsHnsEnabled + if source.IsHnsEnabled != nil { + isHnsEnabled := *source.IsHnsEnabled + account.IsHnsEnabled = &isHnsEnabled + } else { + account.IsHnsEnabled = nil + } + + // IsLocalUserEnabled + if source.IsLocalUserEnabled != nil { + isLocalUserEnabled := *source.IsLocalUserEnabled + account.IsLocalUserEnabled = &isLocalUserEnabled + } else { + account.IsLocalUserEnabled = nil + } + + // IsNfsV3Enabled + if source.IsNfsV3Enabled != nil { + isNfsV3Enabled := *source.IsNfsV3Enabled + account.IsNfsV3Enabled = &isNfsV3Enabled + } else { + account.IsNfsV3Enabled = nil + } + + // IsSftpEnabled + if source.IsSftpEnabled != nil { + isSftpEnabled := *source.IsSftpEnabled + account.IsSftpEnabled = &isSftpEnabled + } else { + account.IsSftpEnabled = nil + } + + // KeyPolicy + if source.KeyPolicy != nil { + var keyPolicy KeyPolicy + err := keyPolicy.Initialize_From_KeyPolicy_STATUS(source.KeyPolicy) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_KeyPolicy_STATUS() to populate field KeyPolicy") + } + account.KeyPolicy = &keyPolicy + } else { + account.KeyPolicy = nil + } + + // Kind + if source.Kind != nil { + kind := StorageAccount_Kind_Spec(*source.Kind) + account.Kind = &kind + } else { + account.Kind = nil + } + + // LargeFileSharesState + if source.LargeFileSharesState != nil { + largeFileSharesState := StorageAccountPropertiesCreateParameters_LargeFileSharesState(*source.LargeFileSharesState) + account.LargeFileSharesState = &largeFileSharesState + } else { + account.LargeFileSharesState = nil + } + + // Location + account.Location = genruntime.ClonePointerToString(source.Location) + + // MinimumTlsVersion + if source.MinimumTlsVersion != nil { + minimumTlsVersion := StorageAccountPropertiesCreateParameters_MinimumTlsVersion(*source.MinimumTlsVersion) + account.MinimumTlsVersion = &minimumTlsVersion + } else { + account.MinimumTlsVersion = nil + } + + // NetworkAcls + if source.NetworkAcls != nil { + var networkAcl NetworkRuleSet + err := networkAcl.Initialize_From_NetworkRuleSet_STATUS(source.NetworkAcls) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_NetworkRuleSet_STATUS() to populate field NetworkAcls") + } + account.NetworkAcls = &networkAcl + } else { + account.NetworkAcls = nil + } + + // PublicNetworkAccess + if source.PublicNetworkAccess != nil { + publicNetworkAccess := StorageAccountPropertiesCreateParameters_PublicNetworkAccess(*source.PublicNetworkAccess) + account.PublicNetworkAccess = &publicNetworkAccess + } else { + account.PublicNetworkAccess = nil + } + + // RoutingPreference + if source.RoutingPreference != nil { + var routingPreference RoutingPreference + err := routingPreference.Initialize_From_RoutingPreference_STATUS(source.RoutingPreference) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_RoutingPreference_STATUS() to populate field RoutingPreference") + } + account.RoutingPreference = &routingPreference + } else { + account.RoutingPreference = nil + } + + // SasPolicy + if source.SasPolicy != nil { + var sasPolicy SasPolicy + err := sasPolicy.Initialize_From_SasPolicy_STATUS(source.SasPolicy) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_SasPolicy_STATUS() to populate field SasPolicy") + } + account.SasPolicy = &sasPolicy + } else { + account.SasPolicy = nil + } + + // Sku + if source.Sku != nil { + var sku Sku + err := sku.Initialize_From_Sku_STATUS(source.Sku) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_Sku_STATUS() to populate field Sku") + } + account.Sku = &sku + } else { + account.Sku = nil + } + + // SupportsHttpsTrafficOnly + if source.SupportsHttpsTrafficOnly != nil { + supportsHttpsTrafficOnly := *source.SupportsHttpsTrafficOnly + account.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly + } else { + account.SupportsHttpsTrafficOnly = nil + } + + // Tags + account.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (account *StorageAccount_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (account *StorageAccount_Spec) SetAzureName(azureName string) { account.AzureName = azureName } + +// The storage account. +type StorageAccount_STATUS struct { + // AccessTier: Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' + // access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium + // block blobs storage account type. + AccessTier *StorageAccountProperties_AccessTier_STATUS `json:"accessTier,omitempty"` + + // AccountMigrationInProgress: If customer initiated account migration is in progress, the value will be true else it will + // be null. + AccountMigrationInProgress *bool `json:"accountMigrationInProgress,omitempty"` + + // AllowBlobPublicAccess: Allow or disallow public access to all blobs or containers in the storage account. The default + // interpretation is false for this property. + AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` + + // AllowCrossTenantReplication: Allow or disallow cross AAD tenant object replication. Set this property to true for new or + // existing accounts only if object replication policies will involve storage accounts in different AAD tenants. The + // default interpretation is false for new accounts to follow best security practices by default. + AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + + // AllowSharedKeyAccess: Indicates whether the storage account permits requests to be authorized with the account access + // key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure + // Active Directory (Azure AD). The default value is null, which is equivalent to true. + AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` + + // AllowedCopyScope: Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. + AllowedCopyScope *StorageAccountProperties_AllowedCopyScope_STATUS `json:"allowedCopyScope,omitempty"` + + // AzureFilesIdentityBasedAuthentication: Provides the identity based authentication settings for Azure Files. + AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication_STATUS `json:"azureFilesIdentityBasedAuthentication,omitempty"` + + // BlobRestoreStatus: Blob restore status + BlobRestoreStatus *BlobRestoreStatus_STATUS `json:"blobRestoreStatus,omitempty"` + + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // CreationTime: Gets the creation date and time of the storage account in UTC. + CreationTime *string `json:"creationTime,omitempty"` + + // CustomDomain: Gets the custom domain the user assigned to this storage account. + CustomDomain *CustomDomain_STATUS `json:"customDomain,omitempty"` + + // DefaultToOAuthAuthentication: A boolean flag which indicates whether the default authentication is OAuth or not. The + // default interpretation is false for this property. + DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + + // DnsEndpointType: Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of + // accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an + // alphanumeric DNS Zone identifier. + DnsEndpointType *StorageAccountProperties_DnsEndpointType_STATUS `json:"dnsEndpointType,omitempty"` + + // Encryption: Encryption settings to be used for server-side encryption for the storage account. + Encryption *Encryption_STATUS `json:"encryption,omitempty"` + + // ExtendedLocation: The extendedLocation of the resource. + ExtendedLocation *ExtendedLocation_STATUS `json:"extendedLocation,omitempty"` + + // FailoverInProgress: If the failover is in progress, the value will be true, otherwise, it will be null. + FailoverInProgress *bool `json:"failoverInProgress,omitempty"` + + // GeoReplicationStats: Geo Replication Stats + GeoReplicationStats *GeoReplicationStats_STATUS `json:"geoReplicationStats,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Identity: The identity of the resource. + Identity *Identity_STATUS `json:"identity,omitempty"` + + // ImmutableStorageWithVersioning: The property is immutable and can only be set to true at the account creation time. When + // set to true, it enables object level immutability for all the containers in the account by default. + ImmutableStorageWithVersioning *ImmutableStorageAccount_STATUS `json:"immutableStorageWithVersioning,omitempty"` + + // IsHnsEnabled: Account HierarchicalNamespace enabled if sets to true. + IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` + + // IsLocalUserEnabled: Enables local users feature, if set to true + IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` + + // IsNfsV3Enabled: NFS 3.0 protocol support enabled if set to true. + IsNfsV3Enabled *bool `json:"isNfsV3Enabled,omitempty"` + + // IsSftpEnabled: Enables Secure File Transfer Protocol, if set to true + IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + + // IsSkuConversionBlocked: This property will be set to true or false on an event of ongoing migration. Default value is + // null. + IsSkuConversionBlocked *bool `json:"isSkuConversionBlocked,omitempty"` + + // KeyCreationTime: Storage account keys creation time. + KeyCreationTime *KeyCreationTime_STATUS `json:"keyCreationTime,omitempty"` + + // KeyPolicy: KeyPolicy assigned to the storage account. + KeyPolicy *KeyPolicy_STATUS `json:"keyPolicy,omitempty"` + + // Kind: Gets the Kind. + Kind *StorageAccount_Kind_STATUS `json:"kind,omitempty"` + + // LargeFileSharesState: Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. + LargeFileSharesState *StorageAccountProperties_LargeFileSharesState_STATUS `json:"largeFileSharesState,omitempty"` + + // LastGeoFailoverTime: Gets the timestamp of the most recent instance of a failover to the secondary location. Only the + // most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only + // available if the accountType is Standard_GRS or Standard_RAGRS. + LastGeoFailoverTime *string `json:"lastGeoFailoverTime,omitempty"` + + // Location: The geo-location where the resource lives + Location *string `json:"location,omitempty"` + + // MinimumTlsVersion: Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS + // 1.0 for this property. + MinimumTlsVersion *StorageAccountProperties_MinimumTlsVersion_STATUS `json:"minimumTlsVersion,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // NetworkAcls: Network rule set + NetworkAcls *NetworkRuleSet_STATUS `json:"networkAcls,omitempty"` + + // PrimaryEndpoints: Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that + // Standard_ZRS and Premium_LRS accounts only return the blob endpoint. + PrimaryEndpoints *Endpoints_STATUS `json:"primaryEndpoints,omitempty"` + + // PrimaryLocation: Gets the location of the primary data center for the storage account. + PrimaryLocation *string `json:"primaryLocation,omitempty"` + + // PrivateEndpointConnections: List of private endpoint connection associated with the specified storage account + PrivateEndpointConnections []PrivateEndpointConnection_STATUS `json:"privateEndpointConnections,omitempty"` + + // ProvisioningState: Gets the status of the storage account at the time the operation was called. + ProvisioningState *StorageAccountProperties_ProvisioningState_STATUS `json:"provisioningState,omitempty"` + + // PublicNetworkAccess: Allow or disallow public network access to Storage Account. Value is optional but if passed in, + // must be 'Enabled' or 'Disabled'. + PublicNetworkAccess *StorageAccountProperties_PublicNetworkAccess_STATUS `json:"publicNetworkAccess,omitempty"` + + // RoutingPreference: Maintains information about the network routing choice opted by the user for data transfer + RoutingPreference *RoutingPreference_STATUS `json:"routingPreference,omitempty"` + + // SasPolicy: SasPolicy assigned to the storage account. + SasPolicy *SasPolicy_STATUS `json:"sasPolicy,omitempty"` + + // SecondaryEndpoints: Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the + // secondary location of the storage account. Only available if the SKU name is Standard_RAGRS. + SecondaryEndpoints *Endpoints_STATUS `json:"secondaryEndpoints,omitempty"` + + // SecondaryLocation: Gets the location of the geo-replicated secondary for the storage account. Only available if the + // accountType is Standard_GRS or Standard_RAGRS. + SecondaryLocation *string `json:"secondaryLocation,omitempty"` + + // Sku: Gets the SKU. + Sku *Sku_STATUS `json:"sku,omitempty"` + + // StatusOfPrimary: Gets the status indicating whether the primary location of the storage account is available or + // unavailable. + StatusOfPrimary *StorageAccountProperties_StatusOfPrimary_STATUS `json:"statusOfPrimary,omitempty"` + + // StatusOfSecondary: Gets the status indicating whether the secondary location of the storage account is available or + // unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS. + StatusOfSecondary *StorageAccountProperties_StatusOfSecondary_STATUS `json:"statusOfSecondary,omitempty"` + + // StorageAccountSkuConversionStatus: This property is readOnly and is set by server during asynchronous storage account + // sku conversion operations. + StorageAccountSkuConversionStatus *StorageAccountSkuConversionStatus_STATUS `json:"storageAccountSkuConversionStatus,omitempty"` + + // SupportsHttpsTrafficOnly: Allows https traffic only to storage service if sets to true. + SupportsHttpsTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + + // Tags: Resource tags. + Tags map[string]string `json:"tags,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccount_STATUS{} + +// ConvertStatusFrom populates our StorageAccount_STATUS from the provided source +func (account *StorageAccount_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20230101s.StorageAccount_STATUS) + if ok { + // Populate our instance from source + return account.AssignProperties_From_StorageAccount_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccount_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = account.AssignProperties_From_StorageAccount_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our StorageAccount_STATUS +func (account *StorageAccount_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20230101s.StorageAccount_STATUS) + if ok { + // Populate destination from our instance + return account.AssignProperties_To_StorageAccount_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccount_STATUS{} + err := account.AssignProperties_To_StorageAccount_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &StorageAccount_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (account *StorageAccount_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccount_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (account *StorageAccount_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccount_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccount_STATUS_ARM, got %T", armInput) + } + + // Set property "AccessTier": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AccessTier != nil { + accessTier := *typedInput.Properties.AccessTier + account.AccessTier = &accessTier + } + } + + // Set property "AccountMigrationInProgress": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AccountMigrationInProgress != nil { + accountMigrationInProgress := *typedInput.Properties.AccountMigrationInProgress + account.AccountMigrationInProgress = &accountMigrationInProgress + } + } + + // Set property "AllowBlobPublicAccess": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AllowBlobPublicAccess != nil { + allowBlobPublicAccess := *typedInput.Properties.AllowBlobPublicAccess + account.AllowBlobPublicAccess = &allowBlobPublicAccess + } + } + + // Set property "AllowCrossTenantReplication": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AllowCrossTenantReplication != nil { + allowCrossTenantReplication := *typedInput.Properties.AllowCrossTenantReplication + account.AllowCrossTenantReplication = &allowCrossTenantReplication + } + } + + // Set property "AllowSharedKeyAccess": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AllowSharedKeyAccess != nil { + allowSharedKeyAccess := *typedInput.Properties.AllowSharedKeyAccess + account.AllowSharedKeyAccess = &allowSharedKeyAccess + } + } + + // Set property "AllowedCopyScope": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AllowedCopyScope != nil { + allowedCopyScope := *typedInput.Properties.AllowedCopyScope + account.AllowedCopyScope = &allowedCopyScope + } + } + + // Set property "AzureFilesIdentityBasedAuthentication": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AzureFilesIdentityBasedAuthentication != nil { + var azureFilesIdentityBasedAuthentication1 AzureFilesIdentityBasedAuthentication_STATUS + err := azureFilesIdentityBasedAuthentication1.PopulateFromARM(owner, *typedInput.Properties.AzureFilesIdentityBasedAuthentication) + if err != nil { + return err + } + azureFilesIdentityBasedAuthentication := azureFilesIdentityBasedAuthentication1 + account.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication + } + } + + // Set property "BlobRestoreStatus": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.BlobRestoreStatus != nil { + var blobRestoreStatus1 BlobRestoreStatus_STATUS + err := blobRestoreStatus1.PopulateFromARM(owner, *typedInput.Properties.BlobRestoreStatus) + if err != nil { + return err + } + blobRestoreStatus := blobRestoreStatus1 + account.BlobRestoreStatus = &blobRestoreStatus + } + } + + // no assignment for property "Conditions" + + // Set property "CreationTime": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.CreationTime != nil { + creationTime := *typedInput.Properties.CreationTime + account.CreationTime = &creationTime + } + } + + // Set property "CustomDomain": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.CustomDomain != nil { + var customDomain1 CustomDomain_STATUS + err := customDomain1.PopulateFromARM(owner, *typedInput.Properties.CustomDomain) + if err != nil { + return err + } + customDomain := customDomain1 + account.CustomDomain = &customDomain + } + } + + // Set property "DefaultToOAuthAuthentication": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DefaultToOAuthAuthentication != nil { + defaultToOAuthAuthentication := *typedInput.Properties.DefaultToOAuthAuthentication + account.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication + } + } + + // Set property "DnsEndpointType": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DnsEndpointType != nil { + dnsEndpointType := *typedInput.Properties.DnsEndpointType + account.DnsEndpointType = &dnsEndpointType + } + } + + // Set property "Encryption": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Encryption != nil { + var encryption1 Encryption_STATUS + err := encryption1.PopulateFromARM(owner, *typedInput.Properties.Encryption) + if err != nil { + return err + } + encryption := encryption1 + account.Encryption = &encryption + } + } + + // Set property "ExtendedLocation": + if typedInput.ExtendedLocation != nil { + var extendedLocation1 ExtendedLocation_STATUS + err := extendedLocation1.PopulateFromARM(owner, *typedInput.ExtendedLocation) + if err != nil { + return err + } + extendedLocation := extendedLocation1 + account.ExtendedLocation = &extendedLocation + } + + // Set property "FailoverInProgress": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.FailoverInProgress != nil { + failoverInProgress := *typedInput.Properties.FailoverInProgress + account.FailoverInProgress = &failoverInProgress + } + } + + // Set property "GeoReplicationStats": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.GeoReplicationStats != nil { + var geoReplicationStats1 GeoReplicationStats_STATUS + err := geoReplicationStats1.PopulateFromARM(owner, *typedInput.Properties.GeoReplicationStats) + if err != nil { + return err + } + geoReplicationStats := geoReplicationStats1 + account.GeoReplicationStats = &geoReplicationStats + } + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + account.Id = &id + } + + // Set property "Identity": + if typedInput.Identity != nil { + var identity1 Identity_STATUS + err := identity1.PopulateFromARM(owner, *typedInput.Identity) + if err != nil { + return err + } + identity := identity1 + account.Identity = &identity + } + + // Set property "ImmutableStorageWithVersioning": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning1 ImmutableStorageAccount_STATUS + err := immutableStorageWithVersioning1.PopulateFromARM(owner, *typedInput.Properties.ImmutableStorageWithVersioning) + if err != nil { + return err + } + immutableStorageWithVersioning := immutableStorageWithVersioning1 + account.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } + } + + // Set property "IsHnsEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsHnsEnabled != nil { + isHnsEnabled := *typedInput.Properties.IsHnsEnabled + account.IsHnsEnabled = &isHnsEnabled + } + } + + // Set property "IsLocalUserEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsLocalUserEnabled != nil { + isLocalUserEnabled := *typedInput.Properties.IsLocalUserEnabled + account.IsLocalUserEnabled = &isLocalUserEnabled + } + } + + // Set property "IsNfsV3Enabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsNfsV3Enabled != nil { + isNfsV3Enabled := *typedInput.Properties.IsNfsV3Enabled + account.IsNfsV3Enabled = &isNfsV3Enabled + } + } + + // Set property "IsSftpEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsSftpEnabled != nil { + isSftpEnabled := *typedInput.Properties.IsSftpEnabled + account.IsSftpEnabled = &isSftpEnabled + } + } + + // Set property "IsSkuConversionBlocked": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsSkuConversionBlocked != nil { + isSkuConversionBlocked := *typedInput.Properties.IsSkuConversionBlocked + account.IsSkuConversionBlocked = &isSkuConversionBlocked + } + } + + // Set property "KeyCreationTime": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.KeyCreationTime != nil { + var keyCreationTime1 KeyCreationTime_STATUS + err := keyCreationTime1.PopulateFromARM(owner, *typedInput.Properties.KeyCreationTime) + if err != nil { + return err + } + keyCreationTime := keyCreationTime1 + account.KeyCreationTime = &keyCreationTime + } + } + + // Set property "KeyPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.KeyPolicy != nil { + var keyPolicy1 KeyPolicy_STATUS + err := keyPolicy1.PopulateFromARM(owner, *typedInput.Properties.KeyPolicy) + if err != nil { + return err + } + keyPolicy := keyPolicy1 + account.KeyPolicy = &keyPolicy + } + } + + // Set property "Kind": + if typedInput.Kind != nil { + kind := *typedInput.Kind + account.Kind = &kind + } + + // Set property "LargeFileSharesState": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LargeFileSharesState != nil { + largeFileSharesState := *typedInput.Properties.LargeFileSharesState + account.LargeFileSharesState = &largeFileSharesState + } + } + + // Set property "LastGeoFailoverTime": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LastGeoFailoverTime != nil { + lastGeoFailoverTime := *typedInput.Properties.LastGeoFailoverTime + account.LastGeoFailoverTime = &lastGeoFailoverTime + } + } + + // Set property "Location": + if typedInput.Location != nil { + location := *typedInput.Location + account.Location = &location + } + + // Set property "MinimumTlsVersion": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.MinimumTlsVersion != nil { + minimumTlsVersion := *typedInput.Properties.MinimumTlsVersion + account.MinimumTlsVersion = &minimumTlsVersion + } + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + account.Name = &name + } + + // Set property "NetworkAcls": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.NetworkAcls != nil { + var networkAcls1 NetworkRuleSet_STATUS + err := networkAcls1.PopulateFromARM(owner, *typedInput.Properties.NetworkAcls) + if err != nil { + return err + } + networkAcls := networkAcls1 + account.NetworkAcls = &networkAcls + } + } + + // Set property "PrimaryEndpoints": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.PrimaryEndpoints != nil { + var primaryEndpoints1 Endpoints_STATUS + err := primaryEndpoints1.PopulateFromARM(owner, *typedInput.Properties.PrimaryEndpoints) + if err != nil { + return err + } + primaryEndpoints := primaryEndpoints1 + account.PrimaryEndpoints = &primaryEndpoints + } + } + + // Set property "PrimaryLocation": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.PrimaryLocation != nil { + primaryLocation := *typedInput.Properties.PrimaryLocation + account.PrimaryLocation = &primaryLocation + } + } + + // Set property "PrivateEndpointConnections": + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.PrivateEndpointConnections { + var item1 PrivateEndpointConnection_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + account.PrivateEndpointConnections = append(account.PrivateEndpointConnections, item1) + } + } + + // Set property "ProvisioningState": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ProvisioningState != nil { + provisioningState := *typedInput.Properties.ProvisioningState + account.ProvisioningState = &provisioningState + } + } + + // Set property "PublicNetworkAccess": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.PublicNetworkAccess != nil { + publicNetworkAccess := *typedInput.Properties.PublicNetworkAccess + account.PublicNetworkAccess = &publicNetworkAccess + } + } + + // Set property "RoutingPreference": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.RoutingPreference != nil { + var routingPreference1 RoutingPreference_STATUS + err := routingPreference1.PopulateFromARM(owner, *typedInput.Properties.RoutingPreference) + if err != nil { + return err + } + routingPreference := routingPreference1 + account.RoutingPreference = &routingPreference + } + } + + // Set property "SasPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.SasPolicy != nil { + var sasPolicy1 SasPolicy_STATUS + err := sasPolicy1.PopulateFromARM(owner, *typedInput.Properties.SasPolicy) + if err != nil { + return err + } + sasPolicy := sasPolicy1 + account.SasPolicy = &sasPolicy + } + } + + // Set property "SecondaryEndpoints": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.SecondaryEndpoints != nil { + var secondaryEndpoints1 Endpoints_STATUS + err := secondaryEndpoints1.PopulateFromARM(owner, *typedInput.Properties.SecondaryEndpoints) + if err != nil { + return err + } + secondaryEndpoints := secondaryEndpoints1 + account.SecondaryEndpoints = &secondaryEndpoints + } + } + + // Set property "SecondaryLocation": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.SecondaryLocation != nil { + secondaryLocation := *typedInput.Properties.SecondaryLocation + account.SecondaryLocation = &secondaryLocation + } + } + + // Set property "Sku": + if typedInput.Sku != nil { + var sku1 Sku_STATUS + err := sku1.PopulateFromARM(owner, *typedInput.Sku) + if err != nil { + return err + } + sku := sku1 + account.Sku = &sku + } + + // Set property "StatusOfPrimary": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.StatusOfPrimary != nil { + statusOfPrimary := *typedInput.Properties.StatusOfPrimary + account.StatusOfPrimary = &statusOfPrimary + } + } + + // Set property "StatusOfSecondary": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.StatusOfSecondary != nil { + statusOfSecondary := *typedInput.Properties.StatusOfSecondary + account.StatusOfSecondary = &statusOfSecondary + } + } + + // Set property "StorageAccountSkuConversionStatus": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.StorageAccountSkuConversionStatus != nil { + var storageAccountSkuConversionStatus1 StorageAccountSkuConversionStatus_STATUS + err := storageAccountSkuConversionStatus1.PopulateFromARM(owner, *typedInput.Properties.StorageAccountSkuConversionStatus) + if err != nil { + return err + } + storageAccountSkuConversionStatus := storageAccountSkuConversionStatus1 + account.StorageAccountSkuConversionStatus = &storageAccountSkuConversionStatus + } + } + + // Set property "SupportsHttpsTrafficOnly": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.SupportsHttpsTrafficOnly != nil { + supportsHttpsTrafficOnly := *typedInput.Properties.SupportsHttpsTrafficOnly + account.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly + } + } + + // Set property "Tags": + if typedInput.Tags != nil { + account.Tags = make(map[string]string, len(typedInput.Tags)) + for key, value := range typedInput.Tags { + account.Tags[key] = value + } + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + account.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccount_STATUS populates our StorageAccount_STATUS from the provided source StorageAccount_STATUS +func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATUS(source *v20230101s.StorageAccount_STATUS) error { + + // AccessTier + if source.AccessTier != nil { + accessTier := StorageAccountProperties_AccessTier_STATUS(*source.AccessTier) + account.AccessTier = &accessTier + } else { + account.AccessTier = nil + } + + // AccountMigrationInProgress + if source.AccountMigrationInProgress != nil { + accountMigrationInProgress := *source.AccountMigrationInProgress + account.AccountMigrationInProgress = &accountMigrationInProgress + } else { + account.AccountMigrationInProgress = nil + } + + // AllowBlobPublicAccess + if source.AllowBlobPublicAccess != nil { + allowBlobPublicAccess := *source.AllowBlobPublicAccess + account.AllowBlobPublicAccess = &allowBlobPublicAccess + } else { + account.AllowBlobPublicAccess = nil + } + + // AllowCrossTenantReplication + if source.AllowCrossTenantReplication != nil { + allowCrossTenantReplication := *source.AllowCrossTenantReplication + account.AllowCrossTenantReplication = &allowCrossTenantReplication + } else { + account.AllowCrossTenantReplication = nil + } + + // AllowSharedKeyAccess + if source.AllowSharedKeyAccess != nil { + allowSharedKeyAccess := *source.AllowSharedKeyAccess + account.AllowSharedKeyAccess = &allowSharedKeyAccess + } else { + account.AllowSharedKeyAccess = nil + } + + // AllowedCopyScope + if source.AllowedCopyScope != nil { + allowedCopyScope := StorageAccountProperties_AllowedCopyScope_STATUS(*source.AllowedCopyScope) + account.AllowedCopyScope = &allowedCopyScope + } else { + account.AllowedCopyScope = nil + } + + // AzureFilesIdentityBasedAuthentication + if source.AzureFilesIdentityBasedAuthentication != nil { + var azureFilesIdentityBasedAuthentication AzureFilesIdentityBasedAuthentication_STATUS + err := azureFilesIdentityBasedAuthentication.AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS(source.AzureFilesIdentityBasedAuthentication) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS() to populate field AzureFilesIdentityBasedAuthentication") + } + account.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication + } else { + account.AzureFilesIdentityBasedAuthentication = nil + } + + // BlobRestoreStatus + if source.BlobRestoreStatus != nil { + var blobRestoreStatus BlobRestoreStatus_STATUS + err := blobRestoreStatus.AssignProperties_From_BlobRestoreStatus_STATUS(source.BlobRestoreStatus) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_BlobRestoreStatus_STATUS() to populate field BlobRestoreStatus") + } + account.BlobRestoreStatus = &blobRestoreStatus + } else { + account.BlobRestoreStatus = nil + } + + // Conditions + account.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // CreationTime + account.CreationTime = genruntime.ClonePointerToString(source.CreationTime) + + // CustomDomain + if source.CustomDomain != nil { + var customDomain CustomDomain_STATUS + err := customDomain.AssignProperties_From_CustomDomain_STATUS(source.CustomDomain) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CustomDomain_STATUS() to populate field CustomDomain") + } + account.CustomDomain = &customDomain + } else { + account.CustomDomain = nil + } + + // DefaultToOAuthAuthentication + if source.DefaultToOAuthAuthentication != nil { + defaultToOAuthAuthentication := *source.DefaultToOAuthAuthentication + account.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication + } else { + account.DefaultToOAuthAuthentication = nil + } + + // DnsEndpointType + if source.DnsEndpointType != nil { + dnsEndpointType := StorageAccountProperties_DnsEndpointType_STATUS(*source.DnsEndpointType) + account.DnsEndpointType = &dnsEndpointType + } else { + account.DnsEndpointType = nil + } + + // Encryption + if source.Encryption != nil { + var encryption Encryption_STATUS + err := encryption.AssignProperties_From_Encryption_STATUS(source.Encryption) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Encryption_STATUS() to populate field Encryption") + } + account.Encryption = &encryption + } else { + account.Encryption = nil + } + + // ExtendedLocation + if source.ExtendedLocation != nil { + var extendedLocation ExtendedLocation_STATUS + err := extendedLocation.AssignProperties_From_ExtendedLocation_STATUS(source.ExtendedLocation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ExtendedLocation_STATUS() to populate field ExtendedLocation") + } + account.ExtendedLocation = &extendedLocation + } else { + account.ExtendedLocation = nil + } + + // FailoverInProgress + if source.FailoverInProgress != nil { + failoverInProgress := *source.FailoverInProgress + account.FailoverInProgress = &failoverInProgress + } else { + account.FailoverInProgress = nil + } + + // GeoReplicationStats + if source.GeoReplicationStats != nil { + var geoReplicationStat GeoReplicationStats_STATUS + err := geoReplicationStat.AssignProperties_From_GeoReplicationStats_STATUS(source.GeoReplicationStats) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_GeoReplicationStats_STATUS() to populate field GeoReplicationStats") + } + account.GeoReplicationStats = &geoReplicationStat + } else { + account.GeoReplicationStats = nil + } + + // Id + account.Id = genruntime.ClonePointerToString(source.Id) + + // Identity + if source.Identity != nil { + var identity Identity_STATUS + err := identity.AssignProperties_From_Identity_STATUS(source.Identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Identity_STATUS() to populate field Identity") + } + account.Identity = &identity + } else { + account.Identity = nil + } + + // ImmutableStorageWithVersioning + if source.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning ImmutableStorageAccount_STATUS + err := immutableStorageWithVersioning.AssignProperties_From_ImmutableStorageAccount_STATUS(source.ImmutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ImmutableStorageAccount_STATUS() to populate field ImmutableStorageWithVersioning") + } + account.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + account.ImmutableStorageWithVersioning = nil + } + + // IsHnsEnabled + if source.IsHnsEnabled != nil { + isHnsEnabled := *source.IsHnsEnabled + account.IsHnsEnabled = &isHnsEnabled + } else { + account.IsHnsEnabled = nil + } + + // IsLocalUserEnabled + if source.IsLocalUserEnabled != nil { + isLocalUserEnabled := *source.IsLocalUserEnabled + account.IsLocalUserEnabled = &isLocalUserEnabled + } else { + account.IsLocalUserEnabled = nil + } + + // IsNfsV3Enabled + if source.IsNfsV3Enabled != nil { + isNfsV3Enabled := *source.IsNfsV3Enabled + account.IsNfsV3Enabled = &isNfsV3Enabled + } else { + account.IsNfsV3Enabled = nil + } + + // IsSftpEnabled + if source.IsSftpEnabled != nil { + isSftpEnabled := *source.IsSftpEnabled + account.IsSftpEnabled = &isSftpEnabled + } else { + account.IsSftpEnabled = nil + } + + // IsSkuConversionBlocked + if source.IsSkuConversionBlocked != nil { + isSkuConversionBlocked := *source.IsSkuConversionBlocked + account.IsSkuConversionBlocked = &isSkuConversionBlocked + } else { + account.IsSkuConversionBlocked = nil + } + + // KeyCreationTime + if source.KeyCreationTime != nil { + var keyCreationTime KeyCreationTime_STATUS + err := keyCreationTime.AssignProperties_From_KeyCreationTime_STATUS(source.KeyCreationTime) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyCreationTime_STATUS() to populate field KeyCreationTime") + } + account.KeyCreationTime = &keyCreationTime + } else { + account.KeyCreationTime = nil + } + + // KeyPolicy + if source.KeyPolicy != nil { + var keyPolicy KeyPolicy_STATUS + err := keyPolicy.AssignProperties_From_KeyPolicy_STATUS(source.KeyPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyPolicy_STATUS() to populate field KeyPolicy") + } + account.KeyPolicy = &keyPolicy + } else { + account.KeyPolicy = nil + } + + // Kind + if source.Kind != nil { + kind := StorageAccount_Kind_STATUS(*source.Kind) + account.Kind = &kind + } else { + account.Kind = nil + } + + // LargeFileSharesState + if source.LargeFileSharesState != nil { + largeFileSharesState := StorageAccountProperties_LargeFileSharesState_STATUS(*source.LargeFileSharesState) + account.LargeFileSharesState = &largeFileSharesState + } else { + account.LargeFileSharesState = nil + } + + // LastGeoFailoverTime + account.LastGeoFailoverTime = genruntime.ClonePointerToString(source.LastGeoFailoverTime) + + // Location + account.Location = genruntime.ClonePointerToString(source.Location) + + // MinimumTlsVersion + if source.MinimumTlsVersion != nil { + minimumTlsVersion := StorageAccountProperties_MinimumTlsVersion_STATUS(*source.MinimumTlsVersion) + account.MinimumTlsVersion = &minimumTlsVersion + } else { + account.MinimumTlsVersion = nil + } + + // Name + account.Name = genruntime.ClonePointerToString(source.Name) + + // NetworkAcls + if source.NetworkAcls != nil { + var networkAcl NetworkRuleSet_STATUS + err := networkAcl.AssignProperties_From_NetworkRuleSet_STATUS(source.NetworkAcls) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_NetworkRuleSet_STATUS() to populate field NetworkAcls") + } + account.NetworkAcls = &networkAcl + } else { + account.NetworkAcls = nil + } + + // PrimaryEndpoints + if source.PrimaryEndpoints != nil { + var primaryEndpoint Endpoints_STATUS + err := primaryEndpoint.AssignProperties_From_Endpoints_STATUS(source.PrimaryEndpoints) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Endpoints_STATUS() to populate field PrimaryEndpoints") + } + account.PrimaryEndpoints = &primaryEndpoint + } else { + account.PrimaryEndpoints = nil + } + + // PrimaryLocation + account.PrimaryLocation = genruntime.ClonePointerToString(source.PrimaryLocation) + + // PrivateEndpointConnections + if source.PrivateEndpointConnections != nil { + privateEndpointConnectionList := make([]PrivateEndpointConnection_STATUS, len(source.PrivateEndpointConnections)) + for privateEndpointConnectionIndex, privateEndpointConnectionItem := range source.PrivateEndpointConnections { + // Shadow the loop variable to avoid aliasing + privateEndpointConnectionItem := privateEndpointConnectionItem + var privateEndpointConnection PrivateEndpointConnection_STATUS + err := privateEndpointConnection.AssignProperties_From_PrivateEndpointConnection_STATUS(&privateEndpointConnectionItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_PrivateEndpointConnection_STATUS() to populate field PrivateEndpointConnections") + } + privateEndpointConnectionList[privateEndpointConnectionIndex] = privateEndpointConnection + } + account.PrivateEndpointConnections = privateEndpointConnectionList + } else { + account.PrivateEndpointConnections = nil + } + + // ProvisioningState + if source.ProvisioningState != nil { + provisioningState := StorageAccountProperties_ProvisioningState_STATUS(*source.ProvisioningState) + account.ProvisioningState = &provisioningState + } else { + account.ProvisioningState = nil + } + + // PublicNetworkAccess + if source.PublicNetworkAccess != nil { + publicNetworkAccess := StorageAccountProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) + account.PublicNetworkAccess = &publicNetworkAccess + } else { + account.PublicNetworkAccess = nil + } + + // RoutingPreference + if source.RoutingPreference != nil { + var routingPreference RoutingPreference_STATUS + err := routingPreference.AssignProperties_From_RoutingPreference_STATUS(source.RoutingPreference) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_RoutingPreference_STATUS() to populate field RoutingPreference") + } + account.RoutingPreference = &routingPreference + } else { + account.RoutingPreference = nil + } + + // SasPolicy + if source.SasPolicy != nil { + var sasPolicy SasPolicy_STATUS + err := sasPolicy.AssignProperties_From_SasPolicy_STATUS(source.SasPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SasPolicy_STATUS() to populate field SasPolicy") + } + account.SasPolicy = &sasPolicy + } else { + account.SasPolicy = nil + } + + // SecondaryEndpoints + if source.SecondaryEndpoints != nil { + var secondaryEndpoint Endpoints_STATUS + err := secondaryEndpoint.AssignProperties_From_Endpoints_STATUS(source.SecondaryEndpoints) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Endpoints_STATUS() to populate field SecondaryEndpoints") + } + account.SecondaryEndpoints = &secondaryEndpoint + } else { + account.SecondaryEndpoints = nil + } + + // SecondaryLocation + account.SecondaryLocation = genruntime.ClonePointerToString(source.SecondaryLocation) + + // Sku + if source.Sku != nil { + var sku Sku_STATUS + err := sku.AssignProperties_From_Sku_STATUS(source.Sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Sku_STATUS() to populate field Sku") + } + account.Sku = &sku + } else { + account.Sku = nil + } + + // StatusOfPrimary + if source.StatusOfPrimary != nil { + statusOfPrimary := StorageAccountProperties_StatusOfPrimary_STATUS(*source.StatusOfPrimary) + account.StatusOfPrimary = &statusOfPrimary + } else { + account.StatusOfPrimary = nil + } + + // StatusOfSecondary + if source.StatusOfSecondary != nil { + statusOfSecondary := StorageAccountProperties_StatusOfSecondary_STATUS(*source.StatusOfSecondary) + account.StatusOfSecondary = &statusOfSecondary + } else { + account.StatusOfSecondary = nil + } + + // StorageAccountSkuConversionStatus + if source.StorageAccountSkuConversionStatus != nil { + var storageAccountSkuConversionStatus StorageAccountSkuConversionStatus_STATUS + err := storageAccountSkuConversionStatus.AssignProperties_From_StorageAccountSkuConversionStatus_STATUS(source.StorageAccountSkuConversionStatus) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccountSkuConversionStatus_STATUS() to populate field StorageAccountSkuConversionStatus") + } + account.StorageAccountSkuConversionStatus = &storageAccountSkuConversionStatus + } else { + account.StorageAccountSkuConversionStatus = nil + } + + // SupportsHttpsTrafficOnly + if source.SupportsHttpsTrafficOnly != nil { + supportsHttpsTrafficOnly := *source.SupportsHttpsTrafficOnly + account.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly + } else { + account.SupportsHttpsTrafficOnly = nil + } + + // Tags + account.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // Type + account.Type = genruntime.ClonePointerToString(source.Type) + + // No error + return nil +} + +// AssignProperties_To_StorageAccount_STATUS populates the provided destination StorageAccount_STATUS from our StorageAccount_STATUS +func (account *StorageAccount_STATUS) AssignProperties_To_StorageAccount_STATUS(destination *v20230101s.StorageAccount_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AccessTier + if account.AccessTier != nil { + accessTier := string(*account.AccessTier) + destination.AccessTier = &accessTier + } else { + destination.AccessTier = nil + } + + // AccountMigrationInProgress + if account.AccountMigrationInProgress != nil { + accountMigrationInProgress := *account.AccountMigrationInProgress + destination.AccountMigrationInProgress = &accountMigrationInProgress + } else { + destination.AccountMigrationInProgress = nil + } + + // AllowBlobPublicAccess + if account.AllowBlobPublicAccess != nil { + allowBlobPublicAccess := *account.AllowBlobPublicAccess + destination.AllowBlobPublicAccess = &allowBlobPublicAccess + } else { + destination.AllowBlobPublicAccess = nil + } + + // AllowCrossTenantReplication + if account.AllowCrossTenantReplication != nil { + allowCrossTenantReplication := *account.AllowCrossTenantReplication + destination.AllowCrossTenantReplication = &allowCrossTenantReplication + } else { + destination.AllowCrossTenantReplication = nil + } + + // AllowSharedKeyAccess + if account.AllowSharedKeyAccess != nil { + allowSharedKeyAccess := *account.AllowSharedKeyAccess + destination.AllowSharedKeyAccess = &allowSharedKeyAccess + } else { + destination.AllowSharedKeyAccess = nil + } + + // AllowedCopyScope + if account.AllowedCopyScope != nil { + allowedCopyScope := string(*account.AllowedCopyScope) + destination.AllowedCopyScope = &allowedCopyScope + } else { + destination.AllowedCopyScope = nil + } + + // AzureFilesIdentityBasedAuthentication + if account.AzureFilesIdentityBasedAuthentication != nil { + var azureFilesIdentityBasedAuthentication v20230101s.AzureFilesIdentityBasedAuthentication_STATUS + err := account.AzureFilesIdentityBasedAuthentication.AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS(&azureFilesIdentityBasedAuthentication) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS() to populate field AzureFilesIdentityBasedAuthentication") + } + destination.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication + } else { + destination.AzureFilesIdentityBasedAuthentication = nil + } + + // BlobRestoreStatus + if account.BlobRestoreStatus != nil { + var blobRestoreStatus v20230101s.BlobRestoreStatus_STATUS + err := account.BlobRestoreStatus.AssignProperties_To_BlobRestoreStatus_STATUS(&blobRestoreStatus) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_BlobRestoreStatus_STATUS() to populate field BlobRestoreStatus") + } + destination.BlobRestoreStatus = &blobRestoreStatus + } else { + destination.BlobRestoreStatus = nil + } + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(account.Conditions) + + // CreationTime + destination.CreationTime = genruntime.ClonePointerToString(account.CreationTime) + + // CustomDomain + if account.CustomDomain != nil { + var customDomain v20230101s.CustomDomain_STATUS + err := account.CustomDomain.AssignProperties_To_CustomDomain_STATUS(&customDomain) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CustomDomain_STATUS() to populate field CustomDomain") + } + destination.CustomDomain = &customDomain + } else { + destination.CustomDomain = nil + } + + // DefaultToOAuthAuthentication + if account.DefaultToOAuthAuthentication != nil { + defaultToOAuthAuthentication := *account.DefaultToOAuthAuthentication + destination.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication + } else { + destination.DefaultToOAuthAuthentication = nil + } + + // DnsEndpointType + if account.DnsEndpointType != nil { + dnsEndpointType := string(*account.DnsEndpointType) + destination.DnsEndpointType = &dnsEndpointType + } else { + destination.DnsEndpointType = nil + } + + // Encryption + if account.Encryption != nil { + var encryption v20230101s.Encryption_STATUS + err := account.Encryption.AssignProperties_To_Encryption_STATUS(&encryption) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Encryption_STATUS() to populate field Encryption") + } + destination.Encryption = &encryption + } else { + destination.Encryption = nil + } + + // ExtendedLocation + if account.ExtendedLocation != nil { + var extendedLocation v20230101s.ExtendedLocation_STATUS + err := account.ExtendedLocation.AssignProperties_To_ExtendedLocation_STATUS(&extendedLocation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ExtendedLocation_STATUS() to populate field ExtendedLocation") + } + destination.ExtendedLocation = &extendedLocation + } else { + destination.ExtendedLocation = nil + } + + // FailoverInProgress + if account.FailoverInProgress != nil { + failoverInProgress := *account.FailoverInProgress + destination.FailoverInProgress = &failoverInProgress + } else { + destination.FailoverInProgress = nil + } + + // GeoReplicationStats + if account.GeoReplicationStats != nil { + var geoReplicationStat v20230101s.GeoReplicationStats_STATUS + err := account.GeoReplicationStats.AssignProperties_To_GeoReplicationStats_STATUS(&geoReplicationStat) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_GeoReplicationStats_STATUS() to populate field GeoReplicationStats") + } + destination.GeoReplicationStats = &geoReplicationStat + } else { + destination.GeoReplicationStats = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(account.Id) + + // Identity + if account.Identity != nil { + var identity v20230101s.Identity_STATUS + err := account.Identity.AssignProperties_To_Identity_STATUS(&identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Identity_STATUS() to populate field Identity") + } + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // ImmutableStorageWithVersioning + if account.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning v20230101s.ImmutableStorageAccount_STATUS + err := account.ImmutableStorageWithVersioning.AssignProperties_To_ImmutableStorageAccount_STATUS(&immutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ImmutableStorageAccount_STATUS() to populate field ImmutableStorageWithVersioning") + } + destination.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + destination.ImmutableStorageWithVersioning = nil + } + + // IsHnsEnabled + if account.IsHnsEnabled != nil { + isHnsEnabled := *account.IsHnsEnabled + destination.IsHnsEnabled = &isHnsEnabled + } else { + destination.IsHnsEnabled = nil + } + + // IsLocalUserEnabled + if account.IsLocalUserEnabled != nil { + isLocalUserEnabled := *account.IsLocalUserEnabled + destination.IsLocalUserEnabled = &isLocalUserEnabled + } else { + destination.IsLocalUserEnabled = nil + } + + // IsNfsV3Enabled + if account.IsNfsV3Enabled != nil { + isNfsV3Enabled := *account.IsNfsV3Enabled + destination.IsNfsV3Enabled = &isNfsV3Enabled + } else { + destination.IsNfsV3Enabled = nil + } + + // IsSftpEnabled + if account.IsSftpEnabled != nil { + isSftpEnabled := *account.IsSftpEnabled + destination.IsSftpEnabled = &isSftpEnabled + } else { + destination.IsSftpEnabled = nil + } + + // IsSkuConversionBlocked + if account.IsSkuConversionBlocked != nil { + isSkuConversionBlocked := *account.IsSkuConversionBlocked + destination.IsSkuConversionBlocked = &isSkuConversionBlocked + } else { + destination.IsSkuConversionBlocked = nil + } + + // KeyCreationTime + if account.KeyCreationTime != nil { + var keyCreationTime v20230101s.KeyCreationTime_STATUS + err := account.KeyCreationTime.AssignProperties_To_KeyCreationTime_STATUS(&keyCreationTime) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyCreationTime_STATUS() to populate field KeyCreationTime") + } + destination.KeyCreationTime = &keyCreationTime + } else { + destination.KeyCreationTime = nil + } + + // KeyPolicy + if account.KeyPolicy != nil { + var keyPolicy v20230101s.KeyPolicy_STATUS + err := account.KeyPolicy.AssignProperties_To_KeyPolicy_STATUS(&keyPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyPolicy_STATUS() to populate field KeyPolicy") + } + destination.KeyPolicy = &keyPolicy + } else { + destination.KeyPolicy = nil + } + + // Kind + if account.Kind != nil { + kind := string(*account.Kind) + destination.Kind = &kind + } else { + destination.Kind = nil + } + + // LargeFileSharesState + if account.LargeFileSharesState != nil { + largeFileSharesState := string(*account.LargeFileSharesState) + destination.LargeFileSharesState = &largeFileSharesState + } else { + destination.LargeFileSharesState = nil + } + + // LastGeoFailoverTime + destination.LastGeoFailoverTime = genruntime.ClonePointerToString(account.LastGeoFailoverTime) + + // Location + destination.Location = genruntime.ClonePointerToString(account.Location) + + // MinimumTlsVersion + if account.MinimumTlsVersion != nil { + minimumTlsVersion := string(*account.MinimumTlsVersion) + destination.MinimumTlsVersion = &minimumTlsVersion + } else { + destination.MinimumTlsVersion = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(account.Name) + + // NetworkAcls + if account.NetworkAcls != nil { + var networkAcl v20230101s.NetworkRuleSet_STATUS + err := account.NetworkAcls.AssignProperties_To_NetworkRuleSet_STATUS(&networkAcl) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_NetworkRuleSet_STATUS() to populate field NetworkAcls") + } + destination.NetworkAcls = &networkAcl + } else { + destination.NetworkAcls = nil + } + + // PrimaryEndpoints + if account.PrimaryEndpoints != nil { + var primaryEndpoint v20230101s.Endpoints_STATUS + err := account.PrimaryEndpoints.AssignProperties_To_Endpoints_STATUS(&primaryEndpoint) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Endpoints_STATUS() to populate field PrimaryEndpoints") + } + destination.PrimaryEndpoints = &primaryEndpoint + } else { + destination.PrimaryEndpoints = nil + } + + // PrimaryLocation + destination.PrimaryLocation = genruntime.ClonePointerToString(account.PrimaryLocation) + + // PrivateEndpointConnections + if account.PrivateEndpointConnections != nil { + privateEndpointConnectionList := make([]v20230101s.PrivateEndpointConnection_STATUS, len(account.PrivateEndpointConnections)) + for privateEndpointConnectionIndex, privateEndpointConnectionItem := range account.PrivateEndpointConnections { + // Shadow the loop variable to avoid aliasing + privateEndpointConnectionItem := privateEndpointConnectionItem + var privateEndpointConnection v20230101s.PrivateEndpointConnection_STATUS + err := privateEndpointConnectionItem.AssignProperties_To_PrivateEndpointConnection_STATUS(&privateEndpointConnection) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_PrivateEndpointConnection_STATUS() to populate field PrivateEndpointConnections") + } + privateEndpointConnectionList[privateEndpointConnectionIndex] = privateEndpointConnection + } + destination.PrivateEndpointConnections = privateEndpointConnectionList + } else { + destination.PrivateEndpointConnections = nil + } + + // ProvisioningState + if account.ProvisioningState != nil { + provisioningState := string(*account.ProvisioningState) + destination.ProvisioningState = &provisioningState + } else { + destination.ProvisioningState = nil + } + + // PublicNetworkAccess + if account.PublicNetworkAccess != nil { + publicNetworkAccess := string(*account.PublicNetworkAccess) + destination.PublicNetworkAccess = &publicNetworkAccess + } else { + destination.PublicNetworkAccess = nil + } + + // RoutingPreference + if account.RoutingPreference != nil { + var routingPreference v20230101s.RoutingPreference_STATUS + err := account.RoutingPreference.AssignProperties_To_RoutingPreference_STATUS(&routingPreference) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_RoutingPreference_STATUS() to populate field RoutingPreference") + } + destination.RoutingPreference = &routingPreference + } else { + destination.RoutingPreference = nil + } + + // SasPolicy + if account.SasPolicy != nil { + var sasPolicy v20230101s.SasPolicy_STATUS + err := account.SasPolicy.AssignProperties_To_SasPolicy_STATUS(&sasPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SasPolicy_STATUS() to populate field SasPolicy") + } + destination.SasPolicy = &sasPolicy + } else { + destination.SasPolicy = nil + } + + // SecondaryEndpoints + if account.SecondaryEndpoints != nil { + var secondaryEndpoint v20230101s.Endpoints_STATUS + err := account.SecondaryEndpoints.AssignProperties_To_Endpoints_STATUS(&secondaryEndpoint) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Endpoints_STATUS() to populate field SecondaryEndpoints") + } + destination.SecondaryEndpoints = &secondaryEndpoint + } else { + destination.SecondaryEndpoints = nil + } + + // SecondaryLocation + destination.SecondaryLocation = genruntime.ClonePointerToString(account.SecondaryLocation) + + // Sku + if account.Sku != nil { + var sku v20230101s.Sku_STATUS + err := account.Sku.AssignProperties_To_Sku_STATUS(&sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Sku_STATUS() to populate field Sku") + } + destination.Sku = &sku + } else { + destination.Sku = nil + } + + // StatusOfPrimary + if account.StatusOfPrimary != nil { + statusOfPrimary := string(*account.StatusOfPrimary) + destination.StatusOfPrimary = &statusOfPrimary + } else { + destination.StatusOfPrimary = nil + } + + // StatusOfSecondary + if account.StatusOfSecondary != nil { + statusOfSecondary := string(*account.StatusOfSecondary) + destination.StatusOfSecondary = &statusOfSecondary + } else { + destination.StatusOfSecondary = nil + } + + // StorageAccountSkuConversionStatus + if account.StorageAccountSkuConversionStatus != nil { + var storageAccountSkuConversionStatus v20230101s.StorageAccountSkuConversionStatus_STATUS + err := account.StorageAccountSkuConversionStatus.AssignProperties_To_StorageAccountSkuConversionStatus_STATUS(&storageAccountSkuConversionStatus) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccountSkuConversionStatus_STATUS() to populate field StorageAccountSkuConversionStatus") + } + destination.StorageAccountSkuConversionStatus = &storageAccountSkuConversionStatus + } else { + destination.StorageAccountSkuConversionStatus = nil + } + + // SupportsHttpsTrafficOnly + if account.SupportsHttpsTrafficOnly != nil { + supportsHttpsTrafficOnly := *account.SupportsHttpsTrafficOnly + destination.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly + } else { + destination.SupportsHttpsTrafficOnly = nil + } + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(account.Tags) + + // Type + destination.Type = genruntime.ClonePointerToString(account.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Settings for Azure Files identity based authentication. +type AzureFilesIdentityBasedAuthentication struct { + // ActiveDirectoryProperties: Required if directoryServiceOptions are AD, optional if they are AADKERB. + ActiveDirectoryProperties *ActiveDirectoryProperties `json:"activeDirectoryProperties,omitempty"` + + // DefaultSharePermission: Default share permission for users using Kerberos authentication if RBAC role is not assigned. + DefaultSharePermission *AzureFilesIdentityBasedAuthentication_DefaultSharePermission `json:"defaultSharePermission,omitempty"` + + // +kubebuilder:validation:Required + // DirectoryServiceOptions: Indicates the directory service used. Note that this enum may be extended in the future. + DirectoryServiceOptions *AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions `json:"directoryServiceOptions,omitempty"` +} + +var _ genruntime.ARMTransformer = &AzureFilesIdentityBasedAuthentication{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (authentication *AzureFilesIdentityBasedAuthentication) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if authentication == nil { + return nil, nil + } + result := &AzureFilesIdentityBasedAuthentication_ARM{} + + // Set property "ActiveDirectoryProperties": + if authentication.ActiveDirectoryProperties != nil { + activeDirectoryProperties_ARM, err := (*authentication.ActiveDirectoryProperties).ConvertToARM(resolved) + if err != nil { + return nil, err + } + activeDirectoryProperties := *activeDirectoryProperties_ARM.(*ActiveDirectoryProperties_ARM) + result.ActiveDirectoryProperties = &activeDirectoryProperties + } + + // Set property "DefaultSharePermission": + if authentication.DefaultSharePermission != nil { + defaultSharePermission := *authentication.DefaultSharePermission + result.DefaultSharePermission = &defaultSharePermission + } + + // Set property "DirectoryServiceOptions": + if authentication.DirectoryServiceOptions != nil { + directoryServiceOptions := *authentication.DirectoryServiceOptions + result.DirectoryServiceOptions = &directoryServiceOptions + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (authentication *AzureFilesIdentityBasedAuthentication) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &AzureFilesIdentityBasedAuthentication_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (authentication *AzureFilesIdentityBasedAuthentication) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(AzureFilesIdentityBasedAuthentication_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AzureFilesIdentityBasedAuthentication_ARM, got %T", armInput) + } + + // Set property "ActiveDirectoryProperties": + if typedInput.ActiveDirectoryProperties != nil { + var activeDirectoryProperties1 ActiveDirectoryProperties + err := activeDirectoryProperties1.PopulateFromARM(owner, *typedInput.ActiveDirectoryProperties) + if err != nil { + return err + } + activeDirectoryProperties := activeDirectoryProperties1 + authentication.ActiveDirectoryProperties = &activeDirectoryProperties + } + + // Set property "DefaultSharePermission": + if typedInput.DefaultSharePermission != nil { + defaultSharePermission := *typedInput.DefaultSharePermission + authentication.DefaultSharePermission = &defaultSharePermission + } + + // Set property "DirectoryServiceOptions": + if typedInput.DirectoryServiceOptions != nil { + directoryServiceOptions := *typedInput.DirectoryServiceOptions + authentication.DirectoryServiceOptions = &directoryServiceOptions + } + + // No error + return nil +} + +// AssignProperties_From_AzureFilesIdentityBasedAuthentication populates our AzureFilesIdentityBasedAuthentication from the provided source AzureFilesIdentityBasedAuthentication +func (authentication *AzureFilesIdentityBasedAuthentication) AssignProperties_From_AzureFilesIdentityBasedAuthentication(source *v20230101s.AzureFilesIdentityBasedAuthentication) error { + + // ActiveDirectoryProperties + if source.ActiveDirectoryProperties != nil { + var activeDirectoryProperty ActiveDirectoryProperties + err := activeDirectoryProperty.AssignProperties_From_ActiveDirectoryProperties(source.ActiveDirectoryProperties) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ActiveDirectoryProperties() to populate field ActiveDirectoryProperties") + } + authentication.ActiveDirectoryProperties = &activeDirectoryProperty + } else { + authentication.ActiveDirectoryProperties = nil + } + + // DefaultSharePermission + if source.DefaultSharePermission != nil { + defaultSharePermission := AzureFilesIdentityBasedAuthentication_DefaultSharePermission(*source.DefaultSharePermission) + authentication.DefaultSharePermission = &defaultSharePermission + } else { + authentication.DefaultSharePermission = nil + } + + // DirectoryServiceOptions + if source.DirectoryServiceOptions != nil { + directoryServiceOption := AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions(*source.DirectoryServiceOptions) + authentication.DirectoryServiceOptions = &directoryServiceOption + } else { + authentication.DirectoryServiceOptions = nil + } + + // No error + return nil +} + +// AssignProperties_To_AzureFilesIdentityBasedAuthentication populates the provided destination AzureFilesIdentityBasedAuthentication from our AzureFilesIdentityBasedAuthentication +func (authentication *AzureFilesIdentityBasedAuthentication) AssignProperties_To_AzureFilesIdentityBasedAuthentication(destination *v20230101s.AzureFilesIdentityBasedAuthentication) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ActiveDirectoryProperties + if authentication.ActiveDirectoryProperties != nil { + var activeDirectoryProperty v20230101s.ActiveDirectoryProperties + err := authentication.ActiveDirectoryProperties.AssignProperties_To_ActiveDirectoryProperties(&activeDirectoryProperty) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ActiveDirectoryProperties() to populate field ActiveDirectoryProperties") + } + destination.ActiveDirectoryProperties = &activeDirectoryProperty + } else { + destination.ActiveDirectoryProperties = nil + } + + // DefaultSharePermission + if authentication.DefaultSharePermission != nil { + defaultSharePermission := string(*authentication.DefaultSharePermission) + destination.DefaultSharePermission = &defaultSharePermission + } else { + destination.DefaultSharePermission = nil + } + + // DirectoryServiceOptions + if authentication.DirectoryServiceOptions != nil { + directoryServiceOption := string(*authentication.DirectoryServiceOptions) + destination.DirectoryServiceOptions = &directoryServiceOption + } else { + destination.DirectoryServiceOptions = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_AzureFilesIdentityBasedAuthentication_STATUS populates our AzureFilesIdentityBasedAuthentication from the provided source AzureFilesIdentityBasedAuthentication_STATUS +func (authentication *AzureFilesIdentityBasedAuthentication) Initialize_From_AzureFilesIdentityBasedAuthentication_STATUS(source *AzureFilesIdentityBasedAuthentication_STATUS) error { + + // ActiveDirectoryProperties + if source.ActiveDirectoryProperties != nil { + var activeDirectoryProperty ActiveDirectoryProperties + err := activeDirectoryProperty.Initialize_From_ActiveDirectoryProperties_STATUS(source.ActiveDirectoryProperties) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ActiveDirectoryProperties_STATUS() to populate field ActiveDirectoryProperties") + } + authentication.ActiveDirectoryProperties = &activeDirectoryProperty + } else { + authentication.ActiveDirectoryProperties = nil + } + + // DefaultSharePermission + if source.DefaultSharePermission != nil { + defaultSharePermission := AzureFilesIdentityBasedAuthentication_DefaultSharePermission(*source.DefaultSharePermission) + authentication.DefaultSharePermission = &defaultSharePermission + } else { + authentication.DefaultSharePermission = nil + } + + // DirectoryServiceOptions + if source.DirectoryServiceOptions != nil { + directoryServiceOption := AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions(*source.DirectoryServiceOptions) + authentication.DirectoryServiceOptions = &directoryServiceOption + } else { + authentication.DirectoryServiceOptions = nil + } + + // No error + return nil +} + +// Settings for Azure Files identity based authentication. +type AzureFilesIdentityBasedAuthentication_STATUS struct { + // ActiveDirectoryProperties: Required if directoryServiceOptions are AD, optional if they are AADKERB. + ActiveDirectoryProperties *ActiveDirectoryProperties_STATUS `json:"activeDirectoryProperties,omitempty"` + + // DefaultSharePermission: Default share permission for users using Kerberos authentication if RBAC role is not assigned. + DefaultSharePermission *AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS `json:"defaultSharePermission,omitempty"` + + // DirectoryServiceOptions: Indicates the directory service used. Note that this enum may be extended in the future. + DirectoryServiceOptions *AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS `json:"directoryServiceOptions,omitempty"` +} + +var _ genruntime.FromARMConverter = &AzureFilesIdentityBasedAuthentication_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &AzureFilesIdentityBasedAuthentication_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(AzureFilesIdentityBasedAuthentication_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AzureFilesIdentityBasedAuthentication_STATUS_ARM, got %T", armInput) + } + + // Set property "ActiveDirectoryProperties": + if typedInput.ActiveDirectoryProperties != nil { + var activeDirectoryProperties1 ActiveDirectoryProperties_STATUS + err := activeDirectoryProperties1.PopulateFromARM(owner, *typedInput.ActiveDirectoryProperties) + if err != nil { + return err + } + activeDirectoryProperties := activeDirectoryProperties1 + authentication.ActiveDirectoryProperties = &activeDirectoryProperties + } + + // Set property "DefaultSharePermission": + if typedInput.DefaultSharePermission != nil { + defaultSharePermission := *typedInput.DefaultSharePermission + authentication.DefaultSharePermission = &defaultSharePermission + } + + // Set property "DirectoryServiceOptions": + if typedInput.DirectoryServiceOptions != nil { + directoryServiceOptions := *typedInput.DirectoryServiceOptions + authentication.DirectoryServiceOptions = &directoryServiceOptions + } + + // No error + return nil +} + +// AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS populates our AzureFilesIdentityBasedAuthentication_STATUS from the provided source AzureFilesIdentityBasedAuthentication_STATUS +func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS(source *v20230101s.AzureFilesIdentityBasedAuthentication_STATUS) error { + + // ActiveDirectoryProperties + if source.ActiveDirectoryProperties != nil { + var activeDirectoryProperty ActiveDirectoryProperties_STATUS + err := activeDirectoryProperty.AssignProperties_From_ActiveDirectoryProperties_STATUS(source.ActiveDirectoryProperties) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ActiveDirectoryProperties_STATUS() to populate field ActiveDirectoryProperties") + } + authentication.ActiveDirectoryProperties = &activeDirectoryProperty + } else { + authentication.ActiveDirectoryProperties = nil + } + + // DefaultSharePermission + if source.DefaultSharePermission != nil { + defaultSharePermission := AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS(*source.DefaultSharePermission) + authentication.DefaultSharePermission = &defaultSharePermission + } else { + authentication.DefaultSharePermission = nil + } + + // DirectoryServiceOptions + if source.DirectoryServiceOptions != nil { + directoryServiceOption := AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS(*source.DirectoryServiceOptions) + authentication.DirectoryServiceOptions = &directoryServiceOption + } else { + authentication.DirectoryServiceOptions = nil + } + + // No error + return nil +} + +// AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS populates the provided destination AzureFilesIdentityBasedAuthentication_STATUS from our AzureFilesIdentityBasedAuthentication_STATUS +func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS(destination *v20230101s.AzureFilesIdentityBasedAuthentication_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ActiveDirectoryProperties + if authentication.ActiveDirectoryProperties != nil { + var activeDirectoryProperty v20230101s.ActiveDirectoryProperties_STATUS + err := authentication.ActiveDirectoryProperties.AssignProperties_To_ActiveDirectoryProperties_STATUS(&activeDirectoryProperty) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ActiveDirectoryProperties_STATUS() to populate field ActiveDirectoryProperties") + } + destination.ActiveDirectoryProperties = &activeDirectoryProperty + } else { + destination.ActiveDirectoryProperties = nil + } + + // DefaultSharePermission + if authentication.DefaultSharePermission != nil { + defaultSharePermission := string(*authentication.DefaultSharePermission) + destination.DefaultSharePermission = &defaultSharePermission + } else { + destination.DefaultSharePermission = nil + } + + // DirectoryServiceOptions + if authentication.DirectoryServiceOptions != nil { + directoryServiceOption := string(*authentication.DirectoryServiceOptions) + destination.DirectoryServiceOptions = &directoryServiceOption + } else { + destination.DirectoryServiceOptions = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Blob restore status. +type BlobRestoreStatus_STATUS struct { + // FailureReason: Failure reason when blob restore is failed. + FailureReason *string `json:"failureReason,omitempty"` + + // Parameters: Blob restore request parameters. + Parameters *BlobRestoreParameters_STATUS `json:"parameters,omitempty"` + + // RestoreId: Id for tracking blob restore request. + RestoreId *string `json:"restoreId,omitempty"` + + // Status: The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. + // - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed. + Status *BlobRestoreStatus_Status_STATUS `json:"status,omitempty"` +} + +var _ genruntime.FromARMConverter = &BlobRestoreStatus_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (status *BlobRestoreStatus_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &BlobRestoreStatus_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (status *BlobRestoreStatus_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(BlobRestoreStatus_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected BlobRestoreStatus_STATUS_ARM, got %T", armInput) + } + + // Set property "FailureReason": + if typedInput.FailureReason != nil { + failureReason := *typedInput.FailureReason + status.FailureReason = &failureReason + } + + // Set property "Parameters": + if typedInput.Parameters != nil { + var parameters1 BlobRestoreParameters_STATUS + err := parameters1.PopulateFromARM(owner, *typedInput.Parameters) + if err != nil { + return err + } + parameters := parameters1 + status.Parameters = ¶meters + } + + // Set property "RestoreId": + if typedInput.RestoreId != nil { + restoreId := *typedInput.RestoreId + status.RestoreId = &restoreId + } + + // Set property "Status": + if typedInput.Status != nil { + status1 := *typedInput.Status + status.Status = &status1 + } + + // No error + return nil +} + +// AssignProperties_From_BlobRestoreStatus_STATUS populates our BlobRestoreStatus_STATUS from the provided source BlobRestoreStatus_STATUS +func (status *BlobRestoreStatus_STATUS) AssignProperties_From_BlobRestoreStatus_STATUS(source *v20230101s.BlobRestoreStatus_STATUS) error { + + // FailureReason + status.FailureReason = genruntime.ClonePointerToString(source.FailureReason) + + // Parameters + if source.Parameters != nil { + var parameter BlobRestoreParameters_STATUS + err := parameter.AssignProperties_From_BlobRestoreParameters_STATUS(source.Parameters) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_BlobRestoreParameters_STATUS() to populate field Parameters") + } + status.Parameters = ¶meter + } else { + status.Parameters = nil + } + + // RestoreId + status.RestoreId = genruntime.ClonePointerToString(source.RestoreId) + + // Status + if source.Status != nil { + statusTemp := BlobRestoreStatus_Status_STATUS(*source.Status) + status.Status = &statusTemp + } else { + status.Status = nil + } + + // No error + return nil +} + +// AssignProperties_To_BlobRestoreStatus_STATUS populates the provided destination BlobRestoreStatus_STATUS from our BlobRestoreStatus_STATUS +func (status *BlobRestoreStatus_STATUS) AssignProperties_To_BlobRestoreStatus_STATUS(destination *v20230101s.BlobRestoreStatus_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // FailureReason + destination.FailureReason = genruntime.ClonePointerToString(status.FailureReason) + + // Parameters + if status.Parameters != nil { + var parameter v20230101s.BlobRestoreParameters_STATUS + err := status.Parameters.AssignProperties_To_BlobRestoreParameters_STATUS(¶meter) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_BlobRestoreParameters_STATUS() to populate field Parameters") + } + destination.Parameters = ¶meter + } else { + destination.Parameters = nil + } + + // RestoreId + destination.RestoreId = genruntime.ClonePointerToString(status.RestoreId) + + // Status + if status.Status != nil { + statusTemp := string(*status.Status) + destination.Status = &statusTemp + } else { + destination.Status = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The custom domain assigned to this storage account. This can be set via Update. +type CustomDomain struct { + // +kubebuilder:validation:Required + // Name: Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. + Name *string `json:"name,omitempty"` + + // UseSubDomainName: Indicates whether indirect CName validation is enabled. Default value is false. This should only be + // set on updates. + UseSubDomainName *bool `json:"useSubDomainName,omitempty"` +} + +var _ genruntime.ARMTransformer = &CustomDomain{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (domain *CustomDomain) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if domain == nil { + return nil, nil + } + result := &CustomDomain_ARM{} + + // Set property "Name": + if domain.Name != nil { + name := *domain.Name + result.Name = &name + } + + // Set property "UseSubDomainName": + if domain.UseSubDomainName != nil { + useSubDomainName := *domain.UseSubDomainName + result.UseSubDomainName = &useSubDomainName + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (domain *CustomDomain) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &CustomDomain_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (domain *CustomDomain) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(CustomDomain_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected CustomDomain_ARM, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + domain.Name = &name + } + + // Set property "UseSubDomainName": + if typedInput.UseSubDomainName != nil { + useSubDomainName := *typedInput.UseSubDomainName + domain.UseSubDomainName = &useSubDomainName + } + + // No error + return nil +} + +// AssignProperties_From_CustomDomain populates our CustomDomain from the provided source CustomDomain +func (domain *CustomDomain) AssignProperties_From_CustomDomain(source *v20230101s.CustomDomain) error { + + // Name + domain.Name = genruntime.ClonePointerToString(source.Name) + + // UseSubDomainName + if source.UseSubDomainName != nil { + useSubDomainName := *source.UseSubDomainName + domain.UseSubDomainName = &useSubDomainName + } else { + domain.UseSubDomainName = nil + } + + // No error + return nil +} + +// AssignProperties_To_CustomDomain populates the provided destination CustomDomain from our CustomDomain +func (domain *CustomDomain) AssignProperties_To_CustomDomain(destination *v20230101s.CustomDomain) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + destination.Name = genruntime.ClonePointerToString(domain.Name) + + // UseSubDomainName + if domain.UseSubDomainName != nil { + useSubDomainName := *domain.UseSubDomainName + destination.UseSubDomainName = &useSubDomainName + } else { + destination.UseSubDomainName = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_CustomDomain_STATUS populates our CustomDomain from the provided source CustomDomain_STATUS +func (domain *CustomDomain) Initialize_From_CustomDomain_STATUS(source *CustomDomain_STATUS) error { + + // Name + domain.Name = genruntime.ClonePointerToString(source.Name) + + // UseSubDomainName + if source.UseSubDomainName != nil { + useSubDomainName := *source.UseSubDomainName + domain.UseSubDomainName = &useSubDomainName + } else { + domain.UseSubDomainName = nil + } + + // No error + return nil +} + +// The custom domain assigned to this storage account. This can be set via Update. +type CustomDomain_STATUS struct { + // Name: Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. + Name *string `json:"name,omitempty"` + + // UseSubDomainName: Indicates whether indirect CName validation is enabled. Default value is false. This should only be + // set on updates. + UseSubDomainName *bool `json:"useSubDomainName,omitempty"` +} + +var _ genruntime.FromARMConverter = &CustomDomain_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (domain *CustomDomain_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &CustomDomain_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (domain *CustomDomain_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(CustomDomain_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected CustomDomain_STATUS_ARM, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + domain.Name = &name + } + + // Set property "UseSubDomainName": + if typedInput.UseSubDomainName != nil { + useSubDomainName := *typedInput.UseSubDomainName + domain.UseSubDomainName = &useSubDomainName + } + + // No error + return nil +} + +// AssignProperties_From_CustomDomain_STATUS populates our CustomDomain_STATUS from the provided source CustomDomain_STATUS +func (domain *CustomDomain_STATUS) AssignProperties_From_CustomDomain_STATUS(source *v20230101s.CustomDomain_STATUS) error { + + // Name + domain.Name = genruntime.ClonePointerToString(source.Name) + + // UseSubDomainName + if source.UseSubDomainName != nil { + useSubDomainName := *source.UseSubDomainName + domain.UseSubDomainName = &useSubDomainName + } else { + domain.UseSubDomainName = nil + } + + // No error + return nil +} + +// AssignProperties_To_CustomDomain_STATUS populates the provided destination CustomDomain_STATUS from our CustomDomain_STATUS +func (domain *CustomDomain_STATUS) AssignProperties_To_CustomDomain_STATUS(destination *v20230101s.CustomDomain_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + destination.Name = genruntime.ClonePointerToString(domain.Name) + + // UseSubDomainName + if domain.UseSubDomainName != nil { + useSubDomainName := *domain.UseSubDomainName + destination.UseSubDomainName = &useSubDomainName + } else { + destination.UseSubDomainName = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The encryption settings on the storage account. +type Encryption struct { + // Identity: The identity to be used with service-side encryption at rest. + Identity *EncryptionIdentity `json:"identity,omitempty"` + + // KeySource: The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, + // Microsoft.Keyvault + KeySource *Encryption_KeySource `json:"keySource,omitempty"` + + // Keyvaultproperties: Properties provided by key vault. + Keyvaultproperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"` + + // RequireInfrastructureEncryption: A boolean indicating whether or not the service applies a secondary layer of encryption + // with platform managed keys for data at rest. + RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` + + // Services: List of services which support encryption. + Services *EncryptionServices `json:"services,omitempty"` +} + +var _ genruntime.ARMTransformer = &Encryption{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (encryption *Encryption) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if encryption == nil { + return nil, nil + } + result := &Encryption_ARM{} + + // Set property "Identity": + if encryption.Identity != nil { + identity_ARM, err := (*encryption.Identity).ConvertToARM(resolved) + if err != nil { + return nil, err + } + identity := *identity_ARM.(*EncryptionIdentity_ARM) + result.Identity = &identity + } + + // Set property "KeySource": + if encryption.KeySource != nil { + keySource := *encryption.KeySource + result.KeySource = &keySource + } + + // Set property "Keyvaultproperties": + if encryption.Keyvaultproperties != nil { + keyvaultproperties_ARM, err := (*encryption.Keyvaultproperties).ConvertToARM(resolved) + if err != nil { + return nil, err + } + keyvaultproperties := *keyvaultproperties_ARM.(*KeyVaultProperties_ARM) + result.Keyvaultproperties = &keyvaultproperties + } + + // Set property "RequireInfrastructureEncryption": + if encryption.RequireInfrastructureEncryption != nil { + requireInfrastructureEncryption := *encryption.RequireInfrastructureEncryption + result.RequireInfrastructureEncryption = &requireInfrastructureEncryption + } + + // Set property "Services": + if encryption.Services != nil { + services_ARM, err := (*encryption.Services).ConvertToARM(resolved) + if err != nil { + return nil, err + } + services := *services_ARM.(*EncryptionServices_ARM) + result.Services = &services + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (encryption *Encryption) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &Encryption_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (encryption *Encryption) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Encryption_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Encryption_ARM, got %T", armInput) + } + + // Set property "Identity": + if typedInput.Identity != nil { + var identity1 EncryptionIdentity + err := identity1.PopulateFromARM(owner, *typedInput.Identity) + if err != nil { + return err + } + identity := identity1 + encryption.Identity = &identity + } + + // Set property "KeySource": + if typedInput.KeySource != nil { + keySource := *typedInput.KeySource + encryption.KeySource = &keySource + } + + // Set property "Keyvaultproperties": + if typedInput.Keyvaultproperties != nil { + var keyvaultproperties1 KeyVaultProperties + err := keyvaultproperties1.PopulateFromARM(owner, *typedInput.Keyvaultproperties) + if err != nil { + return err + } + keyvaultproperties := keyvaultproperties1 + encryption.Keyvaultproperties = &keyvaultproperties + } + + // Set property "RequireInfrastructureEncryption": + if typedInput.RequireInfrastructureEncryption != nil { + requireInfrastructureEncryption := *typedInput.RequireInfrastructureEncryption + encryption.RequireInfrastructureEncryption = &requireInfrastructureEncryption + } + + // Set property "Services": + if typedInput.Services != nil { + var services1 EncryptionServices + err := services1.PopulateFromARM(owner, *typedInput.Services) + if err != nil { + return err + } + services := services1 + encryption.Services = &services + } + + // No error + return nil +} + +// AssignProperties_From_Encryption populates our Encryption from the provided source Encryption +func (encryption *Encryption) AssignProperties_From_Encryption(source *v20230101s.Encryption) error { + + // Identity + if source.Identity != nil { + var identity EncryptionIdentity + err := identity.AssignProperties_From_EncryptionIdentity(source.Identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionIdentity() to populate field Identity") + } + encryption.Identity = &identity + } else { + encryption.Identity = nil + } + + // KeySource + if source.KeySource != nil { + keySource := Encryption_KeySource(*source.KeySource) + encryption.KeySource = &keySource + } else { + encryption.KeySource = nil + } + + // Keyvaultproperties + if source.Keyvaultproperties != nil { + var keyvaultproperty KeyVaultProperties + err := keyvaultproperty.AssignProperties_From_KeyVaultProperties(source.Keyvaultproperties) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyVaultProperties() to populate field Keyvaultproperties") + } + encryption.Keyvaultproperties = &keyvaultproperty + } else { + encryption.Keyvaultproperties = nil + } + + // RequireInfrastructureEncryption + if source.RequireInfrastructureEncryption != nil { + requireInfrastructureEncryption := *source.RequireInfrastructureEncryption + encryption.RequireInfrastructureEncryption = &requireInfrastructureEncryption + } else { + encryption.RequireInfrastructureEncryption = nil + } + + // Services + if source.Services != nil { + var service EncryptionServices + err := service.AssignProperties_From_EncryptionServices(source.Services) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionServices() to populate field Services") + } + encryption.Services = &service + } else { + encryption.Services = nil + } + + // No error + return nil +} + +// AssignProperties_To_Encryption populates the provided destination Encryption from our Encryption +func (encryption *Encryption) AssignProperties_To_Encryption(destination *v20230101s.Encryption) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Identity + if encryption.Identity != nil { + var identity v20230101s.EncryptionIdentity + err := encryption.Identity.AssignProperties_To_EncryptionIdentity(&identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionIdentity() to populate field Identity") + } + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // KeySource + if encryption.KeySource != nil { + keySource := string(*encryption.KeySource) + destination.KeySource = &keySource + } else { + destination.KeySource = nil + } + + // Keyvaultproperties + if encryption.Keyvaultproperties != nil { + var keyvaultproperty v20230101s.KeyVaultProperties + err := encryption.Keyvaultproperties.AssignProperties_To_KeyVaultProperties(&keyvaultproperty) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyVaultProperties() to populate field Keyvaultproperties") + } + destination.Keyvaultproperties = &keyvaultproperty + } else { + destination.Keyvaultproperties = nil + } + + // RequireInfrastructureEncryption + if encryption.RequireInfrastructureEncryption != nil { + requireInfrastructureEncryption := *encryption.RequireInfrastructureEncryption + destination.RequireInfrastructureEncryption = &requireInfrastructureEncryption + } else { + destination.RequireInfrastructureEncryption = nil + } + + // Services + if encryption.Services != nil { + var service v20230101s.EncryptionServices + err := encryption.Services.AssignProperties_To_EncryptionServices(&service) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionServices() to populate field Services") + } + destination.Services = &service + } else { + destination.Services = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_Encryption_STATUS populates our Encryption from the provided source Encryption_STATUS +func (encryption *Encryption) Initialize_From_Encryption_STATUS(source *Encryption_STATUS) error { + + // Identity + if source.Identity != nil { + var identity EncryptionIdentity + err := identity.Initialize_From_EncryptionIdentity_STATUS(source.Identity) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_EncryptionIdentity_STATUS() to populate field Identity") + } + encryption.Identity = &identity + } else { + encryption.Identity = nil + } + + // KeySource + if source.KeySource != nil { + keySource := Encryption_KeySource(*source.KeySource) + encryption.KeySource = &keySource + } else { + encryption.KeySource = nil + } + + // Keyvaultproperties + if source.Keyvaultproperties != nil { + var keyvaultproperty KeyVaultProperties + err := keyvaultproperty.Initialize_From_KeyVaultProperties_STATUS(source.Keyvaultproperties) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_KeyVaultProperties_STATUS() to populate field Keyvaultproperties") + } + encryption.Keyvaultproperties = &keyvaultproperty + } else { + encryption.Keyvaultproperties = nil + } + + // RequireInfrastructureEncryption + if source.RequireInfrastructureEncryption != nil { + requireInfrastructureEncryption := *source.RequireInfrastructureEncryption + encryption.RequireInfrastructureEncryption = &requireInfrastructureEncryption + } else { + encryption.RequireInfrastructureEncryption = nil + } + + // Services + if source.Services != nil { + var service EncryptionServices + err := service.Initialize_From_EncryptionServices_STATUS(source.Services) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_EncryptionServices_STATUS() to populate field Services") + } + encryption.Services = &service + } else { + encryption.Services = nil + } + + // No error + return nil +} + +// The encryption settings on the storage account. +type Encryption_STATUS struct { + // Identity: The identity to be used with service-side encryption at rest. + Identity *EncryptionIdentity_STATUS `json:"identity,omitempty"` + + // KeySource: The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, + // Microsoft.Keyvault + KeySource *Encryption_KeySource_STATUS `json:"keySource,omitempty"` + + // Keyvaultproperties: Properties provided by key vault. + Keyvaultproperties *KeyVaultProperties_STATUS `json:"keyvaultproperties,omitempty"` + + // RequireInfrastructureEncryption: A boolean indicating whether or not the service applies a secondary layer of encryption + // with platform managed keys for data at rest. + RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` + + // Services: List of services which support encryption. + Services *EncryptionServices_STATUS `json:"services,omitempty"` +} + +var _ genruntime.FromARMConverter = &Encryption_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (encryption *Encryption_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &Encryption_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (encryption *Encryption_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Encryption_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Encryption_STATUS_ARM, got %T", armInput) + } + + // Set property "Identity": + if typedInput.Identity != nil { + var identity1 EncryptionIdentity_STATUS + err := identity1.PopulateFromARM(owner, *typedInput.Identity) + if err != nil { + return err + } + identity := identity1 + encryption.Identity = &identity + } + + // Set property "KeySource": + if typedInput.KeySource != nil { + keySource := *typedInput.KeySource + encryption.KeySource = &keySource + } + + // Set property "Keyvaultproperties": + if typedInput.Keyvaultproperties != nil { + var keyvaultproperties1 KeyVaultProperties_STATUS + err := keyvaultproperties1.PopulateFromARM(owner, *typedInput.Keyvaultproperties) + if err != nil { + return err + } + keyvaultproperties := keyvaultproperties1 + encryption.Keyvaultproperties = &keyvaultproperties + } + + // Set property "RequireInfrastructureEncryption": + if typedInput.RequireInfrastructureEncryption != nil { + requireInfrastructureEncryption := *typedInput.RequireInfrastructureEncryption + encryption.RequireInfrastructureEncryption = &requireInfrastructureEncryption + } + + // Set property "Services": + if typedInput.Services != nil { + var services1 EncryptionServices_STATUS + err := services1.PopulateFromARM(owner, *typedInput.Services) + if err != nil { + return err + } + services := services1 + encryption.Services = &services + } + + // No error + return nil +} + +// AssignProperties_From_Encryption_STATUS populates our Encryption_STATUS from the provided source Encryption_STATUS +func (encryption *Encryption_STATUS) AssignProperties_From_Encryption_STATUS(source *v20230101s.Encryption_STATUS) error { + + // Identity + if source.Identity != nil { + var identity EncryptionIdentity_STATUS + err := identity.AssignProperties_From_EncryptionIdentity_STATUS(source.Identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionIdentity_STATUS() to populate field Identity") + } + encryption.Identity = &identity + } else { + encryption.Identity = nil + } + + // KeySource + if source.KeySource != nil { + keySource := Encryption_KeySource_STATUS(*source.KeySource) + encryption.KeySource = &keySource + } else { + encryption.KeySource = nil + } + + // Keyvaultproperties + if source.Keyvaultproperties != nil { + var keyvaultproperty KeyVaultProperties_STATUS + err := keyvaultproperty.AssignProperties_From_KeyVaultProperties_STATUS(source.Keyvaultproperties) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyVaultProperties_STATUS() to populate field Keyvaultproperties") + } + encryption.Keyvaultproperties = &keyvaultproperty + } else { + encryption.Keyvaultproperties = nil + } + + // RequireInfrastructureEncryption + if source.RequireInfrastructureEncryption != nil { + requireInfrastructureEncryption := *source.RequireInfrastructureEncryption + encryption.RequireInfrastructureEncryption = &requireInfrastructureEncryption + } else { + encryption.RequireInfrastructureEncryption = nil + } + + // Services + if source.Services != nil { + var service EncryptionServices_STATUS + err := service.AssignProperties_From_EncryptionServices_STATUS(source.Services) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionServices_STATUS() to populate field Services") + } + encryption.Services = &service + } else { + encryption.Services = nil + } + + // No error + return nil +} + +// AssignProperties_To_Encryption_STATUS populates the provided destination Encryption_STATUS from our Encryption_STATUS +func (encryption *Encryption_STATUS) AssignProperties_To_Encryption_STATUS(destination *v20230101s.Encryption_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Identity + if encryption.Identity != nil { + var identity v20230101s.EncryptionIdentity_STATUS + err := encryption.Identity.AssignProperties_To_EncryptionIdentity_STATUS(&identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionIdentity_STATUS() to populate field Identity") + } + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // KeySource + if encryption.KeySource != nil { + keySource := string(*encryption.KeySource) + destination.KeySource = &keySource + } else { + destination.KeySource = nil + } + + // Keyvaultproperties + if encryption.Keyvaultproperties != nil { + var keyvaultproperty v20230101s.KeyVaultProperties_STATUS + err := encryption.Keyvaultproperties.AssignProperties_To_KeyVaultProperties_STATUS(&keyvaultproperty) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyVaultProperties_STATUS() to populate field Keyvaultproperties") + } + destination.Keyvaultproperties = &keyvaultproperty + } else { + destination.Keyvaultproperties = nil + } + + // RequireInfrastructureEncryption + if encryption.RequireInfrastructureEncryption != nil { + requireInfrastructureEncryption := *encryption.RequireInfrastructureEncryption + destination.RequireInfrastructureEncryption = &requireInfrastructureEncryption + } else { + destination.RequireInfrastructureEncryption = nil + } + + // Services + if encryption.Services != nil { + var service v20230101s.EncryptionServices_STATUS + err := encryption.Services.AssignProperties_To_EncryptionServices_STATUS(&service) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionServices_STATUS() to populate field Services") + } + destination.Services = &service + } else { + destination.Services = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object. +type Endpoints_STATUS struct { + // Blob: Gets the blob endpoint. + Blob *string `json:"blob,omitempty"` + + // Dfs: Gets the dfs endpoint. + Dfs *string `json:"dfs,omitempty"` + + // File: Gets the file endpoint. + File *string `json:"file,omitempty"` + + // InternetEndpoints: Gets the internet routing storage endpoints + InternetEndpoints *StorageAccountInternetEndpoints_STATUS `json:"internetEndpoints,omitempty"` + + // MicrosoftEndpoints: Gets the microsoft routing storage endpoints. + MicrosoftEndpoints *StorageAccountMicrosoftEndpoints_STATUS `json:"microsoftEndpoints,omitempty"` + + // Queue: Gets the queue endpoint. + Queue *string `json:"queue,omitempty"` + + // Table: Gets the table endpoint. + Table *string `json:"table,omitempty"` + + // Web: Gets the web endpoint. + Web *string `json:"web,omitempty"` +} + +var _ genruntime.FromARMConverter = &Endpoints_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (endpoints *Endpoints_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &Endpoints_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (endpoints *Endpoints_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Endpoints_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Endpoints_STATUS_ARM, got %T", armInput) + } + + // Set property "Blob": + if typedInput.Blob != nil { + blob := *typedInput.Blob + endpoints.Blob = &blob + } + + // Set property "Dfs": + if typedInput.Dfs != nil { + dfs := *typedInput.Dfs + endpoints.Dfs = &dfs + } + + // Set property "File": + if typedInput.File != nil { + file := *typedInput.File + endpoints.File = &file + } + + // Set property "InternetEndpoints": + if typedInput.InternetEndpoints != nil { + var internetEndpoints1 StorageAccountInternetEndpoints_STATUS + err := internetEndpoints1.PopulateFromARM(owner, *typedInput.InternetEndpoints) + if err != nil { + return err + } + internetEndpoints := internetEndpoints1 + endpoints.InternetEndpoints = &internetEndpoints + } + + // Set property "MicrosoftEndpoints": + if typedInput.MicrosoftEndpoints != nil { + var microsoftEndpoints1 StorageAccountMicrosoftEndpoints_STATUS + err := microsoftEndpoints1.PopulateFromARM(owner, *typedInput.MicrosoftEndpoints) + if err != nil { + return err + } + microsoftEndpoints := microsoftEndpoints1 + endpoints.MicrosoftEndpoints = µsoftEndpoints + } + + // Set property "Queue": + if typedInput.Queue != nil { + queue := *typedInput.Queue + endpoints.Queue = &queue + } + + // Set property "Table": + if typedInput.Table != nil { + table := *typedInput.Table + endpoints.Table = &table + } + + // Set property "Web": + if typedInput.Web != nil { + web := *typedInput.Web + endpoints.Web = &web + } + + // No error + return nil +} + +// AssignProperties_From_Endpoints_STATUS populates our Endpoints_STATUS from the provided source Endpoints_STATUS +func (endpoints *Endpoints_STATUS) AssignProperties_From_Endpoints_STATUS(source *v20230101s.Endpoints_STATUS) error { + + // Blob + endpoints.Blob = genruntime.ClonePointerToString(source.Blob) + + // Dfs + endpoints.Dfs = genruntime.ClonePointerToString(source.Dfs) + + // File + endpoints.File = genruntime.ClonePointerToString(source.File) + + // InternetEndpoints + if source.InternetEndpoints != nil { + var internetEndpoint StorageAccountInternetEndpoints_STATUS + err := internetEndpoint.AssignProperties_From_StorageAccountInternetEndpoints_STATUS(source.InternetEndpoints) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccountInternetEndpoints_STATUS() to populate field InternetEndpoints") + } + endpoints.InternetEndpoints = &internetEndpoint + } else { + endpoints.InternetEndpoints = nil + } + + // MicrosoftEndpoints + if source.MicrosoftEndpoints != nil { + var microsoftEndpoint StorageAccountMicrosoftEndpoints_STATUS + err := microsoftEndpoint.AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS(source.MicrosoftEndpoints) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS() to populate field MicrosoftEndpoints") + } + endpoints.MicrosoftEndpoints = µsoftEndpoint + } else { + endpoints.MicrosoftEndpoints = nil + } + + // Queue + endpoints.Queue = genruntime.ClonePointerToString(source.Queue) + + // Table + endpoints.Table = genruntime.ClonePointerToString(source.Table) + + // Web + endpoints.Web = genruntime.ClonePointerToString(source.Web) + + // No error + return nil +} + +// AssignProperties_To_Endpoints_STATUS populates the provided destination Endpoints_STATUS from our Endpoints_STATUS +func (endpoints *Endpoints_STATUS) AssignProperties_To_Endpoints_STATUS(destination *v20230101s.Endpoints_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Blob + destination.Blob = genruntime.ClonePointerToString(endpoints.Blob) + + // Dfs + destination.Dfs = genruntime.ClonePointerToString(endpoints.Dfs) + + // File + destination.File = genruntime.ClonePointerToString(endpoints.File) + + // InternetEndpoints + if endpoints.InternetEndpoints != nil { + var internetEndpoint v20230101s.StorageAccountInternetEndpoints_STATUS + err := endpoints.InternetEndpoints.AssignProperties_To_StorageAccountInternetEndpoints_STATUS(&internetEndpoint) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccountInternetEndpoints_STATUS() to populate field InternetEndpoints") + } + destination.InternetEndpoints = &internetEndpoint + } else { + destination.InternetEndpoints = nil + } + + // MicrosoftEndpoints + if endpoints.MicrosoftEndpoints != nil { + var microsoftEndpoint v20230101s.StorageAccountMicrosoftEndpoints_STATUS + err := endpoints.MicrosoftEndpoints.AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS(µsoftEndpoint) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS() to populate field MicrosoftEndpoints") + } + destination.MicrosoftEndpoints = µsoftEndpoint + } else { + destination.MicrosoftEndpoints = nil + } + + // Queue + destination.Queue = genruntime.ClonePointerToString(endpoints.Queue) + + // Table + destination.Table = genruntime.ClonePointerToString(endpoints.Table) + + // Web + destination.Web = genruntime.ClonePointerToString(endpoints.Web) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The complex type of the extended location. +type ExtendedLocation struct { + // Name: The name of the extended location. + Name *string `json:"name,omitempty"` + + // Type: The type of the extended location. + Type *ExtendedLocationType `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &ExtendedLocation{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (location *ExtendedLocation) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if location == nil { + return nil, nil + } + result := &ExtendedLocation_ARM{} + + // Set property "Name": + if location.Name != nil { + name := *location.Name + result.Name = &name + } + + // Set property "Type": + if location.Type != nil { + typeVar := *location.Type + result.Type = &typeVar + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (location *ExtendedLocation) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ExtendedLocation_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (location *ExtendedLocation) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ExtendedLocation_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ExtendedLocation_ARM, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + location.Name = &name + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + location.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_ExtendedLocation populates our ExtendedLocation from the provided source ExtendedLocation +func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source *v20230101s.ExtendedLocation) error { + + // Name + location.Name = genruntime.ClonePointerToString(source.Name) + + // Type + if source.Type != nil { + typeVar := ExtendedLocationType(*source.Type) + location.Type = &typeVar + } else { + location.Type = nil + } + + // No error + return nil +} + +// AssignProperties_To_ExtendedLocation populates the provided destination ExtendedLocation from our ExtendedLocation +func (location *ExtendedLocation) AssignProperties_To_ExtendedLocation(destination *v20230101s.ExtendedLocation) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + destination.Name = genruntime.ClonePointerToString(location.Name) + + // Type + if location.Type != nil { + typeVar := string(*location.Type) + destination.Type = &typeVar + } else { + destination.Type = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ExtendedLocation_STATUS populates our ExtendedLocation from the provided source ExtendedLocation_STATUS +func (location *ExtendedLocation) Initialize_From_ExtendedLocation_STATUS(source *ExtendedLocation_STATUS) error { + + // Name + location.Name = genruntime.ClonePointerToString(source.Name) + + // Type + if source.Type != nil { + typeVar := ExtendedLocationType(*source.Type) + location.Type = &typeVar + } else { + location.Type = nil + } + + // No error + return nil +} + +// The complex type of the extended location. +type ExtendedLocation_STATUS struct { + // Name: The name of the extended location. + Name *string `json:"name,omitempty"` + + // Type: The type of the extended location. + Type *ExtendedLocationType_STATUS `json:"type,omitempty"` +} + +var _ genruntime.FromARMConverter = &ExtendedLocation_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (location *ExtendedLocation_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ExtendedLocation_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (location *ExtendedLocation_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ExtendedLocation_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ExtendedLocation_STATUS_ARM, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + location.Name = &name + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + location.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_ExtendedLocation_STATUS populates our ExtendedLocation_STATUS from the provided source ExtendedLocation_STATUS +func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_STATUS(source *v20230101s.ExtendedLocation_STATUS) error { + + // Name + location.Name = genruntime.ClonePointerToString(source.Name) + + // Type + if source.Type != nil { + typeVar := ExtendedLocationType_STATUS(*source.Type) + location.Type = &typeVar + } else { + location.Type = nil + } + + // No error + return nil +} + +// AssignProperties_To_ExtendedLocation_STATUS populates the provided destination ExtendedLocation_STATUS from our ExtendedLocation_STATUS +func (location *ExtendedLocation_STATUS) AssignProperties_To_ExtendedLocation_STATUS(destination *v20230101s.ExtendedLocation_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + destination.Name = genruntime.ClonePointerToString(location.Name) + + // Type + if location.Type != nil { + typeVar := string(*location.Type) + destination.Type = &typeVar + } else { + destination.Type = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when +// geo-redundant replication is enabled for the storage account. +type GeoReplicationStats_STATUS struct { + // CanFailover: A boolean flag which indicates whether or not account failover is supported for the account. + CanFailover *bool `json:"canFailover,omitempty"` + + // CanPlannedFailover: A boolean flag which indicates whether or not planned account failover is supported for the account. + CanPlannedFailover *bool `json:"canPlannedFailover,omitempty"` + + // LastSyncTime: All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. + // Primary writes following this point in time may or may not be available for reads. Element may be default value if value + // of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. + LastSyncTime *string `json:"lastSyncTime,omitempty"` + + // PostFailoverRedundancy: The redundancy type of the account after an account failover is performed. + PostFailoverRedundancy *GeoReplicationStats_PostFailoverRedundancy_STATUS `json:"postFailoverRedundancy,omitempty"` + + // PostPlannedFailoverRedundancy: The redundancy type of the account after a planned account failover is performed. + PostPlannedFailoverRedundancy *GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS `json:"postPlannedFailoverRedundancy,omitempty"` + + // Status: The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is + // active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary + // location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the + // secondary location is temporarily unavailable. + Status *GeoReplicationStats_Status_STATUS `json:"status,omitempty"` +} + +var _ genruntime.FromARMConverter = &GeoReplicationStats_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (stats *GeoReplicationStats_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &GeoReplicationStats_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (stats *GeoReplicationStats_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(GeoReplicationStats_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected GeoReplicationStats_STATUS_ARM, got %T", armInput) + } + + // Set property "CanFailover": + if typedInput.CanFailover != nil { + canFailover := *typedInput.CanFailover + stats.CanFailover = &canFailover + } + + // Set property "CanPlannedFailover": + if typedInput.CanPlannedFailover != nil { + canPlannedFailover := *typedInput.CanPlannedFailover + stats.CanPlannedFailover = &canPlannedFailover + } + + // Set property "LastSyncTime": + if typedInput.LastSyncTime != nil { + lastSyncTime := *typedInput.LastSyncTime + stats.LastSyncTime = &lastSyncTime + } + + // Set property "PostFailoverRedundancy": + if typedInput.PostFailoverRedundancy != nil { + postFailoverRedundancy := *typedInput.PostFailoverRedundancy + stats.PostFailoverRedundancy = &postFailoverRedundancy + } + + // Set property "PostPlannedFailoverRedundancy": + if typedInput.PostPlannedFailoverRedundancy != nil { + postPlannedFailoverRedundancy := *typedInput.PostPlannedFailoverRedundancy + stats.PostPlannedFailoverRedundancy = &postPlannedFailoverRedundancy + } + + // Set property "Status": + if typedInput.Status != nil { + status := *typedInput.Status + stats.Status = &status + } + + // No error + return nil +} + +// AssignProperties_From_GeoReplicationStats_STATUS populates our GeoReplicationStats_STATUS from the provided source GeoReplicationStats_STATUS +func (stats *GeoReplicationStats_STATUS) AssignProperties_From_GeoReplicationStats_STATUS(source *v20230101s.GeoReplicationStats_STATUS) error { + + // CanFailover + if source.CanFailover != nil { + canFailover := *source.CanFailover + stats.CanFailover = &canFailover + } else { + stats.CanFailover = nil + } + + // CanPlannedFailover + if source.CanPlannedFailover != nil { + canPlannedFailover := *source.CanPlannedFailover + stats.CanPlannedFailover = &canPlannedFailover + } else { + stats.CanPlannedFailover = nil + } + + // LastSyncTime + stats.LastSyncTime = genruntime.ClonePointerToString(source.LastSyncTime) + + // PostFailoverRedundancy + if source.PostFailoverRedundancy != nil { + postFailoverRedundancy := GeoReplicationStats_PostFailoverRedundancy_STATUS(*source.PostFailoverRedundancy) + stats.PostFailoverRedundancy = &postFailoverRedundancy + } else { + stats.PostFailoverRedundancy = nil + } + + // PostPlannedFailoverRedundancy + if source.PostPlannedFailoverRedundancy != nil { + postPlannedFailoverRedundancy := GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS(*source.PostPlannedFailoverRedundancy) + stats.PostPlannedFailoverRedundancy = &postPlannedFailoverRedundancy + } else { + stats.PostPlannedFailoverRedundancy = nil + } + + // Status + if source.Status != nil { + status := GeoReplicationStats_Status_STATUS(*source.Status) + stats.Status = &status + } else { + stats.Status = nil + } + + // No error + return nil +} + +// AssignProperties_To_GeoReplicationStats_STATUS populates the provided destination GeoReplicationStats_STATUS from our GeoReplicationStats_STATUS +func (stats *GeoReplicationStats_STATUS) AssignProperties_To_GeoReplicationStats_STATUS(destination *v20230101s.GeoReplicationStats_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // CanFailover + if stats.CanFailover != nil { + canFailover := *stats.CanFailover + destination.CanFailover = &canFailover + } else { + destination.CanFailover = nil + } + + // CanPlannedFailover + if stats.CanPlannedFailover != nil { + canPlannedFailover := *stats.CanPlannedFailover + destination.CanPlannedFailover = &canPlannedFailover + } else { + destination.CanPlannedFailover = nil + } + + // LastSyncTime + destination.LastSyncTime = genruntime.ClonePointerToString(stats.LastSyncTime) + + // PostFailoverRedundancy + if stats.PostFailoverRedundancy != nil { + postFailoverRedundancy := string(*stats.PostFailoverRedundancy) + destination.PostFailoverRedundancy = &postFailoverRedundancy + } else { + destination.PostFailoverRedundancy = nil + } + + // PostPlannedFailoverRedundancy + if stats.PostPlannedFailoverRedundancy != nil { + postPlannedFailoverRedundancy := string(*stats.PostPlannedFailoverRedundancy) + destination.PostPlannedFailoverRedundancy = &postPlannedFailoverRedundancy + } else { + destination.PostPlannedFailoverRedundancy = nil + } + + // Status + if stats.Status != nil { + status := string(*stats.Status) + destination.Status = &status + } else { + destination.Status = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Identity for the resource. +type Identity struct { + // +kubebuilder:validation:Required + // Type: The identity type. + Type *Identity_Type `json:"type,omitempty"` + + // UserAssignedIdentities: Gets or sets a list of key value pairs that describe the set of User Assigned identities that + // will be used with this storage account. The key is the ARM resource identifier of the identity. Only 1 User Assigned + // identity is permitted here. + UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"` +} + +var _ genruntime.ARMTransformer = &Identity{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (identity *Identity) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if identity == nil { + return nil, nil + } + result := &Identity_ARM{} + + // Set property "Type": + if identity.Type != nil { + typeVar := *identity.Type + result.Type = &typeVar + } + + // Set property "UserAssignedIdentities": + result.UserAssignedIdentities = make(map[string]UserAssignedIdentityDetails_ARM, len(identity.UserAssignedIdentities)) + for _, ident := range identity.UserAssignedIdentities { + identARMID, err := resolved.ResolvedReferences.Lookup(ident.Reference) + if err != nil { + return nil, err + } + key := identARMID + result.UserAssignedIdentities[key] = UserAssignedIdentityDetails_ARM{} + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identity *Identity) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &Identity_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identity *Identity) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Identity_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Identity_ARM, got %T", armInput) + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + identity.Type = &typeVar + } + + // no assignment for property "UserAssignedIdentities" + + // No error + return nil +} + +// AssignProperties_From_Identity populates our Identity from the provided source Identity +func (identity *Identity) AssignProperties_From_Identity(source *v20230101s.Identity) error { + + // Type + if source.Type != nil { + typeVar := Identity_Type(*source.Type) + identity.Type = &typeVar + } else { + identity.Type = nil + } + + // UserAssignedIdentities + if source.UserAssignedIdentities != nil { + userAssignedIdentityList := make([]UserAssignedIdentityDetails, len(source.UserAssignedIdentities)) + for userAssignedIdentityIndex, userAssignedIdentityItem := range source.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityItem := userAssignedIdentityItem + var userAssignedIdentity UserAssignedIdentityDetails + err := userAssignedIdentity.AssignProperties_From_UserAssignedIdentityDetails(&userAssignedIdentityItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_UserAssignedIdentityDetails() to populate field UserAssignedIdentities") + } + userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity + } + identity.UserAssignedIdentities = userAssignedIdentityList + } else { + identity.UserAssignedIdentities = nil + } + + // No error + return nil +} + +// AssignProperties_To_Identity populates the provided destination Identity from our Identity +func (identity *Identity) AssignProperties_To_Identity(destination *v20230101s.Identity) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Type + if identity.Type != nil { + typeVar := string(*identity.Type) + destination.Type = &typeVar + } else { + destination.Type = nil + } + + // UserAssignedIdentities + if identity.UserAssignedIdentities != nil { + userAssignedIdentityList := make([]v20230101s.UserAssignedIdentityDetails, len(identity.UserAssignedIdentities)) + for userAssignedIdentityIndex, userAssignedIdentityItem := range identity.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityItem := userAssignedIdentityItem + var userAssignedIdentity v20230101s.UserAssignedIdentityDetails + err := userAssignedIdentityItem.AssignProperties_To_UserAssignedIdentityDetails(&userAssignedIdentity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_UserAssignedIdentityDetails() to populate field UserAssignedIdentities") + } + userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity + } + destination.UserAssignedIdentities = userAssignedIdentityList + } else { + destination.UserAssignedIdentities = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_Identity_STATUS populates our Identity from the provided source Identity_STATUS +func (identity *Identity) Initialize_From_Identity_STATUS(source *Identity_STATUS) error { + + // Type + if source.Type != nil { + typeVar := Identity_Type(*source.Type) + identity.Type = &typeVar + } else { + identity.Type = nil + } + + // UserAssignedIdentities + if source.UserAssignedIdentities != nil { + userAssignedIdentityList := make([]UserAssignedIdentityDetails, 0, len(source.UserAssignedIdentities)) + for userAssignedIdentitiesKey := range source.UserAssignedIdentities { + userAssignedIdentitiesRef := genruntime.CreateResourceReferenceFromARMID(userAssignedIdentitiesKey) + userAssignedIdentityList = append(userAssignedIdentityList, UserAssignedIdentityDetails{Reference: userAssignedIdentitiesRef}) + } + identity.UserAssignedIdentities = userAssignedIdentityList + } else { + identity.UserAssignedIdentities = nil + } + + // No error + return nil +} + +// Identity for the resource. +type Identity_STATUS struct { + // PrincipalId: The principal ID of resource identity. + PrincipalId *string `json:"principalId,omitempty"` + + // TenantId: The tenant ID of resource. + TenantId *string `json:"tenantId,omitempty"` + + // Type: The identity type. + Type *Identity_Type_STATUS `json:"type,omitempty"` + + // UserAssignedIdentities: Gets or sets a list of key value pairs that describe the set of User Assigned identities that + // will be used with this storage account. The key is the ARM resource identifier of the identity. Only 1 User Assigned + // identity is permitted here. + UserAssignedIdentities map[string]UserAssignedIdentity_STATUS `json:"userAssignedIdentities,omitempty"` +} + +var _ genruntime.FromARMConverter = &Identity_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identity *Identity_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &Identity_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identity *Identity_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Identity_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Identity_STATUS_ARM, got %T", armInput) + } + + // Set property "PrincipalId": + if typedInput.PrincipalId != nil { + principalId := *typedInput.PrincipalId + identity.PrincipalId = &principalId + } + + // Set property "TenantId": + if typedInput.TenantId != nil { + tenantId := *typedInput.TenantId + identity.TenantId = &tenantId + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + identity.Type = &typeVar + } + + // Set property "UserAssignedIdentities": + if typedInput.UserAssignedIdentities != nil { + identity.UserAssignedIdentities = make(map[string]UserAssignedIdentity_STATUS, len(typedInput.UserAssignedIdentities)) + for key, value := range typedInput.UserAssignedIdentities { + var value1 UserAssignedIdentity_STATUS + err := value1.PopulateFromARM(owner, value) + if err != nil { + return err + } + identity.UserAssignedIdentities[key] = value1 + } + } + + // No error + return nil +} + +// AssignProperties_From_Identity_STATUS populates our Identity_STATUS from the provided source Identity_STATUS +func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v20230101s.Identity_STATUS) error { + + // PrincipalId + identity.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId) + + // TenantId + identity.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // Type + if source.Type != nil { + typeVar := Identity_Type_STATUS(*source.Type) + identity.Type = &typeVar + } else { + identity.Type = nil + } + + // UserAssignedIdentities + if source.UserAssignedIdentities != nil { + userAssignedIdentityMap := make(map[string]UserAssignedIdentity_STATUS, len(source.UserAssignedIdentities)) + for userAssignedIdentityKey, userAssignedIdentityValue := range source.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityValue := userAssignedIdentityValue + var userAssignedIdentity UserAssignedIdentity_STATUS + err := userAssignedIdentity.AssignProperties_From_UserAssignedIdentity_STATUS(&userAssignedIdentityValue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_UserAssignedIdentity_STATUS() to populate field UserAssignedIdentities") + } + userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity + } + identity.UserAssignedIdentities = userAssignedIdentityMap + } else { + identity.UserAssignedIdentities = nil + } + + // No error + return nil +} + +// AssignProperties_To_Identity_STATUS populates the provided destination Identity_STATUS from our Identity_STATUS +func (identity *Identity_STATUS) AssignProperties_To_Identity_STATUS(destination *v20230101s.Identity_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // PrincipalId + destination.PrincipalId = genruntime.ClonePointerToString(identity.PrincipalId) + + // TenantId + destination.TenantId = genruntime.ClonePointerToString(identity.TenantId) + + // Type + if identity.Type != nil { + typeVar := string(*identity.Type) + destination.Type = &typeVar + } else { + destination.Type = nil + } + + // UserAssignedIdentities + if identity.UserAssignedIdentities != nil { + userAssignedIdentityMap := make(map[string]v20230101s.UserAssignedIdentity_STATUS, len(identity.UserAssignedIdentities)) + for userAssignedIdentityKey, userAssignedIdentityValue := range identity.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityValue := userAssignedIdentityValue + var userAssignedIdentity v20230101s.UserAssignedIdentity_STATUS + err := userAssignedIdentityValue.AssignProperties_To_UserAssignedIdentity_STATUS(&userAssignedIdentity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_UserAssignedIdentity_STATUS() to populate field UserAssignedIdentities") + } + userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity + } + destination.UserAssignedIdentities = userAssignedIdentityMap + } else { + destination.UserAssignedIdentities = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. +type ImmutableStorageAccount struct { + // Enabled: A boolean flag which enables account-level immutability. All the containers under such an account have + // object-level immutability enabled by default. + Enabled *bool `json:"enabled,omitempty"` + + // ImmutabilityPolicy: Specifies the default account-level immutability policy which is inherited and applied to objects + // that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher + // precedence than the container-level immutability policy, which has a higher precedence than the account-level + // immutability policy. + ImmutabilityPolicy *AccountImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` +} + +var _ genruntime.ARMTransformer = &ImmutableStorageAccount{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (account *ImmutableStorageAccount) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if account == nil { + return nil, nil + } + result := &ImmutableStorageAccount_ARM{} + + // Set property "Enabled": + if account.Enabled != nil { + enabled := *account.Enabled + result.Enabled = &enabled + } + + // Set property "ImmutabilityPolicy": + if account.ImmutabilityPolicy != nil { + immutabilityPolicy_ARM, err := (*account.ImmutabilityPolicy).ConvertToARM(resolved) + if err != nil { + return nil, err + } + immutabilityPolicy := *immutabilityPolicy_ARM.(*AccountImmutabilityPolicyProperties_ARM) + result.ImmutabilityPolicy = &immutabilityPolicy + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (account *ImmutableStorageAccount) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ImmutableStorageAccount_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (account *ImmutableStorageAccount) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ImmutableStorageAccount_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ImmutableStorageAccount_ARM, got %T", armInput) + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + account.Enabled = &enabled + } + + // Set property "ImmutabilityPolicy": + if typedInput.ImmutabilityPolicy != nil { + var immutabilityPolicy1 AccountImmutabilityPolicyProperties + err := immutabilityPolicy1.PopulateFromARM(owner, *typedInput.ImmutabilityPolicy) + if err != nil { + return err + } + immutabilityPolicy := immutabilityPolicy1 + account.ImmutabilityPolicy = &immutabilityPolicy + } + + // No error + return nil +} + +// AssignProperties_From_ImmutableStorageAccount populates our ImmutableStorageAccount from the provided source ImmutableStorageAccount +func (account *ImmutableStorageAccount) AssignProperties_From_ImmutableStorageAccount(source *v20230101s.ImmutableStorageAccount) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + account.Enabled = &enabled + } else { + account.Enabled = nil + } + + // ImmutabilityPolicy + if source.ImmutabilityPolicy != nil { + var immutabilityPolicy AccountImmutabilityPolicyProperties + err := immutabilityPolicy.AssignProperties_From_AccountImmutabilityPolicyProperties(source.ImmutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AccountImmutabilityPolicyProperties() to populate field ImmutabilityPolicy") + } + account.ImmutabilityPolicy = &immutabilityPolicy + } else { + account.ImmutabilityPolicy = nil + } + + // No error + return nil +} + +// AssignProperties_To_ImmutableStorageAccount populates the provided destination ImmutableStorageAccount from our ImmutableStorageAccount +func (account *ImmutableStorageAccount) AssignProperties_To_ImmutableStorageAccount(destination *v20230101s.ImmutableStorageAccount) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Enabled + if account.Enabled != nil { + enabled := *account.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // ImmutabilityPolicy + if account.ImmutabilityPolicy != nil { + var immutabilityPolicy v20230101s.AccountImmutabilityPolicyProperties + err := account.ImmutabilityPolicy.AssignProperties_To_AccountImmutabilityPolicyProperties(&immutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AccountImmutabilityPolicyProperties() to populate field ImmutabilityPolicy") + } + destination.ImmutabilityPolicy = &immutabilityPolicy + } else { + destination.ImmutabilityPolicy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ImmutableStorageAccount_STATUS populates our ImmutableStorageAccount from the provided source ImmutableStorageAccount_STATUS +func (account *ImmutableStorageAccount) Initialize_From_ImmutableStorageAccount_STATUS(source *ImmutableStorageAccount_STATUS) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + account.Enabled = &enabled + } else { + account.Enabled = nil + } + + // ImmutabilityPolicy + if source.ImmutabilityPolicy != nil { + var immutabilityPolicy AccountImmutabilityPolicyProperties + err := immutabilityPolicy.Initialize_From_AccountImmutabilityPolicyProperties_STATUS(source.ImmutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_AccountImmutabilityPolicyProperties_STATUS() to populate field ImmutabilityPolicy") + } + account.ImmutabilityPolicy = &immutabilityPolicy + } else { + account.ImmutabilityPolicy = nil + } + + // No error + return nil +} + +// This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. +type ImmutableStorageAccount_STATUS struct { + // Enabled: A boolean flag which enables account-level immutability. All the containers under such an account have + // object-level immutability enabled by default. + Enabled *bool `json:"enabled,omitempty"` + + // ImmutabilityPolicy: Specifies the default account-level immutability policy which is inherited and applied to objects + // that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher + // precedence than the container-level immutability policy, which has a higher precedence than the account-level + // immutability policy. + ImmutabilityPolicy *AccountImmutabilityPolicyProperties_STATUS `json:"immutabilityPolicy,omitempty"` +} + +var _ genruntime.FromARMConverter = &ImmutableStorageAccount_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (account *ImmutableStorageAccount_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ImmutableStorageAccount_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (account *ImmutableStorageAccount_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ImmutableStorageAccount_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ImmutableStorageAccount_STATUS_ARM, got %T", armInput) + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + account.Enabled = &enabled + } + + // Set property "ImmutabilityPolicy": + if typedInput.ImmutabilityPolicy != nil { + var immutabilityPolicy1 AccountImmutabilityPolicyProperties_STATUS + err := immutabilityPolicy1.PopulateFromARM(owner, *typedInput.ImmutabilityPolicy) + if err != nil { + return err + } + immutabilityPolicy := immutabilityPolicy1 + account.ImmutabilityPolicy = &immutabilityPolicy + } + + // No error + return nil +} + +// AssignProperties_From_ImmutableStorageAccount_STATUS populates our ImmutableStorageAccount_STATUS from the provided source ImmutableStorageAccount_STATUS +func (account *ImmutableStorageAccount_STATUS) AssignProperties_From_ImmutableStorageAccount_STATUS(source *v20230101s.ImmutableStorageAccount_STATUS) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + account.Enabled = &enabled + } else { + account.Enabled = nil + } + + // ImmutabilityPolicy + if source.ImmutabilityPolicy != nil { + var immutabilityPolicy AccountImmutabilityPolicyProperties_STATUS + err := immutabilityPolicy.AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS(source.ImmutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS() to populate field ImmutabilityPolicy") + } + account.ImmutabilityPolicy = &immutabilityPolicy + } else { + account.ImmutabilityPolicy = nil + } + + // No error + return nil +} + +// AssignProperties_To_ImmutableStorageAccount_STATUS populates the provided destination ImmutableStorageAccount_STATUS from our ImmutableStorageAccount_STATUS +func (account *ImmutableStorageAccount_STATUS) AssignProperties_To_ImmutableStorageAccount_STATUS(destination *v20230101s.ImmutableStorageAccount_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Enabled + if account.Enabled != nil { + enabled := *account.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // ImmutabilityPolicy + if account.ImmutabilityPolicy != nil { + var immutabilityPolicy v20230101s.AccountImmutabilityPolicyProperties_STATUS + err := account.ImmutabilityPolicy.AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS(&immutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS() to populate field ImmutabilityPolicy") + } + destination.ImmutabilityPolicy = &immutabilityPolicy + } else { + destination.ImmutabilityPolicy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Storage account keys creation time. +type KeyCreationTime_STATUS struct { + Key1 *string `json:"key1,omitempty"` + Key2 *string `json:"key2,omitempty"` +} + +var _ genruntime.FromARMConverter = &KeyCreationTime_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (time *KeyCreationTime_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &KeyCreationTime_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (time *KeyCreationTime_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(KeyCreationTime_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected KeyCreationTime_STATUS_ARM, got %T", armInput) + } + + // Set property "Key1": + if typedInput.Key1 != nil { + key1 := *typedInput.Key1 + time.Key1 = &key1 + } + + // Set property "Key2": + if typedInput.Key2 != nil { + key2 := *typedInput.Key2 + time.Key2 = &key2 + } + + // No error + return nil +} + +// AssignProperties_From_KeyCreationTime_STATUS populates our KeyCreationTime_STATUS from the provided source KeyCreationTime_STATUS +func (time *KeyCreationTime_STATUS) AssignProperties_From_KeyCreationTime_STATUS(source *v20230101s.KeyCreationTime_STATUS) error { + + // Key1 + time.Key1 = genruntime.ClonePointerToString(source.Key1) + + // Key2 + time.Key2 = genruntime.ClonePointerToString(source.Key2) + + // No error + return nil +} + +// AssignProperties_To_KeyCreationTime_STATUS populates the provided destination KeyCreationTime_STATUS from our KeyCreationTime_STATUS +func (time *KeyCreationTime_STATUS) AssignProperties_To_KeyCreationTime_STATUS(destination *v20230101s.KeyCreationTime_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Key1 + destination.Key1 = genruntime.ClonePointerToString(time.Key1) + + // Key2 + destination.Key2 = genruntime.ClonePointerToString(time.Key2) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// KeyPolicy assigned to the storage account. +type KeyPolicy struct { + // +kubebuilder:validation:Required + // KeyExpirationPeriodInDays: The key expiration period in days. + KeyExpirationPeriodInDays *int `json:"keyExpirationPeriodInDays,omitempty"` +} + +var _ genruntime.ARMTransformer = &KeyPolicy{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (policy *KeyPolicy) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if policy == nil { + return nil, nil + } + result := &KeyPolicy_ARM{} + + // Set property "KeyExpirationPeriodInDays": + if policy.KeyExpirationPeriodInDays != nil { + keyExpirationPeriodInDays := *policy.KeyExpirationPeriodInDays + result.KeyExpirationPeriodInDays = &keyExpirationPeriodInDays + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *KeyPolicy) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &KeyPolicy_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *KeyPolicy) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(KeyPolicy_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected KeyPolicy_ARM, got %T", armInput) + } + + // Set property "KeyExpirationPeriodInDays": + if typedInput.KeyExpirationPeriodInDays != nil { + keyExpirationPeriodInDays := *typedInput.KeyExpirationPeriodInDays + policy.KeyExpirationPeriodInDays = &keyExpirationPeriodInDays + } + + // No error + return nil +} + +// AssignProperties_From_KeyPolicy populates our KeyPolicy from the provided source KeyPolicy +func (policy *KeyPolicy) AssignProperties_From_KeyPolicy(source *v20230101s.KeyPolicy) error { + + // KeyExpirationPeriodInDays + policy.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(source.KeyExpirationPeriodInDays) + + // No error + return nil +} + +// AssignProperties_To_KeyPolicy populates the provided destination KeyPolicy from our KeyPolicy +func (policy *KeyPolicy) AssignProperties_To_KeyPolicy(destination *v20230101s.KeyPolicy) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // KeyExpirationPeriodInDays + destination.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(policy.KeyExpirationPeriodInDays) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_KeyPolicy_STATUS populates our KeyPolicy from the provided source KeyPolicy_STATUS +func (policy *KeyPolicy) Initialize_From_KeyPolicy_STATUS(source *KeyPolicy_STATUS) error { + + // KeyExpirationPeriodInDays + policy.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(source.KeyExpirationPeriodInDays) + + // No error + return nil +} + +// KeyPolicy assigned to the storage account. +type KeyPolicy_STATUS struct { + // KeyExpirationPeriodInDays: The key expiration period in days. + KeyExpirationPeriodInDays *int `json:"keyExpirationPeriodInDays,omitempty"` +} + +var _ genruntime.FromARMConverter = &KeyPolicy_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *KeyPolicy_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &KeyPolicy_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *KeyPolicy_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(KeyPolicy_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected KeyPolicy_STATUS_ARM, got %T", armInput) + } + + // Set property "KeyExpirationPeriodInDays": + if typedInput.KeyExpirationPeriodInDays != nil { + keyExpirationPeriodInDays := *typedInput.KeyExpirationPeriodInDays + policy.KeyExpirationPeriodInDays = &keyExpirationPeriodInDays + } + + // No error + return nil +} + +// AssignProperties_From_KeyPolicy_STATUS populates our KeyPolicy_STATUS from the provided source KeyPolicy_STATUS +func (policy *KeyPolicy_STATUS) AssignProperties_From_KeyPolicy_STATUS(source *v20230101s.KeyPolicy_STATUS) error { + + // KeyExpirationPeriodInDays + policy.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(source.KeyExpirationPeriodInDays) + + // No error + return nil +} + +// AssignProperties_To_KeyPolicy_STATUS populates the provided destination KeyPolicy_STATUS from our KeyPolicy_STATUS +func (policy *KeyPolicy_STATUS) AssignProperties_To_KeyPolicy_STATUS(destination *v20230101s.KeyPolicy_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // KeyExpirationPeriodInDays + destination.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(policy.KeyExpirationPeriodInDays) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Network rule set +type NetworkRuleSet struct { + // Bypass: Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of + // Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. + Bypass *NetworkRuleSet_Bypass `json:"bypass,omitempty"` + + // +kubebuilder:validation:Required + // DefaultAction: Specifies the default action of allow or deny when no other rules match. + DefaultAction *NetworkRuleSet_DefaultAction `json:"defaultAction,omitempty"` + + // IpRules: Sets the IP ACL rules + IpRules []IPRule `json:"ipRules,omitempty"` + + // ResourceAccessRules: Sets the resource access rules + ResourceAccessRules []ResourceAccessRule `json:"resourceAccessRules,omitempty"` + + // VirtualNetworkRules: Sets the virtual network rules + VirtualNetworkRules []VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` +} + +var _ genruntime.ARMTransformer = &NetworkRuleSet{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (ruleSet *NetworkRuleSet) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if ruleSet == nil { + return nil, nil + } + result := &NetworkRuleSet_ARM{} + + // Set property "Bypass": + if ruleSet.Bypass != nil { + bypass := *ruleSet.Bypass + result.Bypass = &bypass + } + + // Set property "DefaultAction": + if ruleSet.DefaultAction != nil { + defaultAction := *ruleSet.DefaultAction + result.DefaultAction = &defaultAction + } + + // Set property "IpRules": + for _, item := range ruleSet.IpRules { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.IpRules = append(result.IpRules, *item_ARM.(*IPRule_ARM)) + } + + // Set property "ResourceAccessRules": + for _, item := range ruleSet.ResourceAccessRules { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.ResourceAccessRules = append(result.ResourceAccessRules, *item_ARM.(*ResourceAccessRule_ARM)) + } + + // Set property "VirtualNetworkRules": + for _, item := range ruleSet.VirtualNetworkRules { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.VirtualNetworkRules = append(result.VirtualNetworkRules, *item_ARM.(*VirtualNetworkRule_ARM)) + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (ruleSet *NetworkRuleSet) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &NetworkRuleSet_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (ruleSet *NetworkRuleSet) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(NetworkRuleSet_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected NetworkRuleSet_ARM, got %T", armInput) + } + + // Set property "Bypass": + if typedInput.Bypass != nil { + bypass := *typedInput.Bypass + ruleSet.Bypass = &bypass + } + + // Set property "DefaultAction": + if typedInput.DefaultAction != nil { + defaultAction := *typedInput.DefaultAction + ruleSet.DefaultAction = &defaultAction + } + + // Set property "IpRules": + for _, item := range typedInput.IpRules { + var item1 IPRule + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + ruleSet.IpRules = append(ruleSet.IpRules, item1) + } + + // Set property "ResourceAccessRules": + for _, item := range typedInput.ResourceAccessRules { + var item1 ResourceAccessRule + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + ruleSet.ResourceAccessRules = append(ruleSet.ResourceAccessRules, item1) + } + + // Set property "VirtualNetworkRules": + for _, item := range typedInput.VirtualNetworkRules { + var item1 VirtualNetworkRule + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + ruleSet.VirtualNetworkRules = append(ruleSet.VirtualNetworkRules, item1) + } + + // No error + return nil +} + +// AssignProperties_From_NetworkRuleSet populates our NetworkRuleSet from the provided source NetworkRuleSet +func (ruleSet *NetworkRuleSet) AssignProperties_From_NetworkRuleSet(source *v20230101s.NetworkRuleSet) error { + + // Bypass + if source.Bypass != nil { + bypass := NetworkRuleSet_Bypass(*source.Bypass) + ruleSet.Bypass = &bypass + } else { + ruleSet.Bypass = nil + } + + // DefaultAction + if source.DefaultAction != nil { + defaultAction := NetworkRuleSet_DefaultAction(*source.DefaultAction) + ruleSet.DefaultAction = &defaultAction + } else { + ruleSet.DefaultAction = nil + } + + // IpRules + if source.IpRules != nil { + ipRuleList := make([]IPRule, len(source.IpRules)) + for ipRuleIndex, ipRuleItem := range source.IpRules { + // Shadow the loop variable to avoid aliasing + ipRuleItem := ipRuleItem + var ipRule IPRule + err := ipRule.AssignProperties_From_IPRule(&ipRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_IPRule() to populate field IpRules") + } + ipRuleList[ipRuleIndex] = ipRule + } + ruleSet.IpRules = ipRuleList + } else { + ruleSet.IpRules = nil + } + + // ResourceAccessRules + if source.ResourceAccessRules != nil { + resourceAccessRuleList := make([]ResourceAccessRule, len(source.ResourceAccessRules)) + for resourceAccessRuleIndex, resourceAccessRuleItem := range source.ResourceAccessRules { + // Shadow the loop variable to avoid aliasing + resourceAccessRuleItem := resourceAccessRuleItem + var resourceAccessRule ResourceAccessRule + err := resourceAccessRule.AssignProperties_From_ResourceAccessRule(&resourceAccessRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ResourceAccessRule() to populate field ResourceAccessRules") + } + resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule + } + ruleSet.ResourceAccessRules = resourceAccessRuleList + } else { + ruleSet.ResourceAccessRules = nil + } + + // VirtualNetworkRules + if source.VirtualNetworkRules != nil { + virtualNetworkRuleList := make([]VirtualNetworkRule, len(source.VirtualNetworkRules)) + for virtualNetworkRuleIndex, virtualNetworkRuleItem := range source.VirtualNetworkRules { + // Shadow the loop variable to avoid aliasing + virtualNetworkRuleItem := virtualNetworkRuleItem + var virtualNetworkRule VirtualNetworkRule + err := virtualNetworkRule.AssignProperties_From_VirtualNetworkRule(&virtualNetworkRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_VirtualNetworkRule() to populate field VirtualNetworkRules") + } + virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule + } + ruleSet.VirtualNetworkRules = virtualNetworkRuleList + } else { + ruleSet.VirtualNetworkRules = nil + } + + // No error + return nil +} + +// AssignProperties_To_NetworkRuleSet populates the provided destination NetworkRuleSet from our NetworkRuleSet +func (ruleSet *NetworkRuleSet) AssignProperties_To_NetworkRuleSet(destination *v20230101s.NetworkRuleSet) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Bypass + if ruleSet.Bypass != nil { + bypass := string(*ruleSet.Bypass) + destination.Bypass = &bypass + } else { + destination.Bypass = nil + } + + // DefaultAction + if ruleSet.DefaultAction != nil { + defaultAction := string(*ruleSet.DefaultAction) + destination.DefaultAction = &defaultAction + } else { + destination.DefaultAction = nil + } + + // IpRules + if ruleSet.IpRules != nil { + ipRuleList := make([]v20230101s.IPRule, len(ruleSet.IpRules)) + for ipRuleIndex, ipRuleItem := range ruleSet.IpRules { + // Shadow the loop variable to avoid aliasing + ipRuleItem := ipRuleItem + var ipRule v20230101s.IPRule + err := ipRuleItem.AssignProperties_To_IPRule(&ipRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_IPRule() to populate field IpRules") + } + ipRuleList[ipRuleIndex] = ipRule + } + destination.IpRules = ipRuleList + } else { + destination.IpRules = nil + } + + // ResourceAccessRules + if ruleSet.ResourceAccessRules != nil { + resourceAccessRuleList := make([]v20230101s.ResourceAccessRule, len(ruleSet.ResourceAccessRules)) + for resourceAccessRuleIndex, resourceAccessRuleItem := range ruleSet.ResourceAccessRules { + // Shadow the loop variable to avoid aliasing + resourceAccessRuleItem := resourceAccessRuleItem + var resourceAccessRule v20230101s.ResourceAccessRule + err := resourceAccessRuleItem.AssignProperties_To_ResourceAccessRule(&resourceAccessRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ResourceAccessRule() to populate field ResourceAccessRules") + } + resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule + } + destination.ResourceAccessRules = resourceAccessRuleList + } else { + destination.ResourceAccessRules = nil + } + + // VirtualNetworkRules + if ruleSet.VirtualNetworkRules != nil { + virtualNetworkRuleList := make([]v20230101s.VirtualNetworkRule, len(ruleSet.VirtualNetworkRules)) + for virtualNetworkRuleIndex, virtualNetworkRuleItem := range ruleSet.VirtualNetworkRules { + // Shadow the loop variable to avoid aliasing + virtualNetworkRuleItem := virtualNetworkRuleItem + var virtualNetworkRule v20230101s.VirtualNetworkRule + err := virtualNetworkRuleItem.AssignProperties_To_VirtualNetworkRule(&virtualNetworkRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_VirtualNetworkRule() to populate field VirtualNetworkRules") + } + virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule + } + destination.VirtualNetworkRules = virtualNetworkRuleList + } else { + destination.VirtualNetworkRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_NetworkRuleSet_STATUS populates our NetworkRuleSet from the provided source NetworkRuleSet_STATUS +func (ruleSet *NetworkRuleSet) Initialize_From_NetworkRuleSet_STATUS(source *NetworkRuleSet_STATUS) error { + + // Bypass + if source.Bypass != nil { + bypass := NetworkRuleSet_Bypass(*source.Bypass) + ruleSet.Bypass = &bypass + } else { + ruleSet.Bypass = nil + } + + // DefaultAction + if source.DefaultAction != nil { + defaultAction := NetworkRuleSet_DefaultAction(*source.DefaultAction) + ruleSet.DefaultAction = &defaultAction + } else { + ruleSet.DefaultAction = nil + } + + // IpRules + if source.IpRules != nil { + ipRuleList := make([]IPRule, len(source.IpRules)) + for ipRuleIndex, ipRuleItem := range source.IpRules { + // Shadow the loop variable to avoid aliasing + ipRuleItem := ipRuleItem + var ipRule IPRule + err := ipRule.Initialize_From_IPRule_STATUS(&ipRuleItem) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_IPRule_STATUS() to populate field IpRules") + } + ipRuleList[ipRuleIndex] = ipRule + } + ruleSet.IpRules = ipRuleList + } else { + ruleSet.IpRules = nil + } + + // ResourceAccessRules + if source.ResourceAccessRules != nil { + resourceAccessRuleList := make([]ResourceAccessRule, len(source.ResourceAccessRules)) + for resourceAccessRuleIndex, resourceAccessRuleItem := range source.ResourceAccessRules { + // Shadow the loop variable to avoid aliasing + resourceAccessRuleItem := resourceAccessRuleItem + var resourceAccessRule ResourceAccessRule + err := resourceAccessRule.Initialize_From_ResourceAccessRule_STATUS(&resourceAccessRuleItem) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ResourceAccessRule_STATUS() to populate field ResourceAccessRules") + } + resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule + } + ruleSet.ResourceAccessRules = resourceAccessRuleList + } else { + ruleSet.ResourceAccessRules = nil + } + + // VirtualNetworkRules + if source.VirtualNetworkRules != nil { + virtualNetworkRuleList := make([]VirtualNetworkRule, len(source.VirtualNetworkRules)) + for virtualNetworkRuleIndex, virtualNetworkRuleItem := range source.VirtualNetworkRules { + // Shadow the loop variable to avoid aliasing + virtualNetworkRuleItem := virtualNetworkRuleItem + var virtualNetworkRule VirtualNetworkRule + err := virtualNetworkRule.Initialize_From_VirtualNetworkRule_STATUS(&virtualNetworkRuleItem) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_VirtualNetworkRule_STATUS() to populate field VirtualNetworkRules") + } + virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule + } + ruleSet.VirtualNetworkRules = virtualNetworkRuleList + } else { + ruleSet.VirtualNetworkRules = nil + } + + // No error + return nil +} + +// Network rule set +type NetworkRuleSet_STATUS struct { + // Bypass: Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of + // Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. + Bypass *NetworkRuleSet_Bypass_STATUS `json:"bypass,omitempty"` + + // DefaultAction: Specifies the default action of allow or deny when no other rules match. + DefaultAction *NetworkRuleSet_DefaultAction_STATUS `json:"defaultAction,omitempty"` + + // IpRules: Sets the IP ACL rules + IpRules []IPRule_STATUS `json:"ipRules,omitempty"` + + // ResourceAccessRules: Sets the resource access rules + ResourceAccessRules []ResourceAccessRule_STATUS `json:"resourceAccessRules,omitempty"` + + // VirtualNetworkRules: Sets the virtual network rules + VirtualNetworkRules []VirtualNetworkRule_STATUS `json:"virtualNetworkRules,omitempty"` +} + +var _ genruntime.FromARMConverter = &NetworkRuleSet_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (ruleSet *NetworkRuleSet_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &NetworkRuleSet_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (ruleSet *NetworkRuleSet_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(NetworkRuleSet_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected NetworkRuleSet_STATUS_ARM, got %T", armInput) + } + + // Set property "Bypass": + if typedInput.Bypass != nil { + bypass := *typedInput.Bypass + ruleSet.Bypass = &bypass + } + + // Set property "DefaultAction": + if typedInput.DefaultAction != nil { + defaultAction := *typedInput.DefaultAction + ruleSet.DefaultAction = &defaultAction + } + + // Set property "IpRules": + for _, item := range typedInput.IpRules { + var item1 IPRule_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + ruleSet.IpRules = append(ruleSet.IpRules, item1) + } + + // Set property "ResourceAccessRules": + for _, item := range typedInput.ResourceAccessRules { + var item1 ResourceAccessRule_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + ruleSet.ResourceAccessRules = append(ruleSet.ResourceAccessRules, item1) + } + + // Set property "VirtualNetworkRules": + for _, item := range typedInput.VirtualNetworkRules { + var item1 VirtualNetworkRule_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + ruleSet.VirtualNetworkRules = append(ruleSet.VirtualNetworkRules, item1) + } + + // No error + return nil +} + +// AssignProperties_From_NetworkRuleSet_STATUS populates our NetworkRuleSet_STATUS from the provided source NetworkRuleSet_STATUS +func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_From_NetworkRuleSet_STATUS(source *v20230101s.NetworkRuleSet_STATUS) error { + + // Bypass + if source.Bypass != nil { + bypass := NetworkRuleSet_Bypass_STATUS(*source.Bypass) + ruleSet.Bypass = &bypass + } else { + ruleSet.Bypass = nil + } + + // DefaultAction + if source.DefaultAction != nil { + defaultAction := NetworkRuleSet_DefaultAction_STATUS(*source.DefaultAction) + ruleSet.DefaultAction = &defaultAction + } else { + ruleSet.DefaultAction = nil + } + + // IpRules + if source.IpRules != nil { + ipRuleList := make([]IPRule_STATUS, len(source.IpRules)) + for ipRuleIndex, ipRuleItem := range source.IpRules { + // Shadow the loop variable to avoid aliasing + ipRuleItem := ipRuleItem + var ipRule IPRule_STATUS + err := ipRule.AssignProperties_From_IPRule_STATUS(&ipRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_IPRule_STATUS() to populate field IpRules") + } + ipRuleList[ipRuleIndex] = ipRule + } + ruleSet.IpRules = ipRuleList + } else { + ruleSet.IpRules = nil + } + + // ResourceAccessRules + if source.ResourceAccessRules != nil { + resourceAccessRuleList := make([]ResourceAccessRule_STATUS, len(source.ResourceAccessRules)) + for resourceAccessRuleIndex, resourceAccessRuleItem := range source.ResourceAccessRules { + // Shadow the loop variable to avoid aliasing + resourceAccessRuleItem := resourceAccessRuleItem + var resourceAccessRule ResourceAccessRule_STATUS + err := resourceAccessRule.AssignProperties_From_ResourceAccessRule_STATUS(&resourceAccessRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ResourceAccessRule_STATUS() to populate field ResourceAccessRules") + } + resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule + } + ruleSet.ResourceAccessRules = resourceAccessRuleList + } else { + ruleSet.ResourceAccessRules = nil + } + + // VirtualNetworkRules + if source.VirtualNetworkRules != nil { + virtualNetworkRuleList := make([]VirtualNetworkRule_STATUS, len(source.VirtualNetworkRules)) + for virtualNetworkRuleIndex, virtualNetworkRuleItem := range source.VirtualNetworkRules { + // Shadow the loop variable to avoid aliasing + virtualNetworkRuleItem := virtualNetworkRuleItem + var virtualNetworkRule VirtualNetworkRule_STATUS + err := virtualNetworkRule.AssignProperties_From_VirtualNetworkRule_STATUS(&virtualNetworkRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_VirtualNetworkRule_STATUS() to populate field VirtualNetworkRules") + } + virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule + } + ruleSet.VirtualNetworkRules = virtualNetworkRuleList + } else { + ruleSet.VirtualNetworkRules = nil + } + + // No error + return nil +} + +// AssignProperties_To_NetworkRuleSet_STATUS populates the provided destination NetworkRuleSet_STATUS from our NetworkRuleSet_STATUS +func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_To_NetworkRuleSet_STATUS(destination *v20230101s.NetworkRuleSet_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Bypass + if ruleSet.Bypass != nil { + bypass := string(*ruleSet.Bypass) + destination.Bypass = &bypass + } else { + destination.Bypass = nil + } + + // DefaultAction + if ruleSet.DefaultAction != nil { + defaultAction := string(*ruleSet.DefaultAction) + destination.DefaultAction = &defaultAction + } else { + destination.DefaultAction = nil + } + + // IpRules + if ruleSet.IpRules != nil { + ipRuleList := make([]v20230101s.IPRule_STATUS, len(ruleSet.IpRules)) + for ipRuleIndex, ipRuleItem := range ruleSet.IpRules { + // Shadow the loop variable to avoid aliasing + ipRuleItem := ipRuleItem + var ipRule v20230101s.IPRule_STATUS + err := ipRuleItem.AssignProperties_To_IPRule_STATUS(&ipRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_IPRule_STATUS() to populate field IpRules") + } + ipRuleList[ipRuleIndex] = ipRule + } + destination.IpRules = ipRuleList + } else { + destination.IpRules = nil + } + + // ResourceAccessRules + if ruleSet.ResourceAccessRules != nil { + resourceAccessRuleList := make([]v20230101s.ResourceAccessRule_STATUS, len(ruleSet.ResourceAccessRules)) + for resourceAccessRuleIndex, resourceAccessRuleItem := range ruleSet.ResourceAccessRules { + // Shadow the loop variable to avoid aliasing + resourceAccessRuleItem := resourceAccessRuleItem + var resourceAccessRule v20230101s.ResourceAccessRule_STATUS + err := resourceAccessRuleItem.AssignProperties_To_ResourceAccessRule_STATUS(&resourceAccessRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ResourceAccessRule_STATUS() to populate field ResourceAccessRules") + } + resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule + } + destination.ResourceAccessRules = resourceAccessRuleList + } else { + destination.ResourceAccessRules = nil + } + + // VirtualNetworkRules + if ruleSet.VirtualNetworkRules != nil { + virtualNetworkRuleList := make([]v20230101s.VirtualNetworkRule_STATUS, len(ruleSet.VirtualNetworkRules)) + for virtualNetworkRuleIndex, virtualNetworkRuleItem := range ruleSet.VirtualNetworkRules { + // Shadow the loop variable to avoid aliasing + virtualNetworkRuleItem := virtualNetworkRuleItem + var virtualNetworkRule v20230101s.VirtualNetworkRule_STATUS + err := virtualNetworkRuleItem.AssignProperties_To_VirtualNetworkRule_STATUS(&virtualNetworkRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_VirtualNetworkRule_STATUS() to populate field VirtualNetworkRules") + } + virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule + } + destination.VirtualNetworkRules = virtualNetworkRuleList + } else { + destination.VirtualNetworkRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The Private Endpoint Connection resource. +type PrivateEndpointConnection_STATUS struct { + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` +} + +var _ genruntime.FromARMConverter = &PrivateEndpointConnection_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (connection *PrivateEndpointConnection_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &PrivateEndpointConnection_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (connection *PrivateEndpointConnection_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(PrivateEndpointConnection_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected PrivateEndpointConnection_STATUS_ARM, got %T", armInput) + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + connection.Id = &id + } + + // No error + return nil +} + +// AssignProperties_From_PrivateEndpointConnection_STATUS populates our PrivateEndpointConnection_STATUS from the provided source PrivateEndpointConnection_STATUS +func (connection *PrivateEndpointConnection_STATUS) AssignProperties_From_PrivateEndpointConnection_STATUS(source *v20230101s.PrivateEndpointConnection_STATUS) error { + + // Id + connection.Id = genruntime.ClonePointerToString(source.Id) + + // No error + return nil +} + +// AssignProperties_To_PrivateEndpointConnection_STATUS populates the provided destination PrivateEndpointConnection_STATUS from our PrivateEndpointConnection_STATUS +func (connection *PrivateEndpointConnection_STATUS) AssignProperties_To_PrivateEndpointConnection_STATUS(destination *v20230101s.PrivateEndpointConnection_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Id + destination.Id = genruntime.ClonePointerToString(connection.Id) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user +// data, the default option is microsoft routing +type RoutingPreference struct { + // PublishInternetEndpoints: A boolean flag which indicates whether internet routing storage endpoints are to be published + PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` + + // PublishMicrosoftEndpoints: A boolean flag which indicates whether microsoft routing storage endpoints are to be published + PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` + + // RoutingChoice: Routing Choice defines the kind of network routing opted by the user. + RoutingChoice *RoutingPreference_RoutingChoice `json:"routingChoice,omitempty"` +} + +var _ genruntime.ARMTransformer = &RoutingPreference{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (preference *RoutingPreference) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if preference == nil { + return nil, nil + } + result := &RoutingPreference_ARM{} + + // Set property "PublishInternetEndpoints": + if preference.PublishInternetEndpoints != nil { + publishInternetEndpoints := *preference.PublishInternetEndpoints + result.PublishInternetEndpoints = &publishInternetEndpoints + } + + // Set property "PublishMicrosoftEndpoints": + if preference.PublishMicrosoftEndpoints != nil { + publishMicrosoftEndpoints := *preference.PublishMicrosoftEndpoints + result.PublishMicrosoftEndpoints = &publishMicrosoftEndpoints + } + + // Set property "RoutingChoice": + if preference.RoutingChoice != nil { + routingChoice := *preference.RoutingChoice + result.RoutingChoice = &routingChoice + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (preference *RoutingPreference) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &RoutingPreference_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (preference *RoutingPreference) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(RoutingPreference_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected RoutingPreference_ARM, got %T", armInput) + } + + // Set property "PublishInternetEndpoints": + if typedInput.PublishInternetEndpoints != nil { + publishInternetEndpoints := *typedInput.PublishInternetEndpoints + preference.PublishInternetEndpoints = &publishInternetEndpoints + } + + // Set property "PublishMicrosoftEndpoints": + if typedInput.PublishMicrosoftEndpoints != nil { + publishMicrosoftEndpoints := *typedInput.PublishMicrosoftEndpoints + preference.PublishMicrosoftEndpoints = &publishMicrosoftEndpoints + } + + // Set property "RoutingChoice": + if typedInput.RoutingChoice != nil { + routingChoice := *typedInput.RoutingChoice + preference.RoutingChoice = &routingChoice + } + + // No error + return nil +} + +// AssignProperties_From_RoutingPreference populates our RoutingPreference from the provided source RoutingPreference +func (preference *RoutingPreference) AssignProperties_From_RoutingPreference(source *v20230101s.RoutingPreference) error { + + // PublishInternetEndpoints + if source.PublishInternetEndpoints != nil { + publishInternetEndpoint := *source.PublishInternetEndpoints + preference.PublishInternetEndpoints = &publishInternetEndpoint + } else { + preference.PublishInternetEndpoints = nil + } + + // PublishMicrosoftEndpoints + if source.PublishMicrosoftEndpoints != nil { + publishMicrosoftEndpoint := *source.PublishMicrosoftEndpoints + preference.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint + } else { + preference.PublishMicrosoftEndpoints = nil + } + + // RoutingChoice + if source.RoutingChoice != nil { + routingChoice := RoutingPreference_RoutingChoice(*source.RoutingChoice) + preference.RoutingChoice = &routingChoice + } else { + preference.RoutingChoice = nil + } + + // No error + return nil +} + +// AssignProperties_To_RoutingPreference populates the provided destination RoutingPreference from our RoutingPreference +func (preference *RoutingPreference) AssignProperties_To_RoutingPreference(destination *v20230101s.RoutingPreference) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // PublishInternetEndpoints + if preference.PublishInternetEndpoints != nil { + publishInternetEndpoint := *preference.PublishInternetEndpoints + destination.PublishInternetEndpoints = &publishInternetEndpoint + } else { + destination.PublishInternetEndpoints = nil + } + + // PublishMicrosoftEndpoints + if preference.PublishMicrosoftEndpoints != nil { + publishMicrosoftEndpoint := *preference.PublishMicrosoftEndpoints + destination.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint + } else { + destination.PublishMicrosoftEndpoints = nil + } + + // RoutingChoice + if preference.RoutingChoice != nil { + routingChoice := string(*preference.RoutingChoice) + destination.RoutingChoice = &routingChoice + } else { + destination.RoutingChoice = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_RoutingPreference_STATUS populates our RoutingPreference from the provided source RoutingPreference_STATUS +func (preference *RoutingPreference) Initialize_From_RoutingPreference_STATUS(source *RoutingPreference_STATUS) error { + + // PublishInternetEndpoints + if source.PublishInternetEndpoints != nil { + publishInternetEndpoint := *source.PublishInternetEndpoints + preference.PublishInternetEndpoints = &publishInternetEndpoint + } else { + preference.PublishInternetEndpoints = nil + } + + // PublishMicrosoftEndpoints + if source.PublishMicrosoftEndpoints != nil { + publishMicrosoftEndpoint := *source.PublishMicrosoftEndpoints + preference.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint + } else { + preference.PublishMicrosoftEndpoints = nil + } + + // RoutingChoice + if source.RoutingChoice != nil { + routingChoice := RoutingPreference_RoutingChoice(*source.RoutingChoice) + preference.RoutingChoice = &routingChoice + } else { + preference.RoutingChoice = nil + } + + // No error + return nil +} + +// Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user +// data, the default option is microsoft routing +type RoutingPreference_STATUS struct { + // PublishInternetEndpoints: A boolean flag which indicates whether internet routing storage endpoints are to be published + PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` + + // PublishMicrosoftEndpoints: A boolean flag which indicates whether microsoft routing storage endpoints are to be published + PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` + + // RoutingChoice: Routing Choice defines the kind of network routing opted by the user. + RoutingChoice *RoutingPreference_RoutingChoice_STATUS `json:"routingChoice,omitempty"` +} + +var _ genruntime.FromARMConverter = &RoutingPreference_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (preference *RoutingPreference_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &RoutingPreference_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (preference *RoutingPreference_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(RoutingPreference_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected RoutingPreference_STATUS_ARM, got %T", armInput) + } + + // Set property "PublishInternetEndpoints": + if typedInput.PublishInternetEndpoints != nil { + publishInternetEndpoints := *typedInput.PublishInternetEndpoints + preference.PublishInternetEndpoints = &publishInternetEndpoints + } + + // Set property "PublishMicrosoftEndpoints": + if typedInput.PublishMicrosoftEndpoints != nil { + publishMicrosoftEndpoints := *typedInput.PublishMicrosoftEndpoints + preference.PublishMicrosoftEndpoints = &publishMicrosoftEndpoints + } + + // Set property "RoutingChoice": + if typedInput.RoutingChoice != nil { + routingChoice := *typedInput.RoutingChoice + preference.RoutingChoice = &routingChoice + } + + // No error + return nil +} + +// AssignProperties_From_RoutingPreference_STATUS populates our RoutingPreference_STATUS from the provided source RoutingPreference_STATUS +func (preference *RoutingPreference_STATUS) AssignProperties_From_RoutingPreference_STATUS(source *v20230101s.RoutingPreference_STATUS) error { + + // PublishInternetEndpoints + if source.PublishInternetEndpoints != nil { + publishInternetEndpoint := *source.PublishInternetEndpoints + preference.PublishInternetEndpoints = &publishInternetEndpoint + } else { + preference.PublishInternetEndpoints = nil + } + + // PublishMicrosoftEndpoints + if source.PublishMicrosoftEndpoints != nil { + publishMicrosoftEndpoint := *source.PublishMicrosoftEndpoints + preference.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint + } else { + preference.PublishMicrosoftEndpoints = nil + } + + // RoutingChoice + if source.RoutingChoice != nil { + routingChoice := RoutingPreference_RoutingChoice_STATUS(*source.RoutingChoice) + preference.RoutingChoice = &routingChoice + } else { + preference.RoutingChoice = nil + } + + // No error + return nil +} + +// AssignProperties_To_RoutingPreference_STATUS populates the provided destination RoutingPreference_STATUS from our RoutingPreference_STATUS +func (preference *RoutingPreference_STATUS) AssignProperties_To_RoutingPreference_STATUS(destination *v20230101s.RoutingPreference_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // PublishInternetEndpoints + if preference.PublishInternetEndpoints != nil { + publishInternetEndpoint := *preference.PublishInternetEndpoints + destination.PublishInternetEndpoints = &publishInternetEndpoint + } else { + destination.PublishInternetEndpoints = nil + } + + // PublishMicrosoftEndpoints + if preference.PublishMicrosoftEndpoints != nil { + publishMicrosoftEndpoint := *preference.PublishMicrosoftEndpoints + destination.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint + } else { + destination.PublishMicrosoftEndpoints = nil + } + + // RoutingChoice + if preference.RoutingChoice != nil { + routingChoice := string(*preference.RoutingChoice) + destination.RoutingChoice = &routingChoice + } else { + destination.RoutingChoice = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// SasPolicy assigned to the storage account. +type SasPolicy struct { + // +kubebuilder:validation:Required + // ExpirationAction: The SAS expiration action. Can only be Log. + ExpirationAction *SasPolicy_ExpirationAction `json:"expirationAction,omitempty"` + + // +kubebuilder:validation:Required + // SasExpirationPeriod: The SAS expiration period, DD.HH:MM:SS. + SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"` +} + +var _ genruntime.ARMTransformer = &SasPolicy{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (policy *SasPolicy) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if policy == nil { + return nil, nil + } + result := &SasPolicy_ARM{} + + // Set property "ExpirationAction": + if policy.ExpirationAction != nil { + expirationAction := *policy.ExpirationAction + result.ExpirationAction = &expirationAction + } + + // Set property "SasExpirationPeriod": + if policy.SasExpirationPeriod != nil { + sasExpirationPeriod := *policy.SasExpirationPeriod + result.SasExpirationPeriod = &sasExpirationPeriod + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *SasPolicy) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &SasPolicy_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *SasPolicy) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(SasPolicy_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SasPolicy_ARM, got %T", armInput) + } + + // Set property "ExpirationAction": + if typedInput.ExpirationAction != nil { + expirationAction := *typedInput.ExpirationAction + policy.ExpirationAction = &expirationAction + } + + // Set property "SasExpirationPeriod": + if typedInput.SasExpirationPeriod != nil { + sasExpirationPeriod := *typedInput.SasExpirationPeriod + policy.SasExpirationPeriod = &sasExpirationPeriod + } + + // No error + return nil +} + +// AssignProperties_From_SasPolicy populates our SasPolicy from the provided source SasPolicy +func (policy *SasPolicy) AssignProperties_From_SasPolicy(source *v20230101s.SasPolicy) error { + + // ExpirationAction + if source.ExpirationAction != nil { + expirationAction := SasPolicy_ExpirationAction(*source.ExpirationAction) + policy.ExpirationAction = &expirationAction + } else { + policy.ExpirationAction = nil + } + + // SasExpirationPeriod + policy.SasExpirationPeriod = genruntime.ClonePointerToString(source.SasExpirationPeriod) + + // No error + return nil +} + +// AssignProperties_To_SasPolicy populates the provided destination SasPolicy from our SasPolicy +func (policy *SasPolicy) AssignProperties_To_SasPolicy(destination *v20230101s.SasPolicy) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ExpirationAction + if policy.ExpirationAction != nil { + expirationAction := string(*policy.ExpirationAction) + destination.ExpirationAction = &expirationAction + } else { + destination.ExpirationAction = nil + } + + // SasExpirationPeriod + destination.SasExpirationPeriod = genruntime.ClonePointerToString(policy.SasExpirationPeriod) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_SasPolicy_STATUS populates our SasPolicy from the provided source SasPolicy_STATUS +func (policy *SasPolicy) Initialize_From_SasPolicy_STATUS(source *SasPolicy_STATUS) error { + + // ExpirationAction + if source.ExpirationAction != nil { + expirationAction := SasPolicy_ExpirationAction(*source.ExpirationAction) + policy.ExpirationAction = &expirationAction + } else { + policy.ExpirationAction = nil + } + + // SasExpirationPeriod + policy.SasExpirationPeriod = genruntime.ClonePointerToString(source.SasExpirationPeriod) + + // No error + return nil +} + +// SasPolicy assigned to the storage account. +type SasPolicy_STATUS struct { + // ExpirationAction: The SAS expiration action. Can only be Log. + ExpirationAction *SasPolicy_ExpirationAction_STATUS `json:"expirationAction,omitempty"` + + // SasExpirationPeriod: The SAS expiration period, DD.HH:MM:SS. + SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"` +} + +var _ genruntime.FromARMConverter = &SasPolicy_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *SasPolicy_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &SasPolicy_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *SasPolicy_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(SasPolicy_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SasPolicy_STATUS_ARM, got %T", armInput) + } + + // Set property "ExpirationAction": + if typedInput.ExpirationAction != nil { + expirationAction := *typedInput.ExpirationAction + policy.ExpirationAction = &expirationAction + } + + // Set property "SasExpirationPeriod": + if typedInput.SasExpirationPeriod != nil { + sasExpirationPeriod := *typedInput.SasExpirationPeriod + policy.SasExpirationPeriod = &sasExpirationPeriod + } + + // No error + return nil +} + +// AssignProperties_From_SasPolicy_STATUS populates our SasPolicy_STATUS from the provided source SasPolicy_STATUS +func (policy *SasPolicy_STATUS) AssignProperties_From_SasPolicy_STATUS(source *v20230101s.SasPolicy_STATUS) error { + + // ExpirationAction + if source.ExpirationAction != nil { + expirationAction := SasPolicy_ExpirationAction_STATUS(*source.ExpirationAction) + policy.ExpirationAction = &expirationAction + } else { + policy.ExpirationAction = nil + } + + // SasExpirationPeriod + policy.SasExpirationPeriod = genruntime.ClonePointerToString(source.SasExpirationPeriod) + + // No error + return nil +} + +// AssignProperties_To_SasPolicy_STATUS populates the provided destination SasPolicy_STATUS from our SasPolicy_STATUS +func (policy *SasPolicy_STATUS) AssignProperties_To_SasPolicy_STATUS(destination *v20230101s.SasPolicy_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ExpirationAction + if policy.ExpirationAction != nil { + expirationAction := string(*policy.ExpirationAction) + destination.ExpirationAction = &expirationAction + } else { + destination.ExpirationAction = nil + } + + // SasExpirationPeriod + destination.SasExpirationPeriod = genruntime.ClonePointerToString(policy.SasExpirationPeriod) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The SKU of the storage account. +type Sku struct { + // +kubebuilder:validation:Required + // Name: The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called + // accountType. + Name *SkuName `json:"name,omitempty"` + + // Tier: The SKU tier. This is based on the SKU name. + Tier *Tier `json:"tier,omitempty"` +} + +var _ genruntime.ARMTransformer = &Sku{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (sku *Sku) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if sku == nil { + return nil, nil + } + result := &Sku_ARM{} + + // Set property "Name": + if sku.Name != nil { + name := *sku.Name + result.Name = &name + } + + // Set property "Tier": + if sku.Tier != nil { + tier := *sku.Tier + result.Tier = &tier + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (sku *Sku) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &Sku_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (sku *Sku) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Sku_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Sku_ARM, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + sku.Name = &name + } + + // Set property "Tier": + if typedInput.Tier != nil { + tier := *typedInput.Tier + sku.Tier = &tier + } + + // No error + return nil +} + +// AssignProperties_From_Sku populates our Sku from the provided source Sku +func (sku *Sku) AssignProperties_From_Sku(source *v20230101s.Sku) error { + + // Name + if source.Name != nil { + name := SkuName(*source.Name) + sku.Name = &name + } else { + sku.Name = nil + } + + // Tier + if source.Tier != nil { + tier := Tier(*source.Tier) + sku.Tier = &tier + } else { + sku.Tier = nil + } + + // No error + return nil +} + +// AssignProperties_To_Sku populates the provided destination Sku from our Sku +func (sku *Sku) AssignProperties_To_Sku(destination *v20230101s.Sku) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + if sku.Name != nil { + name := string(*sku.Name) + destination.Name = &name + } else { + destination.Name = nil + } + + // Tier + if sku.Tier != nil { + tier := string(*sku.Tier) + destination.Tier = &tier + } else { + destination.Tier = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_Sku_STATUS populates our Sku from the provided source Sku_STATUS +func (sku *Sku) Initialize_From_Sku_STATUS(source *Sku_STATUS) error { + + // Name + if source.Name != nil { + name := SkuName(*source.Name) + sku.Name = &name + } else { + sku.Name = nil + } + + // Tier + if source.Tier != nil { + tier := Tier(*source.Tier) + sku.Tier = &tier + } else { + sku.Tier = nil + } + + // No error + return nil +} + +// The SKU of the storage account. +type Sku_STATUS struct { + // Name: The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called + // accountType. + Name *SkuName_STATUS `json:"name,omitempty"` + + // Tier: The SKU tier. This is based on the SKU name. + Tier *Tier_STATUS `json:"tier,omitempty"` +} + +var _ genruntime.FromARMConverter = &Sku_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (sku *Sku_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &Sku_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (sku *Sku_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Sku_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Sku_STATUS_ARM, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + sku.Name = &name + } + + // Set property "Tier": + if typedInput.Tier != nil { + tier := *typedInput.Tier + sku.Tier = &tier + } + + // No error + return nil +} + +// AssignProperties_From_Sku_STATUS populates our Sku_STATUS from the provided source Sku_STATUS +func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20230101s.Sku_STATUS) error { + + // Name + if source.Name != nil { + name := SkuName_STATUS(*source.Name) + sku.Name = &name + } else { + sku.Name = nil + } + + // Tier + if source.Tier != nil { + tier := Tier_STATUS(*source.Tier) + sku.Tier = &tier + } else { + sku.Tier = nil + } + + // No error + return nil +} + +// AssignProperties_To_Sku_STATUS populates the provided destination Sku_STATUS from our Sku_STATUS +func (sku *Sku_STATUS) AssignProperties_To_Sku_STATUS(destination *v20230101s.Sku_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + if sku.Name != nil { + name := string(*sku.Name) + destination.Name = &name + } else { + destination.Name = nil + } + + // Tier + if sku.Tier != nil { + tier := string(*sku.Tier) + destination.Tier = &tier + } else { + destination.Tier = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure +type StorageAccountOperatorSpec struct { + // ConfigMaps: configures where to place operator written ConfigMaps. + ConfigMaps *StorageAccountOperatorConfigMaps `json:"configMaps,omitempty"` + + // Secrets: configures where to place Azure generated secrets. + Secrets *StorageAccountOperatorSecrets `json:"secrets,omitempty"` +} + +// AssignProperties_From_StorageAccountOperatorSpec populates our StorageAccountOperatorSpec from the provided source StorageAccountOperatorSpec +func (operator *StorageAccountOperatorSpec) AssignProperties_From_StorageAccountOperatorSpec(source *v20230101s.StorageAccountOperatorSpec) error { + + // ConfigMaps + if source.ConfigMaps != nil { + var configMap StorageAccountOperatorConfigMaps + err := configMap.AssignProperties_From_StorageAccountOperatorConfigMaps(source.ConfigMaps) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccountOperatorConfigMaps() to populate field ConfigMaps") + } + operator.ConfigMaps = &configMap + } else { + operator.ConfigMaps = nil + } + + // Secrets + if source.Secrets != nil { + var secret StorageAccountOperatorSecrets + err := secret.AssignProperties_From_StorageAccountOperatorSecrets(source.Secrets) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccountOperatorSecrets() to populate field Secrets") + } + operator.Secrets = &secret + } else { + operator.Secrets = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountOperatorSpec populates the provided destination StorageAccountOperatorSpec from our StorageAccountOperatorSpec +func (operator *StorageAccountOperatorSpec) AssignProperties_To_StorageAccountOperatorSpec(destination *v20230101s.StorageAccountOperatorSpec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ConfigMaps + if operator.ConfigMaps != nil { + var configMap v20230101s.StorageAccountOperatorConfigMaps + err := operator.ConfigMaps.AssignProperties_To_StorageAccountOperatorConfigMaps(&configMap) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccountOperatorConfigMaps() to populate field ConfigMaps") + } + destination.ConfigMaps = &configMap + } else { + destination.ConfigMaps = nil + } + + // Secrets + if operator.Secrets != nil { + var secret v20230101s.StorageAccountOperatorSecrets + err := operator.Secrets.AssignProperties_To_StorageAccountOperatorSecrets(&secret) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccountOperatorSecrets() to populate field Secrets") + } + destination.Secrets = &secret + } else { + destination.Secrets = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type StorageAccountProperties_AccessTier_STATUS string + +const ( + StorageAccountProperties_AccessTier_STATUS_Cool = StorageAccountProperties_AccessTier_STATUS("Cool") + StorageAccountProperties_AccessTier_STATUS_Hot = StorageAccountProperties_AccessTier_STATUS("Hot") + StorageAccountProperties_AccessTier_STATUS_Premium = StorageAccountProperties_AccessTier_STATUS("Premium") +) + +type StorageAccountProperties_AllowedCopyScope_STATUS string + +const ( + StorageAccountProperties_AllowedCopyScope_STATUS_AAD = StorageAccountProperties_AllowedCopyScope_STATUS("AAD") + StorageAccountProperties_AllowedCopyScope_STATUS_PrivateLink = StorageAccountProperties_AllowedCopyScope_STATUS("PrivateLink") +) + +type StorageAccountProperties_DnsEndpointType_STATUS string + +const ( + StorageAccountProperties_DnsEndpointType_STATUS_AzureDnsZone = StorageAccountProperties_DnsEndpointType_STATUS("AzureDnsZone") + StorageAccountProperties_DnsEndpointType_STATUS_Standard = StorageAccountProperties_DnsEndpointType_STATUS("Standard") +) + +type StorageAccountProperties_LargeFileSharesState_STATUS string + +const ( + StorageAccountProperties_LargeFileSharesState_STATUS_Disabled = StorageAccountProperties_LargeFileSharesState_STATUS("Disabled") + StorageAccountProperties_LargeFileSharesState_STATUS_Enabled = StorageAccountProperties_LargeFileSharesState_STATUS("Enabled") +) + +type StorageAccountProperties_MinimumTlsVersion_STATUS string + +const ( + StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_0 = StorageAccountProperties_MinimumTlsVersion_STATUS("TLS1_0") + StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_1 = StorageAccountProperties_MinimumTlsVersion_STATUS("TLS1_1") + StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_2 = StorageAccountProperties_MinimumTlsVersion_STATUS("TLS1_2") +) + +type StorageAccountProperties_ProvisioningState_STATUS string + +const ( + StorageAccountProperties_ProvisioningState_STATUS_Creating = StorageAccountProperties_ProvisioningState_STATUS("Creating") + StorageAccountProperties_ProvisioningState_STATUS_ResolvingDNS = StorageAccountProperties_ProvisioningState_STATUS("ResolvingDNS") + StorageAccountProperties_ProvisioningState_STATUS_Succeeded = StorageAccountProperties_ProvisioningState_STATUS("Succeeded") +) + +type StorageAccountProperties_PublicNetworkAccess_STATUS string + +const ( + StorageAccountProperties_PublicNetworkAccess_STATUS_Disabled = StorageAccountProperties_PublicNetworkAccess_STATUS("Disabled") + StorageAccountProperties_PublicNetworkAccess_STATUS_Enabled = StorageAccountProperties_PublicNetworkAccess_STATUS("Enabled") +) + +type StorageAccountProperties_StatusOfPrimary_STATUS string + +const ( + StorageAccountProperties_StatusOfPrimary_STATUS_Available = StorageAccountProperties_StatusOfPrimary_STATUS("available") + StorageAccountProperties_StatusOfPrimary_STATUS_Unavailable = StorageAccountProperties_StatusOfPrimary_STATUS("unavailable") +) + +type StorageAccountProperties_StatusOfSecondary_STATUS string + +const ( + StorageAccountProperties_StatusOfSecondary_STATUS_Available = StorageAccountProperties_StatusOfSecondary_STATUS("available") + StorageAccountProperties_StatusOfSecondary_STATUS_Unavailable = StorageAccountProperties_StatusOfSecondary_STATUS("unavailable") +) + +// +kubebuilder:validation:Enum={"Cool","Hot","Premium"} +type StorageAccountPropertiesCreateParameters_AccessTier string + +const ( + StorageAccountPropertiesCreateParameters_AccessTier_Cool = StorageAccountPropertiesCreateParameters_AccessTier("Cool") + StorageAccountPropertiesCreateParameters_AccessTier_Hot = StorageAccountPropertiesCreateParameters_AccessTier("Hot") + StorageAccountPropertiesCreateParameters_AccessTier_Premium = StorageAccountPropertiesCreateParameters_AccessTier("Premium") +) + +// +kubebuilder:validation:Enum={"AAD","PrivateLink"} +type StorageAccountPropertiesCreateParameters_AllowedCopyScope string + +const ( + StorageAccountPropertiesCreateParameters_AllowedCopyScope_AAD = StorageAccountPropertiesCreateParameters_AllowedCopyScope("AAD") + StorageAccountPropertiesCreateParameters_AllowedCopyScope_PrivateLink = StorageAccountPropertiesCreateParameters_AllowedCopyScope("PrivateLink") +) + +// +kubebuilder:validation:Enum={"AzureDnsZone","Standard"} +type StorageAccountPropertiesCreateParameters_DnsEndpointType string + +const ( + StorageAccountPropertiesCreateParameters_DnsEndpointType_AzureDnsZone = StorageAccountPropertiesCreateParameters_DnsEndpointType("AzureDnsZone") + StorageAccountPropertiesCreateParameters_DnsEndpointType_Standard = StorageAccountPropertiesCreateParameters_DnsEndpointType("Standard") +) + +// +kubebuilder:validation:Enum={"Disabled","Enabled"} +type StorageAccountPropertiesCreateParameters_LargeFileSharesState string + +const ( + StorageAccountPropertiesCreateParameters_LargeFileSharesState_Disabled = StorageAccountPropertiesCreateParameters_LargeFileSharesState("Disabled") + StorageAccountPropertiesCreateParameters_LargeFileSharesState_Enabled = StorageAccountPropertiesCreateParameters_LargeFileSharesState("Enabled") +) + +// +kubebuilder:validation:Enum={"TLS1_0","TLS1_1","TLS1_2"} +type StorageAccountPropertiesCreateParameters_MinimumTlsVersion string + +const ( + StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_0 = StorageAccountPropertiesCreateParameters_MinimumTlsVersion("TLS1_0") + StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_1 = StorageAccountPropertiesCreateParameters_MinimumTlsVersion("TLS1_1") + StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_2 = StorageAccountPropertiesCreateParameters_MinimumTlsVersion("TLS1_2") +) + +// +kubebuilder:validation:Enum={"Disabled","Enabled"} +type StorageAccountPropertiesCreateParameters_PublicNetworkAccess string + +const ( + StorageAccountPropertiesCreateParameters_PublicNetworkAccess_Disabled = StorageAccountPropertiesCreateParameters_PublicNetworkAccess("Disabled") + StorageAccountPropertiesCreateParameters_PublicNetworkAccess_Enabled = StorageAccountPropertiesCreateParameters_PublicNetworkAccess("Enabled") +) + +// This defines the sku conversion status object for asynchronous sku conversions. +type StorageAccountSkuConversionStatus_STATUS struct { + // EndTime: This property represents the sku conversion end time. + EndTime *string `json:"endTime,omitempty"` + + // SkuConversionStatus: This property indicates the current sku conversion status. + SkuConversionStatus *StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS `json:"skuConversionStatus,omitempty"` + + // StartTime: This property represents the sku conversion start time. + StartTime *string `json:"startTime,omitempty"` + + // TargetSkuName: This property represents the target sku name to which the account sku is being converted asynchronously. + TargetSkuName *SkuName_STATUS `json:"targetSkuName,omitempty"` +} + +var _ genruntime.FromARMConverter = &StorageAccountSkuConversionStatus_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (status *StorageAccountSkuConversionStatus_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccountSkuConversionStatus_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (status *StorageAccountSkuConversionStatus_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccountSkuConversionStatus_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccountSkuConversionStatus_STATUS_ARM, got %T", armInput) + } + + // Set property "EndTime": + if typedInput.EndTime != nil { + endTime := *typedInput.EndTime + status.EndTime = &endTime + } + + // Set property "SkuConversionStatus": + if typedInput.SkuConversionStatus != nil { + skuConversionStatus := *typedInput.SkuConversionStatus + status.SkuConversionStatus = &skuConversionStatus + } + + // Set property "StartTime": + if typedInput.StartTime != nil { + startTime := *typedInput.StartTime + status.StartTime = &startTime + } + + // Set property "TargetSkuName": + if typedInput.TargetSkuName != nil { + targetSkuName := *typedInput.TargetSkuName + status.TargetSkuName = &targetSkuName + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccountSkuConversionStatus_STATUS populates our StorageAccountSkuConversionStatus_STATUS from the provided source StorageAccountSkuConversionStatus_STATUS +func (status *StorageAccountSkuConversionStatus_STATUS) AssignProperties_From_StorageAccountSkuConversionStatus_STATUS(source *v20230101s.StorageAccountSkuConversionStatus_STATUS) error { + + // EndTime + status.EndTime = genruntime.ClonePointerToString(source.EndTime) + + // SkuConversionStatus + if source.SkuConversionStatus != nil { + skuConversionStatus := StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS(*source.SkuConversionStatus) + status.SkuConversionStatus = &skuConversionStatus + } else { + status.SkuConversionStatus = nil + } + + // StartTime + status.StartTime = genruntime.ClonePointerToString(source.StartTime) + + // TargetSkuName + if source.TargetSkuName != nil { + targetSkuName := SkuName_STATUS(*source.TargetSkuName) + status.TargetSkuName = &targetSkuName + } else { + status.TargetSkuName = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountSkuConversionStatus_STATUS populates the provided destination StorageAccountSkuConversionStatus_STATUS from our StorageAccountSkuConversionStatus_STATUS +func (status *StorageAccountSkuConversionStatus_STATUS) AssignProperties_To_StorageAccountSkuConversionStatus_STATUS(destination *v20230101s.StorageAccountSkuConversionStatus_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // EndTime + destination.EndTime = genruntime.ClonePointerToString(status.EndTime) + + // SkuConversionStatus + if status.SkuConversionStatus != nil { + skuConversionStatus := string(*status.SkuConversionStatus) + destination.SkuConversionStatus = &skuConversionStatus + } else { + destination.SkuConversionStatus = nil + } + + // StartTime + destination.StartTime = genruntime.ClonePointerToString(status.StartTime) + + // TargetSkuName + if status.TargetSkuName != nil { + targetSkuName := string(*status.TargetSkuName) + destination.TargetSkuName = &targetSkuName + } else { + destination.TargetSkuName = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// This defines account-level immutability policy properties. +type AccountImmutabilityPolicyProperties struct { + // AllowProtectedAppendWrites: This property can only be changed for disabled and unlocked time-based retention policies. + // When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only + // new blocks can be added and any existing blocks cannot be modified or deleted. + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + + // +kubebuilder:validation:Maximum=146000 + // +kubebuilder:validation:Minimum=1 + // ImmutabilityPeriodSinceCreationInDays: The immutability period for the blobs in the container since the policy creation, + // in days. + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + + // State: The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state + // allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites + // property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a + // Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition + // to a Locked state which cannot be reverted. + State *AccountImmutabilityPolicyProperties_State `json:"state,omitempty"` +} + +var _ genruntime.ARMTransformer = &AccountImmutabilityPolicyProperties{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (properties *AccountImmutabilityPolicyProperties) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if properties == nil { + return nil, nil + } + result := &AccountImmutabilityPolicyProperties_ARM{} + + // Set property "AllowProtectedAppendWrites": + if properties.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrites := *properties.AllowProtectedAppendWrites + result.AllowProtectedAppendWrites = &allowProtectedAppendWrites + } + + // Set property "ImmutabilityPeriodSinceCreationInDays": + if properties.ImmutabilityPeriodSinceCreationInDays != nil { + immutabilityPeriodSinceCreationInDays := *properties.ImmutabilityPeriodSinceCreationInDays + result.ImmutabilityPeriodSinceCreationInDays = &immutabilityPeriodSinceCreationInDays + } + + // Set property "State": + if properties.State != nil { + state := *properties.State + result.State = &state + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *AccountImmutabilityPolicyProperties) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &AccountImmutabilityPolicyProperties_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *AccountImmutabilityPolicyProperties) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(AccountImmutabilityPolicyProperties_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AccountImmutabilityPolicyProperties_ARM, got %T", armInput) + } + + // Set property "AllowProtectedAppendWrites": + if typedInput.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrites := *typedInput.AllowProtectedAppendWrites + properties.AllowProtectedAppendWrites = &allowProtectedAppendWrites + } + + // Set property "ImmutabilityPeriodSinceCreationInDays": + if typedInput.ImmutabilityPeriodSinceCreationInDays != nil { + immutabilityPeriodSinceCreationInDays := *typedInput.ImmutabilityPeriodSinceCreationInDays + properties.ImmutabilityPeriodSinceCreationInDays = &immutabilityPeriodSinceCreationInDays + } + + // Set property "State": + if typedInput.State != nil { + state := *typedInput.State + properties.State = &state + } + + // No error + return nil +} + +// AssignProperties_From_AccountImmutabilityPolicyProperties populates our AccountImmutabilityPolicyProperties from the provided source AccountImmutabilityPolicyProperties +func (properties *AccountImmutabilityPolicyProperties) AssignProperties_From_AccountImmutabilityPolicyProperties(source *v20230101s.AccountImmutabilityPolicyProperties) error { + + // AllowProtectedAppendWrites + if source.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *source.AllowProtectedAppendWrites + properties.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + properties.AllowProtectedAppendWrites = nil + } + + // ImmutabilityPeriodSinceCreationInDays + if source.ImmutabilityPeriodSinceCreationInDays != nil { + immutabilityPeriodSinceCreationInDay := *source.ImmutabilityPeriodSinceCreationInDays + properties.ImmutabilityPeriodSinceCreationInDays = &immutabilityPeriodSinceCreationInDay + } else { + properties.ImmutabilityPeriodSinceCreationInDays = nil + } + + // State + if source.State != nil { + state := AccountImmutabilityPolicyProperties_State(*source.State) + properties.State = &state + } else { + properties.State = nil + } + + // No error + return nil +} + +// AssignProperties_To_AccountImmutabilityPolicyProperties populates the provided destination AccountImmutabilityPolicyProperties from our AccountImmutabilityPolicyProperties +func (properties *AccountImmutabilityPolicyProperties) AssignProperties_To_AccountImmutabilityPolicyProperties(destination *v20230101s.AccountImmutabilityPolicyProperties) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AllowProtectedAppendWrites + if properties.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *properties.AllowProtectedAppendWrites + destination.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + destination.AllowProtectedAppendWrites = nil + } + + // ImmutabilityPeriodSinceCreationInDays + if properties.ImmutabilityPeriodSinceCreationInDays != nil { + immutabilityPeriodSinceCreationInDay := *properties.ImmutabilityPeriodSinceCreationInDays + destination.ImmutabilityPeriodSinceCreationInDays = &immutabilityPeriodSinceCreationInDay + } else { + destination.ImmutabilityPeriodSinceCreationInDays = nil + } + + // State + if properties.State != nil { + state := string(*properties.State) + destination.State = &state + } else { + destination.State = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_AccountImmutabilityPolicyProperties_STATUS populates our AccountImmutabilityPolicyProperties from the provided source AccountImmutabilityPolicyProperties_STATUS +func (properties *AccountImmutabilityPolicyProperties) Initialize_From_AccountImmutabilityPolicyProperties_STATUS(source *AccountImmutabilityPolicyProperties_STATUS) error { + + // AllowProtectedAppendWrites + if source.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *source.AllowProtectedAppendWrites + properties.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + properties.AllowProtectedAppendWrites = nil + } + + // ImmutabilityPeriodSinceCreationInDays + if source.ImmutabilityPeriodSinceCreationInDays != nil { + immutabilityPeriodSinceCreationInDay := *source.ImmutabilityPeriodSinceCreationInDays + properties.ImmutabilityPeriodSinceCreationInDays = &immutabilityPeriodSinceCreationInDay + } else { + properties.ImmutabilityPeriodSinceCreationInDays = nil + } + + // State + if source.State != nil { + state := AccountImmutabilityPolicyProperties_State(*source.State) + properties.State = &state + } else { + properties.State = nil + } + + // No error + return nil +} + +// This defines account-level immutability policy properties. +type AccountImmutabilityPolicyProperties_STATUS struct { + // AllowProtectedAppendWrites: This property can only be changed for disabled and unlocked time-based retention policies. + // When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only + // new blocks can be added and any existing blocks cannot be modified or deleted. + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + + // ImmutabilityPeriodSinceCreationInDays: The immutability period for the blobs in the container since the policy creation, + // in days. + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + + // State: The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state + // allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites + // property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a + // Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition + // to a Locked state which cannot be reverted. + State *AccountImmutabilityPolicyProperties_State_STATUS `json:"state,omitempty"` +} + +var _ genruntime.FromARMConverter = &AccountImmutabilityPolicyProperties_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *AccountImmutabilityPolicyProperties_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &AccountImmutabilityPolicyProperties_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *AccountImmutabilityPolicyProperties_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(AccountImmutabilityPolicyProperties_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AccountImmutabilityPolicyProperties_STATUS_ARM, got %T", armInput) + } + + // Set property "AllowProtectedAppendWrites": + if typedInput.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrites := *typedInput.AllowProtectedAppendWrites + properties.AllowProtectedAppendWrites = &allowProtectedAppendWrites + } + + // Set property "ImmutabilityPeriodSinceCreationInDays": + if typedInput.ImmutabilityPeriodSinceCreationInDays != nil { + immutabilityPeriodSinceCreationInDays := *typedInput.ImmutabilityPeriodSinceCreationInDays + properties.ImmutabilityPeriodSinceCreationInDays = &immutabilityPeriodSinceCreationInDays + } + + // Set property "State": + if typedInput.State != nil { + state := *typedInput.State + properties.State = &state + } + + // No error + return nil +} + +// AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS populates our AccountImmutabilityPolicyProperties_STATUS from the provided source AccountImmutabilityPolicyProperties_STATUS +func (properties *AccountImmutabilityPolicyProperties_STATUS) AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS(source *v20230101s.AccountImmutabilityPolicyProperties_STATUS) error { + + // AllowProtectedAppendWrites + if source.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *source.AllowProtectedAppendWrites + properties.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + properties.AllowProtectedAppendWrites = nil + } + + // ImmutabilityPeriodSinceCreationInDays + properties.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(source.ImmutabilityPeriodSinceCreationInDays) + + // State + if source.State != nil { + state := AccountImmutabilityPolicyProperties_State_STATUS(*source.State) + properties.State = &state + } else { + properties.State = nil + } + + // No error + return nil +} + +// AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS populates the provided destination AccountImmutabilityPolicyProperties_STATUS from our AccountImmutabilityPolicyProperties_STATUS +func (properties *AccountImmutabilityPolicyProperties_STATUS) AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS(destination *v20230101s.AccountImmutabilityPolicyProperties_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AllowProtectedAppendWrites + if properties.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *properties.AllowProtectedAppendWrites + destination.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + destination.AllowProtectedAppendWrites = nil + } + + // ImmutabilityPeriodSinceCreationInDays + destination.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(properties.ImmutabilityPeriodSinceCreationInDays) + + // State + if properties.State != nil { + state := string(*properties.State) + destination.State = &state + } else { + destination.State = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Settings properties for Active Directory (AD). +type ActiveDirectoryProperties struct { + // AccountType: Specifies the Active Directory account type for Azure Storage. + AccountType *ActiveDirectoryProperties_AccountType `json:"accountType,omitempty"` + + // AzureStorageSid: Specifies the security identifier (SID) for Azure Storage. + AzureStorageSid *string `json:"azureStorageSid,omitempty"` + + // +kubebuilder:validation:Required + // DomainGuid: Specifies the domain GUID. + DomainGuid *string `json:"domainGuid,omitempty"` + + // +kubebuilder:validation:Required + // DomainName: Specifies the primary domain that the AD DNS server is authoritative for. + DomainName *string `json:"domainName,omitempty"` + + // DomainSid: Specifies the security identifier (SID). + DomainSid *string `json:"domainSid,omitempty"` + + // ForestName: Specifies the Active Directory forest to get. + ForestName *string `json:"forestName,omitempty"` + + // NetBiosDomainName: Specifies the NetBIOS domain name. + NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` + + // SamAccountName: Specifies the Active Directory SAMAccountName for Azure Storage. + SamAccountName *string `json:"samAccountName,omitempty"` +} + +var _ genruntime.ARMTransformer = &ActiveDirectoryProperties{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (properties *ActiveDirectoryProperties) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if properties == nil { + return nil, nil + } + result := &ActiveDirectoryProperties_ARM{} + + // Set property "AccountType": + if properties.AccountType != nil { + accountType := *properties.AccountType + result.AccountType = &accountType + } + + // Set property "AzureStorageSid": + if properties.AzureStorageSid != nil { + azureStorageSid := *properties.AzureStorageSid + result.AzureStorageSid = &azureStorageSid + } + + // Set property "DomainGuid": + if properties.DomainGuid != nil { + domainGuid := *properties.DomainGuid + result.DomainGuid = &domainGuid + } + + // Set property "DomainName": + if properties.DomainName != nil { + domainName := *properties.DomainName + result.DomainName = &domainName + } + + // Set property "DomainSid": + if properties.DomainSid != nil { + domainSid := *properties.DomainSid + result.DomainSid = &domainSid + } + + // Set property "ForestName": + if properties.ForestName != nil { + forestName := *properties.ForestName + result.ForestName = &forestName + } + + // Set property "NetBiosDomainName": + if properties.NetBiosDomainName != nil { + netBiosDomainName := *properties.NetBiosDomainName + result.NetBiosDomainName = &netBiosDomainName + } + + // Set property "SamAccountName": + if properties.SamAccountName != nil { + samAccountName := *properties.SamAccountName + result.SamAccountName = &samAccountName + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *ActiveDirectoryProperties) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ActiveDirectoryProperties_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *ActiveDirectoryProperties) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ActiveDirectoryProperties_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ActiveDirectoryProperties_ARM, got %T", armInput) + } + + // Set property "AccountType": + if typedInput.AccountType != nil { + accountType := *typedInput.AccountType + properties.AccountType = &accountType + } + + // Set property "AzureStorageSid": + if typedInput.AzureStorageSid != nil { + azureStorageSid := *typedInput.AzureStorageSid + properties.AzureStorageSid = &azureStorageSid + } + + // Set property "DomainGuid": + if typedInput.DomainGuid != nil { + domainGuid := *typedInput.DomainGuid + properties.DomainGuid = &domainGuid + } + + // Set property "DomainName": + if typedInput.DomainName != nil { + domainName := *typedInput.DomainName + properties.DomainName = &domainName + } + + // Set property "DomainSid": + if typedInput.DomainSid != nil { + domainSid := *typedInput.DomainSid + properties.DomainSid = &domainSid + } + + // Set property "ForestName": + if typedInput.ForestName != nil { + forestName := *typedInput.ForestName + properties.ForestName = &forestName + } + + // Set property "NetBiosDomainName": + if typedInput.NetBiosDomainName != nil { + netBiosDomainName := *typedInput.NetBiosDomainName + properties.NetBiosDomainName = &netBiosDomainName + } + + // Set property "SamAccountName": + if typedInput.SamAccountName != nil { + samAccountName := *typedInput.SamAccountName + properties.SamAccountName = &samAccountName + } + + // No error + return nil +} + +// AssignProperties_From_ActiveDirectoryProperties populates our ActiveDirectoryProperties from the provided source ActiveDirectoryProperties +func (properties *ActiveDirectoryProperties) AssignProperties_From_ActiveDirectoryProperties(source *v20230101s.ActiveDirectoryProperties) error { + + // AccountType + if source.AccountType != nil { + accountType := ActiveDirectoryProperties_AccountType(*source.AccountType) + properties.AccountType = &accountType + } else { + properties.AccountType = nil + } + + // AzureStorageSid + properties.AzureStorageSid = genruntime.ClonePointerToString(source.AzureStorageSid) + + // DomainGuid + properties.DomainGuid = genruntime.ClonePointerToString(source.DomainGuid) + + // DomainName + properties.DomainName = genruntime.ClonePointerToString(source.DomainName) + + // DomainSid + properties.DomainSid = genruntime.ClonePointerToString(source.DomainSid) + + // ForestName + properties.ForestName = genruntime.ClonePointerToString(source.ForestName) + + // NetBiosDomainName + properties.NetBiosDomainName = genruntime.ClonePointerToString(source.NetBiosDomainName) + + // SamAccountName + properties.SamAccountName = genruntime.ClonePointerToString(source.SamAccountName) + + // No error + return nil +} + +// AssignProperties_To_ActiveDirectoryProperties populates the provided destination ActiveDirectoryProperties from our ActiveDirectoryProperties +func (properties *ActiveDirectoryProperties) AssignProperties_To_ActiveDirectoryProperties(destination *v20230101s.ActiveDirectoryProperties) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AccountType + if properties.AccountType != nil { + accountType := string(*properties.AccountType) + destination.AccountType = &accountType + } else { + destination.AccountType = nil + } + + // AzureStorageSid + destination.AzureStorageSid = genruntime.ClonePointerToString(properties.AzureStorageSid) + + // DomainGuid + destination.DomainGuid = genruntime.ClonePointerToString(properties.DomainGuid) + + // DomainName + destination.DomainName = genruntime.ClonePointerToString(properties.DomainName) + + // DomainSid + destination.DomainSid = genruntime.ClonePointerToString(properties.DomainSid) + + // ForestName + destination.ForestName = genruntime.ClonePointerToString(properties.ForestName) + + // NetBiosDomainName + destination.NetBiosDomainName = genruntime.ClonePointerToString(properties.NetBiosDomainName) + + // SamAccountName + destination.SamAccountName = genruntime.ClonePointerToString(properties.SamAccountName) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ActiveDirectoryProperties_STATUS populates our ActiveDirectoryProperties from the provided source ActiveDirectoryProperties_STATUS +func (properties *ActiveDirectoryProperties) Initialize_From_ActiveDirectoryProperties_STATUS(source *ActiveDirectoryProperties_STATUS) error { + + // AccountType + if source.AccountType != nil { + accountType := ActiveDirectoryProperties_AccountType(*source.AccountType) + properties.AccountType = &accountType + } else { + properties.AccountType = nil + } + + // AzureStorageSid + properties.AzureStorageSid = genruntime.ClonePointerToString(source.AzureStorageSid) + + // DomainGuid + properties.DomainGuid = genruntime.ClonePointerToString(source.DomainGuid) + + // DomainName + properties.DomainName = genruntime.ClonePointerToString(source.DomainName) + + // DomainSid + properties.DomainSid = genruntime.ClonePointerToString(source.DomainSid) + + // ForestName + properties.ForestName = genruntime.ClonePointerToString(source.ForestName) + + // NetBiosDomainName + properties.NetBiosDomainName = genruntime.ClonePointerToString(source.NetBiosDomainName) + + // SamAccountName + properties.SamAccountName = genruntime.ClonePointerToString(source.SamAccountName) + + // No error + return nil +} + +// Settings properties for Active Directory (AD). +type ActiveDirectoryProperties_STATUS struct { + // AccountType: Specifies the Active Directory account type for Azure Storage. + AccountType *ActiveDirectoryProperties_AccountType_STATUS `json:"accountType,omitempty"` + + // AzureStorageSid: Specifies the security identifier (SID) for Azure Storage. + AzureStorageSid *string `json:"azureStorageSid,omitempty"` + + // DomainGuid: Specifies the domain GUID. + DomainGuid *string `json:"domainGuid,omitempty"` + + // DomainName: Specifies the primary domain that the AD DNS server is authoritative for. + DomainName *string `json:"domainName,omitempty"` + + // DomainSid: Specifies the security identifier (SID). + DomainSid *string `json:"domainSid,omitempty"` + + // ForestName: Specifies the Active Directory forest to get. + ForestName *string `json:"forestName,omitempty"` + + // NetBiosDomainName: Specifies the NetBIOS domain name. + NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` + + // SamAccountName: Specifies the Active Directory SAMAccountName for Azure Storage. + SamAccountName *string `json:"samAccountName,omitempty"` +} + +var _ genruntime.FromARMConverter = &ActiveDirectoryProperties_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *ActiveDirectoryProperties_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ActiveDirectoryProperties_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *ActiveDirectoryProperties_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ActiveDirectoryProperties_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ActiveDirectoryProperties_STATUS_ARM, got %T", armInput) + } + + // Set property "AccountType": + if typedInput.AccountType != nil { + accountType := *typedInput.AccountType + properties.AccountType = &accountType + } + + // Set property "AzureStorageSid": + if typedInput.AzureStorageSid != nil { + azureStorageSid := *typedInput.AzureStorageSid + properties.AzureStorageSid = &azureStorageSid + } + + // Set property "DomainGuid": + if typedInput.DomainGuid != nil { + domainGuid := *typedInput.DomainGuid + properties.DomainGuid = &domainGuid + } + + // Set property "DomainName": + if typedInput.DomainName != nil { + domainName := *typedInput.DomainName + properties.DomainName = &domainName + } + + // Set property "DomainSid": + if typedInput.DomainSid != nil { + domainSid := *typedInput.DomainSid + properties.DomainSid = &domainSid + } + + // Set property "ForestName": + if typedInput.ForestName != nil { + forestName := *typedInput.ForestName + properties.ForestName = &forestName + } + + // Set property "NetBiosDomainName": + if typedInput.NetBiosDomainName != nil { + netBiosDomainName := *typedInput.NetBiosDomainName + properties.NetBiosDomainName = &netBiosDomainName + } + + // Set property "SamAccountName": + if typedInput.SamAccountName != nil { + samAccountName := *typedInput.SamAccountName + properties.SamAccountName = &samAccountName + } + + // No error + return nil +} + +// AssignProperties_From_ActiveDirectoryProperties_STATUS populates our ActiveDirectoryProperties_STATUS from the provided source ActiveDirectoryProperties_STATUS +func (properties *ActiveDirectoryProperties_STATUS) AssignProperties_From_ActiveDirectoryProperties_STATUS(source *v20230101s.ActiveDirectoryProperties_STATUS) error { + + // AccountType + if source.AccountType != nil { + accountType := ActiveDirectoryProperties_AccountType_STATUS(*source.AccountType) + properties.AccountType = &accountType + } else { + properties.AccountType = nil + } + + // AzureStorageSid + properties.AzureStorageSid = genruntime.ClonePointerToString(source.AzureStorageSid) + + // DomainGuid + properties.DomainGuid = genruntime.ClonePointerToString(source.DomainGuid) + + // DomainName + properties.DomainName = genruntime.ClonePointerToString(source.DomainName) + + // DomainSid + properties.DomainSid = genruntime.ClonePointerToString(source.DomainSid) + + // ForestName + properties.ForestName = genruntime.ClonePointerToString(source.ForestName) + + // NetBiosDomainName + properties.NetBiosDomainName = genruntime.ClonePointerToString(source.NetBiosDomainName) + + // SamAccountName + properties.SamAccountName = genruntime.ClonePointerToString(source.SamAccountName) + + // No error + return nil +} + +// AssignProperties_To_ActiveDirectoryProperties_STATUS populates the provided destination ActiveDirectoryProperties_STATUS from our ActiveDirectoryProperties_STATUS +func (properties *ActiveDirectoryProperties_STATUS) AssignProperties_To_ActiveDirectoryProperties_STATUS(destination *v20230101s.ActiveDirectoryProperties_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AccountType + if properties.AccountType != nil { + accountType := string(*properties.AccountType) + destination.AccountType = &accountType + } else { + destination.AccountType = nil + } + + // AzureStorageSid + destination.AzureStorageSid = genruntime.ClonePointerToString(properties.AzureStorageSid) + + // DomainGuid + destination.DomainGuid = genruntime.ClonePointerToString(properties.DomainGuid) + + // DomainName + destination.DomainName = genruntime.ClonePointerToString(properties.DomainName) + + // DomainSid + destination.DomainSid = genruntime.ClonePointerToString(properties.DomainSid) + + // ForestName + destination.ForestName = genruntime.ClonePointerToString(properties.ForestName) + + // NetBiosDomainName + destination.NetBiosDomainName = genruntime.ClonePointerToString(properties.NetBiosDomainName) + + // SamAccountName + destination.SamAccountName = genruntime.ClonePointerToString(properties.SamAccountName) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"None","StorageFileDataSmbShareContributor","StorageFileDataSmbShareElevatedContributor","StorageFileDataSmbShareReader"} +type AzureFilesIdentityBasedAuthentication_DefaultSharePermission string + +const ( + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_None = AzureFilesIdentityBasedAuthentication_DefaultSharePermission("None") + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareContributor = AzureFilesIdentityBasedAuthentication_DefaultSharePermission("StorageFileDataSmbShareContributor") + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareElevatedContributor = AzureFilesIdentityBasedAuthentication_DefaultSharePermission("StorageFileDataSmbShareElevatedContributor") + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareReader = AzureFilesIdentityBasedAuthentication_DefaultSharePermission("StorageFileDataSmbShareReader") +) + +type AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS string + +const ( + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_None = AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS("None") + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareContributor = AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS("StorageFileDataSmbShareContributor") + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareElevatedContributor = AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS("StorageFileDataSmbShareElevatedContributor") + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareReader = AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS("StorageFileDataSmbShareReader") +) + +// +kubebuilder:validation:Enum={"AADDS","AADKERB","AD","None"} +type AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions string + +const ( + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADDS = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions("AADDS") + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADKERB = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions("AADKERB") + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AD = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions("AD") + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_None = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions("None") +) + +type AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS string + +const ( + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADDS = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS("AADDS") + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADKERB = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS("AADKERB") + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AD = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS("AD") + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_None = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS("None") +) + +// Blob restore parameters +type BlobRestoreParameters_STATUS struct { + // BlobRanges: Blob ranges to restore. + BlobRanges []BlobRestoreRange_STATUS `json:"blobRanges,omitempty"` + + // TimeToRestore: Restore blob to the specified time. + TimeToRestore *string `json:"timeToRestore,omitempty"` +} + +var _ genruntime.FromARMConverter = &BlobRestoreParameters_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (parameters *BlobRestoreParameters_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &BlobRestoreParameters_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (parameters *BlobRestoreParameters_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(BlobRestoreParameters_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected BlobRestoreParameters_STATUS_ARM, got %T", armInput) + } + + // Set property "BlobRanges": + for _, item := range typedInput.BlobRanges { + var item1 BlobRestoreRange_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + parameters.BlobRanges = append(parameters.BlobRanges, item1) + } + + // Set property "TimeToRestore": + if typedInput.TimeToRestore != nil { + timeToRestore := *typedInput.TimeToRestore + parameters.TimeToRestore = &timeToRestore + } + + // No error + return nil +} + +// AssignProperties_From_BlobRestoreParameters_STATUS populates our BlobRestoreParameters_STATUS from the provided source BlobRestoreParameters_STATUS +func (parameters *BlobRestoreParameters_STATUS) AssignProperties_From_BlobRestoreParameters_STATUS(source *v20230101s.BlobRestoreParameters_STATUS) error { + + // BlobRanges + if source.BlobRanges != nil { + blobRangeList := make([]BlobRestoreRange_STATUS, len(source.BlobRanges)) + for blobRangeIndex, blobRangeItem := range source.BlobRanges { + // Shadow the loop variable to avoid aliasing + blobRangeItem := blobRangeItem + var blobRange BlobRestoreRange_STATUS + err := blobRange.AssignProperties_From_BlobRestoreRange_STATUS(&blobRangeItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_BlobRestoreRange_STATUS() to populate field BlobRanges") + } + blobRangeList[blobRangeIndex] = blobRange + } + parameters.BlobRanges = blobRangeList + } else { + parameters.BlobRanges = nil + } + + // TimeToRestore + parameters.TimeToRestore = genruntime.ClonePointerToString(source.TimeToRestore) + + // No error + return nil +} + +// AssignProperties_To_BlobRestoreParameters_STATUS populates the provided destination BlobRestoreParameters_STATUS from our BlobRestoreParameters_STATUS +func (parameters *BlobRestoreParameters_STATUS) AssignProperties_To_BlobRestoreParameters_STATUS(destination *v20230101s.BlobRestoreParameters_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // BlobRanges + if parameters.BlobRanges != nil { + blobRangeList := make([]v20230101s.BlobRestoreRange_STATUS, len(parameters.BlobRanges)) + for blobRangeIndex, blobRangeItem := range parameters.BlobRanges { + // Shadow the loop variable to avoid aliasing + blobRangeItem := blobRangeItem + var blobRange v20230101s.BlobRestoreRange_STATUS + err := blobRangeItem.AssignProperties_To_BlobRestoreRange_STATUS(&blobRange) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_BlobRestoreRange_STATUS() to populate field BlobRanges") + } + blobRangeList[blobRangeIndex] = blobRange + } + destination.BlobRanges = blobRangeList + } else { + destination.BlobRanges = nil + } + + // TimeToRestore + destination.TimeToRestore = genruntime.ClonePointerToString(parameters.TimeToRestore) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type BlobRestoreStatus_Status_STATUS string + +const ( + BlobRestoreStatus_Status_STATUS_Complete = BlobRestoreStatus_Status_STATUS("Complete") + BlobRestoreStatus_Status_STATUS_Failed = BlobRestoreStatus_Status_STATUS("Failed") + BlobRestoreStatus_Status_STATUS_InProgress = BlobRestoreStatus_Status_STATUS("InProgress") +) + +// +kubebuilder:validation:Enum={"Microsoft.Keyvault","Microsoft.Storage"} +type Encryption_KeySource string + +const ( + Encryption_KeySource_MicrosoftKeyvault = Encryption_KeySource("Microsoft.Keyvault") + Encryption_KeySource_MicrosoftStorage = Encryption_KeySource("Microsoft.Storage") +) + +type Encryption_KeySource_STATUS string + +const ( + Encryption_KeySource_STATUS_MicrosoftKeyvault = Encryption_KeySource_STATUS("Microsoft.Keyvault") + Encryption_KeySource_STATUS_MicrosoftStorage = Encryption_KeySource_STATUS("Microsoft.Storage") +) + +// Encryption identity for the storage account. +type EncryptionIdentity struct { + // FederatedIdentityClientId: ClientId of the multi-tenant application to be used in conjunction with the user-assigned + // identity for cross-tenant customer-managed-keys server-side encryption on the storage account. + FederatedIdentityClientId *string `json:"federatedIdentityClientId,omitempty"` + + // UserAssignedIdentityReference: Resource identifier of the UserAssigned identity to be associated with server-side + // encryption on the storage account. + UserAssignedIdentityReference *genruntime.ResourceReference `armReference:"UserAssignedIdentity" json:"userAssignedIdentityReference,omitempty"` +} + +var _ genruntime.ARMTransformer = &EncryptionIdentity{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (identity *EncryptionIdentity) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if identity == nil { + return nil, nil + } + result := &EncryptionIdentity_ARM{} + + // Set property "FederatedIdentityClientId": + if identity.FederatedIdentityClientId != nil { + federatedIdentityClientId := *identity.FederatedIdentityClientId + result.FederatedIdentityClientId = &federatedIdentityClientId + } + + // Set property "UserAssignedIdentity": + if identity.UserAssignedIdentityReference != nil { + userAssignedIdentityReferenceARMID, err := resolved.ResolvedReferences.Lookup(*identity.UserAssignedIdentityReference) + if err != nil { + return nil, err + } + userAssignedIdentityReference := userAssignedIdentityReferenceARMID + result.UserAssignedIdentity = &userAssignedIdentityReference + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identity *EncryptionIdentity) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &EncryptionIdentity_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identity *EncryptionIdentity) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(EncryptionIdentity_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected EncryptionIdentity_ARM, got %T", armInput) + } + + // Set property "FederatedIdentityClientId": + if typedInput.FederatedIdentityClientId != nil { + federatedIdentityClientId := *typedInput.FederatedIdentityClientId + identity.FederatedIdentityClientId = &federatedIdentityClientId + } + + // no assignment for property "UserAssignedIdentityReference" + + // No error + return nil +} + +// AssignProperties_From_EncryptionIdentity populates our EncryptionIdentity from the provided source EncryptionIdentity +func (identity *EncryptionIdentity) AssignProperties_From_EncryptionIdentity(source *v20230101s.EncryptionIdentity) error { + + // FederatedIdentityClientId + identity.FederatedIdentityClientId = genruntime.ClonePointerToString(source.FederatedIdentityClientId) + + // UserAssignedIdentityReference + if source.UserAssignedIdentityReference != nil { + userAssignedIdentityReference := source.UserAssignedIdentityReference.Copy() + identity.UserAssignedIdentityReference = &userAssignedIdentityReference + } else { + identity.UserAssignedIdentityReference = nil + } + + // No error + return nil +} + +// AssignProperties_To_EncryptionIdentity populates the provided destination EncryptionIdentity from our EncryptionIdentity +func (identity *EncryptionIdentity) AssignProperties_To_EncryptionIdentity(destination *v20230101s.EncryptionIdentity) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // FederatedIdentityClientId + destination.FederatedIdentityClientId = genruntime.ClonePointerToString(identity.FederatedIdentityClientId) + + // UserAssignedIdentityReference + if identity.UserAssignedIdentityReference != nil { + userAssignedIdentityReference := identity.UserAssignedIdentityReference.Copy() + destination.UserAssignedIdentityReference = &userAssignedIdentityReference + } else { + destination.UserAssignedIdentityReference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_EncryptionIdentity_STATUS populates our EncryptionIdentity from the provided source EncryptionIdentity_STATUS +func (identity *EncryptionIdentity) Initialize_From_EncryptionIdentity_STATUS(source *EncryptionIdentity_STATUS) error { + + // FederatedIdentityClientId + identity.FederatedIdentityClientId = genruntime.ClonePointerToString(source.FederatedIdentityClientId) + + // No error + return nil +} + +// Encryption identity for the storage account. +type EncryptionIdentity_STATUS struct { + // FederatedIdentityClientId: ClientId of the multi-tenant application to be used in conjunction with the user-assigned + // identity for cross-tenant customer-managed-keys server-side encryption on the storage account. + FederatedIdentityClientId *string `json:"federatedIdentityClientId,omitempty"` + + // UserAssignedIdentity: Resource identifier of the UserAssigned identity to be associated with server-side encryption on + // the storage account. + UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` +} + +var _ genruntime.FromARMConverter = &EncryptionIdentity_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identity *EncryptionIdentity_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &EncryptionIdentity_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identity *EncryptionIdentity_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(EncryptionIdentity_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected EncryptionIdentity_STATUS_ARM, got %T", armInput) + } + + // Set property "FederatedIdentityClientId": + if typedInput.FederatedIdentityClientId != nil { + federatedIdentityClientId := *typedInput.FederatedIdentityClientId + identity.FederatedIdentityClientId = &federatedIdentityClientId + } + + // Set property "UserAssignedIdentity": + if typedInput.UserAssignedIdentity != nil { + userAssignedIdentity := *typedInput.UserAssignedIdentity + identity.UserAssignedIdentity = &userAssignedIdentity + } + + // No error + return nil +} + +// AssignProperties_From_EncryptionIdentity_STATUS populates our EncryptionIdentity_STATUS from the provided source EncryptionIdentity_STATUS +func (identity *EncryptionIdentity_STATUS) AssignProperties_From_EncryptionIdentity_STATUS(source *v20230101s.EncryptionIdentity_STATUS) error { + + // FederatedIdentityClientId + identity.FederatedIdentityClientId = genruntime.ClonePointerToString(source.FederatedIdentityClientId) + + // UserAssignedIdentity + identity.UserAssignedIdentity = genruntime.ClonePointerToString(source.UserAssignedIdentity) + + // No error + return nil +} + +// AssignProperties_To_EncryptionIdentity_STATUS populates the provided destination EncryptionIdentity_STATUS from our EncryptionIdentity_STATUS +func (identity *EncryptionIdentity_STATUS) AssignProperties_To_EncryptionIdentity_STATUS(destination *v20230101s.EncryptionIdentity_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // FederatedIdentityClientId + destination.FederatedIdentityClientId = genruntime.ClonePointerToString(identity.FederatedIdentityClientId) + + // UserAssignedIdentity + destination.UserAssignedIdentity = genruntime.ClonePointerToString(identity.UserAssignedIdentity) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// A list of services that support encryption. +type EncryptionServices struct { + // Blob: The encryption function of the blob storage service. + Blob *EncryptionService `json:"blob,omitempty"` + + // File: The encryption function of the file storage service. + File *EncryptionService `json:"file,omitempty"` + + // Queue: The encryption function of the queue storage service. + Queue *EncryptionService `json:"queue,omitempty"` + + // Table: The encryption function of the table storage service. + Table *EncryptionService `json:"table,omitempty"` +} + +var _ genruntime.ARMTransformer = &EncryptionServices{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (services *EncryptionServices) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if services == nil { + return nil, nil + } + result := &EncryptionServices_ARM{} + + // Set property "Blob": + if services.Blob != nil { + blob_ARM, err := (*services.Blob).ConvertToARM(resolved) + if err != nil { + return nil, err + } + blob := *blob_ARM.(*EncryptionService_ARM) + result.Blob = &blob + } + + // Set property "File": + if services.File != nil { + file_ARM, err := (*services.File).ConvertToARM(resolved) + if err != nil { + return nil, err + } + file := *file_ARM.(*EncryptionService_ARM) + result.File = &file + } + + // Set property "Queue": + if services.Queue != nil { + queue_ARM, err := (*services.Queue).ConvertToARM(resolved) + if err != nil { + return nil, err + } + queue := *queue_ARM.(*EncryptionService_ARM) + result.Queue = &queue + } + + // Set property "Table": + if services.Table != nil { + table_ARM, err := (*services.Table).ConvertToARM(resolved) + if err != nil { + return nil, err + } + table := *table_ARM.(*EncryptionService_ARM) + result.Table = &table + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (services *EncryptionServices) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &EncryptionServices_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (services *EncryptionServices) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(EncryptionServices_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected EncryptionServices_ARM, got %T", armInput) + } + + // Set property "Blob": + if typedInput.Blob != nil { + var blob1 EncryptionService + err := blob1.PopulateFromARM(owner, *typedInput.Blob) + if err != nil { + return err + } + blob := blob1 + services.Blob = &blob + } + + // Set property "File": + if typedInput.File != nil { + var file1 EncryptionService + err := file1.PopulateFromARM(owner, *typedInput.File) + if err != nil { + return err + } + file := file1 + services.File = &file + } + + // Set property "Queue": + if typedInput.Queue != nil { + var queue1 EncryptionService + err := queue1.PopulateFromARM(owner, *typedInput.Queue) + if err != nil { + return err + } + queue := queue1 + services.Queue = &queue + } + + // Set property "Table": + if typedInput.Table != nil { + var table1 EncryptionService + err := table1.PopulateFromARM(owner, *typedInput.Table) + if err != nil { + return err + } + table := table1 + services.Table = &table + } + + // No error + return nil +} + +// AssignProperties_From_EncryptionServices populates our EncryptionServices from the provided source EncryptionServices +func (services *EncryptionServices) AssignProperties_From_EncryptionServices(source *v20230101s.EncryptionServices) error { + + // Blob + if source.Blob != nil { + var blob EncryptionService + err := blob.AssignProperties_From_EncryptionService(source.Blob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService() to populate field Blob") + } + services.Blob = &blob + } else { + services.Blob = nil + } + + // File + if source.File != nil { + var file EncryptionService + err := file.AssignProperties_From_EncryptionService(source.File) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService() to populate field File") + } + services.File = &file + } else { + services.File = nil + } + + // Queue + if source.Queue != nil { + var queue EncryptionService + err := queue.AssignProperties_From_EncryptionService(source.Queue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService() to populate field Queue") + } + services.Queue = &queue + } else { + services.Queue = nil + } + + // Table + if source.Table != nil { + var table EncryptionService + err := table.AssignProperties_From_EncryptionService(source.Table) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService() to populate field Table") + } + services.Table = &table + } else { + services.Table = nil + } + + // No error + return nil +} + +// AssignProperties_To_EncryptionServices populates the provided destination EncryptionServices from our EncryptionServices +func (services *EncryptionServices) AssignProperties_To_EncryptionServices(destination *v20230101s.EncryptionServices) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Blob + if services.Blob != nil { + var blob v20230101s.EncryptionService + err := services.Blob.AssignProperties_To_EncryptionService(&blob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService() to populate field Blob") + } + destination.Blob = &blob + } else { + destination.Blob = nil + } + + // File + if services.File != nil { + var file v20230101s.EncryptionService + err := services.File.AssignProperties_To_EncryptionService(&file) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService() to populate field File") + } + destination.File = &file + } else { + destination.File = nil + } + + // Queue + if services.Queue != nil { + var queue v20230101s.EncryptionService + err := services.Queue.AssignProperties_To_EncryptionService(&queue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService() to populate field Queue") + } + destination.Queue = &queue + } else { + destination.Queue = nil + } + + // Table + if services.Table != nil { + var table v20230101s.EncryptionService + err := services.Table.AssignProperties_To_EncryptionService(&table) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService() to populate field Table") + } + destination.Table = &table + } else { + destination.Table = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_EncryptionServices_STATUS populates our EncryptionServices from the provided source EncryptionServices_STATUS +func (services *EncryptionServices) Initialize_From_EncryptionServices_STATUS(source *EncryptionServices_STATUS) error { + + // Blob + if source.Blob != nil { + var blob EncryptionService + err := blob.Initialize_From_EncryptionService_STATUS(source.Blob) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_EncryptionService_STATUS() to populate field Blob") + } + services.Blob = &blob + } else { + services.Blob = nil + } + + // File + if source.File != nil { + var file EncryptionService + err := file.Initialize_From_EncryptionService_STATUS(source.File) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_EncryptionService_STATUS() to populate field File") + } + services.File = &file + } else { + services.File = nil + } + + // Queue + if source.Queue != nil { + var queue EncryptionService + err := queue.Initialize_From_EncryptionService_STATUS(source.Queue) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_EncryptionService_STATUS() to populate field Queue") + } + services.Queue = &queue + } else { + services.Queue = nil + } + + // Table + if source.Table != nil { + var table EncryptionService + err := table.Initialize_From_EncryptionService_STATUS(source.Table) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_EncryptionService_STATUS() to populate field Table") + } + services.Table = &table + } else { + services.Table = nil + } + + // No error + return nil +} + +// A list of services that support encryption. +type EncryptionServices_STATUS struct { + // Blob: The encryption function of the blob storage service. + Blob *EncryptionService_STATUS `json:"blob,omitempty"` + + // File: The encryption function of the file storage service. + File *EncryptionService_STATUS `json:"file,omitempty"` + + // Queue: The encryption function of the queue storage service. + Queue *EncryptionService_STATUS `json:"queue,omitempty"` + + // Table: The encryption function of the table storage service. + Table *EncryptionService_STATUS `json:"table,omitempty"` +} + +var _ genruntime.FromARMConverter = &EncryptionServices_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (services *EncryptionServices_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &EncryptionServices_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (services *EncryptionServices_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(EncryptionServices_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected EncryptionServices_STATUS_ARM, got %T", armInput) + } + + // Set property "Blob": + if typedInput.Blob != nil { + var blob1 EncryptionService_STATUS + err := blob1.PopulateFromARM(owner, *typedInput.Blob) + if err != nil { + return err + } + blob := blob1 + services.Blob = &blob + } + + // Set property "File": + if typedInput.File != nil { + var file1 EncryptionService_STATUS + err := file1.PopulateFromARM(owner, *typedInput.File) + if err != nil { + return err + } + file := file1 + services.File = &file + } + + // Set property "Queue": + if typedInput.Queue != nil { + var queue1 EncryptionService_STATUS + err := queue1.PopulateFromARM(owner, *typedInput.Queue) + if err != nil { + return err + } + queue := queue1 + services.Queue = &queue + } + + // Set property "Table": + if typedInput.Table != nil { + var table1 EncryptionService_STATUS + err := table1.PopulateFromARM(owner, *typedInput.Table) + if err != nil { + return err + } + table := table1 + services.Table = &table + } + + // No error + return nil +} + +// AssignProperties_From_EncryptionServices_STATUS populates our EncryptionServices_STATUS from the provided source EncryptionServices_STATUS +func (services *EncryptionServices_STATUS) AssignProperties_From_EncryptionServices_STATUS(source *v20230101s.EncryptionServices_STATUS) error { + + // Blob + if source.Blob != nil { + var blob EncryptionService_STATUS + err := blob.AssignProperties_From_EncryptionService_STATUS(source.Blob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService_STATUS() to populate field Blob") + } + services.Blob = &blob + } else { + services.Blob = nil + } + + // File + if source.File != nil { + var file EncryptionService_STATUS + err := file.AssignProperties_From_EncryptionService_STATUS(source.File) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService_STATUS() to populate field File") + } + services.File = &file + } else { + services.File = nil + } + + // Queue + if source.Queue != nil { + var queue EncryptionService_STATUS + err := queue.AssignProperties_From_EncryptionService_STATUS(source.Queue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService_STATUS() to populate field Queue") + } + services.Queue = &queue + } else { + services.Queue = nil + } + + // Table + if source.Table != nil { + var table EncryptionService_STATUS + err := table.AssignProperties_From_EncryptionService_STATUS(source.Table) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionService_STATUS() to populate field Table") + } + services.Table = &table + } else { + services.Table = nil + } + + // No error + return nil +} + +// AssignProperties_To_EncryptionServices_STATUS populates the provided destination EncryptionServices_STATUS from our EncryptionServices_STATUS +func (services *EncryptionServices_STATUS) AssignProperties_To_EncryptionServices_STATUS(destination *v20230101s.EncryptionServices_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Blob + if services.Blob != nil { + var blob v20230101s.EncryptionService_STATUS + err := services.Blob.AssignProperties_To_EncryptionService_STATUS(&blob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService_STATUS() to populate field Blob") + } + destination.Blob = &blob + } else { + destination.Blob = nil + } + + // File + if services.File != nil { + var file v20230101s.EncryptionService_STATUS + err := services.File.AssignProperties_To_EncryptionService_STATUS(&file) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService_STATUS() to populate field File") + } + destination.File = &file + } else { + destination.File = nil + } + + // Queue + if services.Queue != nil { + var queue v20230101s.EncryptionService_STATUS + err := services.Queue.AssignProperties_To_EncryptionService_STATUS(&queue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService_STATUS() to populate field Queue") + } + destination.Queue = &queue + } else { + destination.Queue = nil + } + + // Table + if services.Table != nil { + var table v20230101s.EncryptionService_STATUS + err := services.Table.AssignProperties_To_EncryptionService_STATUS(&table) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionService_STATUS() to populate field Table") + } + destination.Table = &table + } else { + destination.Table = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type GeoReplicationStats_PostFailoverRedundancy_STATUS string + +const ( + GeoReplicationStats_PostFailoverRedundancy_STATUS_Standard_LRS = GeoReplicationStats_PostFailoverRedundancy_STATUS("Standard_LRS") + GeoReplicationStats_PostFailoverRedundancy_STATUS_Standard_ZRS = GeoReplicationStats_PostFailoverRedundancy_STATUS("Standard_ZRS") +) + +type GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS string + +const ( + GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_GRS = GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS("Standard_GRS") + GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_GZRS = GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS("Standard_GZRS") + GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_RAGRS = GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS("Standard_RAGRS") + GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_RAGZRS = GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS("Standard_RAGZRS") +) + +type GeoReplicationStats_Status_STATUS string + +const ( + GeoReplicationStats_Status_STATUS_Bootstrap = GeoReplicationStats_Status_STATUS("Bootstrap") + GeoReplicationStats_Status_STATUS_Live = GeoReplicationStats_Status_STATUS("Live") + GeoReplicationStats_Status_STATUS_Unavailable = GeoReplicationStats_Status_STATUS("Unavailable") +) + +// IP rule with specific IP or IP range in CIDR format. +type IPRule struct { + // Action: The action of IP ACL rule. + Action *IPRule_Action `json:"action,omitempty"` + + // +kubebuilder:validation:Required + // Value: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + Value *string `json:"value,omitempty"` +} + +var _ genruntime.ARMTransformer = &IPRule{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (rule *IPRule) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if rule == nil { + return nil, nil + } + result := &IPRule_ARM{} + + // Set property "Action": + if rule.Action != nil { + action := *rule.Action + result.Action = &action + } + + // Set property "Value": + if rule.Value != nil { + value := *rule.Value + result.Value = &value + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rule *IPRule) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &IPRule_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rule *IPRule) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(IPRule_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected IPRule_ARM, got %T", armInput) + } + + // Set property "Action": + if typedInput.Action != nil { + action := *typedInput.Action + rule.Action = &action + } + + // Set property "Value": + if typedInput.Value != nil { + value := *typedInput.Value + rule.Value = &value + } + + // No error + return nil +} + +// AssignProperties_From_IPRule populates our IPRule from the provided source IPRule +func (rule *IPRule) AssignProperties_From_IPRule(source *v20230101s.IPRule) error { + + // Action + if source.Action != nil { + action := IPRule_Action(*source.Action) + rule.Action = &action + } else { + rule.Action = nil + } + + // Value + rule.Value = genruntime.ClonePointerToString(source.Value) + + // No error + return nil +} + +// AssignProperties_To_IPRule populates the provided destination IPRule from our IPRule +func (rule *IPRule) AssignProperties_To_IPRule(destination *v20230101s.IPRule) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Action + if rule.Action != nil { + action := string(*rule.Action) + destination.Action = &action + } else { + destination.Action = nil + } + + // Value + destination.Value = genruntime.ClonePointerToString(rule.Value) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_IPRule_STATUS populates our IPRule from the provided source IPRule_STATUS +func (rule *IPRule) Initialize_From_IPRule_STATUS(source *IPRule_STATUS) error { + + // Action + if source.Action != nil { + action := IPRule_Action(*source.Action) + rule.Action = &action + } else { + rule.Action = nil + } + + // Value + rule.Value = genruntime.ClonePointerToString(source.Value) + + // No error + return nil +} + +// IP rule with specific IP or IP range in CIDR format. +type IPRule_STATUS struct { + // Action: The action of IP ACL rule. + Action *IPRule_Action_STATUS `json:"action,omitempty"` + + // Value: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + Value *string `json:"value,omitempty"` +} + +var _ genruntime.FromARMConverter = &IPRule_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rule *IPRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &IPRule_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rule *IPRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(IPRule_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected IPRule_STATUS_ARM, got %T", armInput) + } + + // Set property "Action": + if typedInput.Action != nil { + action := *typedInput.Action + rule.Action = &action + } + + // Set property "Value": + if typedInput.Value != nil { + value := *typedInput.Value + rule.Value = &value + } + + // No error + return nil +} + +// AssignProperties_From_IPRule_STATUS populates our IPRule_STATUS from the provided source IPRule_STATUS +func (rule *IPRule_STATUS) AssignProperties_From_IPRule_STATUS(source *v20230101s.IPRule_STATUS) error { + + // Action + if source.Action != nil { + action := IPRule_Action_STATUS(*source.Action) + rule.Action = &action + } else { + rule.Action = nil + } + + // Value + rule.Value = genruntime.ClonePointerToString(source.Value) + + // No error + return nil +} + +// AssignProperties_To_IPRule_STATUS populates the provided destination IPRule_STATUS from our IPRule_STATUS +func (rule *IPRule_STATUS) AssignProperties_To_IPRule_STATUS(destination *v20230101s.IPRule_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Action + if rule.Action != nil { + action := string(*rule.Action) + destination.Action = &action + } else { + destination.Action = nil + } + + // Value + destination.Value = genruntime.ClonePointerToString(rule.Value) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Properties of key vault. +type KeyVaultProperties struct { + // Keyname: The name of KeyVault key. + Keyname *string `json:"keyname,omitempty"` + + // Keyvaulturi: The Uri of KeyVault. + Keyvaulturi *string `json:"keyvaulturi,omitempty"` + + // Keyversion: The version of KeyVault key. + Keyversion *string `json:"keyversion,omitempty"` +} + +var _ genruntime.ARMTransformer = &KeyVaultProperties{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (properties *KeyVaultProperties) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if properties == nil { + return nil, nil + } + result := &KeyVaultProperties_ARM{} + + // Set property "Keyname": + if properties.Keyname != nil { + keyname := *properties.Keyname + result.Keyname = &keyname + } + + // Set property "Keyvaulturi": + if properties.Keyvaulturi != nil { + keyvaulturi := *properties.Keyvaulturi + result.Keyvaulturi = &keyvaulturi + } + + // Set property "Keyversion": + if properties.Keyversion != nil { + keyversion := *properties.Keyversion + result.Keyversion = &keyversion + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *KeyVaultProperties) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &KeyVaultProperties_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *KeyVaultProperties) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(KeyVaultProperties_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected KeyVaultProperties_ARM, got %T", armInput) + } + + // Set property "Keyname": + if typedInput.Keyname != nil { + keyname := *typedInput.Keyname + properties.Keyname = &keyname + } + + // Set property "Keyvaulturi": + if typedInput.Keyvaulturi != nil { + keyvaulturi := *typedInput.Keyvaulturi + properties.Keyvaulturi = &keyvaulturi + } + + // Set property "Keyversion": + if typedInput.Keyversion != nil { + keyversion := *typedInput.Keyversion + properties.Keyversion = &keyversion + } + + // No error + return nil +} + +// AssignProperties_From_KeyVaultProperties populates our KeyVaultProperties from the provided source KeyVaultProperties +func (properties *KeyVaultProperties) AssignProperties_From_KeyVaultProperties(source *v20230101s.KeyVaultProperties) error { + + // Keyname + properties.Keyname = genruntime.ClonePointerToString(source.Keyname) + + // Keyvaulturi + properties.Keyvaulturi = genruntime.ClonePointerToString(source.Keyvaulturi) + + // Keyversion + properties.Keyversion = genruntime.ClonePointerToString(source.Keyversion) + + // No error + return nil +} + +// AssignProperties_To_KeyVaultProperties populates the provided destination KeyVaultProperties from our KeyVaultProperties +func (properties *KeyVaultProperties) AssignProperties_To_KeyVaultProperties(destination *v20230101s.KeyVaultProperties) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Keyname + destination.Keyname = genruntime.ClonePointerToString(properties.Keyname) + + // Keyvaulturi + destination.Keyvaulturi = genruntime.ClonePointerToString(properties.Keyvaulturi) + + // Keyversion + destination.Keyversion = genruntime.ClonePointerToString(properties.Keyversion) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_KeyVaultProperties_STATUS populates our KeyVaultProperties from the provided source KeyVaultProperties_STATUS +func (properties *KeyVaultProperties) Initialize_From_KeyVaultProperties_STATUS(source *KeyVaultProperties_STATUS) error { + + // Keyname + properties.Keyname = genruntime.ClonePointerToString(source.Keyname) + + // Keyvaulturi + properties.Keyvaulturi = genruntime.ClonePointerToString(source.Keyvaulturi) + + // Keyversion + properties.Keyversion = genruntime.ClonePointerToString(source.Keyversion) + + // No error + return nil +} + +// Properties of key vault. +type KeyVaultProperties_STATUS struct { + // CurrentVersionedKeyExpirationTimestamp: This is a read only property that represents the expiration time of the current + // version of the customer managed key used for encryption. + CurrentVersionedKeyExpirationTimestamp *string `json:"currentVersionedKeyExpirationTimestamp,omitempty"` + + // CurrentVersionedKeyIdentifier: The object identifier of the current versioned Key Vault Key in use. + CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"` + + // Keyname: The name of KeyVault key. + Keyname *string `json:"keyname,omitempty"` + + // Keyvaulturi: The Uri of KeyVault. + Keyvaulturi *string `json:"keyvaulturi,omitempty"` + + // Keyversion: The version of KeyVault key. + Keyversion *string `json:"keyversion,omitempty"` + + // LastKeyRotationTimestamp: Timestamp of last rotation of the Key Vault Key. + LastKeyRotationTimestamp *string `json:"lastKeyRotationTimestamp,omitempty"` +} + +var _ genruntime.FromARMConverter = &KeyVaultProperties_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *KeyVaultProperties_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &KeyVaultProperties_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *KeyVaultProperties_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(KeyVaultProperties_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected KeyVaultProperties_STATUS_ARM, got %T", armInput) + } + + // Set property "CurrentVersionedKeyExpirationTimestamp": + if typedInput.CurrentVersionedKeyExpirationTimestamp != nil { + currentVersionedKeyExpirationTimestamp := *typedInput.CurrentVersionedKeyExpirationTimestamp + properties.CurrentVersionedKeyExpirationTimestamp = ¤tVersionedKeyExpirationTimestamp + } + + // Set property "CurrentVersionedKeyIdentifier": + if typedInput.CurrentVersionedKeyIdentifier != nil { + currentVersionedKeyIdentifier := *typedInput.CurrentVersionedKeyIdentifier + properties.CurrentVersionedKeyIdentifier = ¤tVersionedKeyIdentifier + } + + // Set property "Keyname": + if typedInput.Keyname != nil { + keyname := *typedInput.Keyname + properties.Keyname = &keyname + } + + // Set property "Keyvaulturi": + if typedInput.Keyvaulturi != nil { + keyvaulturi := *typedInput.Keyvaulturi + properties.Keyvaulturi = &keyvaulturi + } + + // Set property "Keyversion": + if typedInput.Keyversion != nil { + keyversion := *typedInput.Keyversion + properties.Keyversion = &keyversion + } + + // Set property "LastKeyRotationTimestamp": + if typedInput.LastKeyRotationTimestamp != nil { + lastKeyRotationTimestamp := *typedInput.LastKeyRotationTimestamp + properties.LastKeyRotationTimestamp = &lastKeyRotationTimestamp + } + + // No error + return nil +} + +// AssignProperties_From_KeyVaultProperties_STATUS populates our KeyVaultProperties_STATUS from the provided source KeyVaultProperties_STATUS +func (properties *KeyVaultProperties_STATUS) AssignProperties_From_KeyVaultProperties_STATUS(source *v20230101s.KeyVaultProperties_STATUS) error { + + // CurrentVersionedKeyExpirationTimestamp + properties.CurrentVersionedKeyExpirationTimestamp = genruntime.ClonePointerToString(source.CurrentVersionedKeyExpirationTimestamp) + + // CurrentVersionedKeyIdentifier + properties.CurrentVersionedKeyIdentifier = genruntime.ClonePointerToString(source.CurrentVersionedKeyIdentifier) + + // Keyname + properties.Keyname = genruntime.ClonePointerToString(source.Keyname) + + // Keyvaulturi + properties.Keyvaulturi = genruntime.ClonePointerToString(source.Keyvaulturi) + + // Keyversion + properties.Keyversion = genruntime.ClonePointerToString(source.Keyversion) + + // LastKeyRotationTimestamp + properties.LastKeyRotationTimestamp = genruntime.ClonePointerToString(source.LastKeyRotationTimestamp) + + // No error + return nil +} + +// AssignProperties_To_KeyVaultProperties_STATUS populates the provided destination KeyVaultProperties_STATUS from our KeyVaultProperties_STATUS +func (properties *KeyVaultProperties_STATUS) AssignProperties_To_KeyVaultProperties_STATUS(destination *v20230101s.KeyVaultProperties_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // CurrentVersionedKeyExpirationTimestamp + destination.CurrentVersionedKeyExpirationTimestamp = genruntime.ClonePointerToString(properties.CurrentVersionedKeyExpirationTimestamp) + + // CurrentVersionedKeyIdentifier + destination.CurrentVersionedKeyIdentifier = genruntime.ClonePointerToString(properties.CurrentVersionedKeyIdentifier) + + // Keyname + destination.Keyname = genruntime.ClonePointerToString(properties.Keyname) + + // Keyvaulturi + destination.Keyvaulturi = genruntime.ClonePointerToString(properties.Keyvaulturi) + + // Keyversion + destination.Keyversion = genruntime.ClonePointerToString(properties.Keyversion) + + // LastKeyRotationTimestamp + destination.LastKeyRotationTimestamp = genruntime.ClonePointerToString(properties.LastKeyRotationTimestamp) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"AzureServices","Logging","Metrics","None"} +type NetworkRuleSet_Bypass string + +const ( + NetworkRuleSet_Bypass_AzureServices = NetworkRuleSet_Bypass("AzureServices") + NetworkRuleSet_Bypass_Logging = NetworkRuleSet_Bypass("Logging") + NetworkRuleSet_Bypass_Metrics = NetworkRuleSet_Bypass("Metrics") + NetworkRuleSet_Bypass_None = NetworkRuleSet_Bypass("None") +) + +type NetworkRuleSet_Bypass_STATUS string + +const ( + NetworkRuleSet_Bypass_STATUS_AzureServices = NetworkRuleSet_Bypass_STATUS("AzureServices") + NetworkRuleSet_Bypass_STATUS_Logging = NetworkRuleSet_Bypass_STATUS("Logging") + NetworkRuleSet_Bypass_STATUS_Metrics = NetworkRuleSet_Bypass_STATUS("Metrics") + NetworkRuleSet_Bypass_STATUS_None = NetworkRuleSet_Bypass_STATUS("None") +) + +// +kubebuilder:validation:Enum={"Allow","Deny"} +type NetworkRuleSet_DefaultAction string + +const ( + NetworkRuleSet_DefaultAction_Allow = NetworkRuleSet_DefaultAction("Allow") + NetworkRuleSet_DefaultAction_Deny = NetworkRuleSet_DefaultAction("Deny") +) + +type NetworkRuleSet_DefaultAction_STATUS string + +const ( + NetworkRuleSet_DefaultAction_STATUS_Allow = NetworkRuleSet_DefaultAction_STATUS("Allow") + NetworkRuleSet_DefaultAction_STATUS_Deny = NetworkRuleSet_DefaultAction_STATUS("Deny") +) + +// Resource Access Rule. +type ResourceAccessRule struct { + // ResourceReference: Resource Id + ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"` + + // TenantId: Tenant Id + TenantId *string `json:"tenantId,omitempty"` +} + +var _ genruntime.ARMTransformer = &ResourceAccessRule{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (rule *ResourceAccessRule) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if rule == nil { + return nil, nil + } + result := &ResourceAccessRule_ARM{} + + // Set property "ResourceId": + if rule.ResourceReference != nil { + resourceReferenceARMID, err := resolved.ResolvedReferences.Lookup(*rule.ResourceReference) + if err != nil { + return nil, err + } + resourceReference := resourceReferenceARMID + result.ResourceId = &resourceReference + } + + // Set property "TenantId": + if rule.TenantId != nil { + tenantId := *rule.TenantId + result.TenantId = &tenantId + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rule *ResourceAccessRule) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ResourceAccessRule_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rule *ResourceAccessRule) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ResourceAccessRule_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ResourceAccessRule_ARM, got %T", armInput) + } + + // no assignment for property "ResourceReference" + + // Set property "TenantId": + if typedInput.TenantId != nil { + tenantId := *typedInput.TenantId + rule.TenantId = &tenantId + } + + // No error + return nil +} + +// AssignProperties_From_ResourceAccessRule populates our ResourceAccessRule from the provided source ResourceAccessRule +func (rule *ResourceAccessRule) AssignProperties_From_ResourceAccessRule(source *v20230101s.ResourceAccessRule) error { + + // ResourceReference + if source.ResourceReference != nil { + resourceReference := source.ResourceReference.Copy() + rule.ResourceReference = &resourceReference + } else { + rule.ResourceReference = nil + } + + // TenantId + rule.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // No error + return nil +} + +// AssignProperties_To_ResourceAccessRule populates the provided destination ResourceAccessRule from our ResourceAccessRule +func (rule *ResourceAccessRule) AssignProperties_To_ResourceAccessRule(destination *v20230101s.ResourceAccessRule) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ResourceReference + if rule.ResourceReference != nil { + resourceReference := rule.ResourceReference.Copy() + destination.ResourceReference = &resourceReference + } else { + destination.ResourceReference = nil + } + + // TenantId + destination.TenantId = genruntime.ClonePointerToString(rule.TenantId) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ResourceAccessRule_STATUS populates our ResourceAccessRule from the provided source ResourceAccessRule_STATUS +func (rule *ResourceAccessRule) Initialize_From_ResourceAccessRule_STATUS(source *ResourceAccessRule_STATUS) error { + + // ResourceReference + if source.ResourceId != nil { + resourceReference := genruntime.CreateResourceReferenceFromARMID(*source.ResourceId) + rule.ResourceReference = &resourceReference + } else { + rule.ResourceReference = nil + } + + // TenantId + rule.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // No error + return nil +} + +// Resource Access Rule. +type ResourceAccessRule_STATUS struct { + // ResourceId: Resource Id + ResourceId *string `json:"resourceId,omitempty"` + + // TenantId: Tenant Id + TenantId *string `json:"tenantId,omitempty"` +} + +var _ genruntime.FromARMConverter = &ResourceAccessRule_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rule *ResourceAccessRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ResourceAccessRule_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rule *ResourceAccessRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ResourceAccessRule_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ResourceAccessRule_STATUS_ARM, got %T", armInput) + } + + // Set property "ResourceId": + if typedInput.ResourceId != nil { + resourceId := *typedInput.ResourceId + rule.ResourceId = &resourceId + } + + // Set property "TenantId": + if typedInput.TenantId != nil { + tenantId := *typedInput.TenantId + rule.TenantId = &tenantId + } + + // No error + return nil +} + +// AssignProperties_From_ResourceAccessRule_STATUS populates our ResourceAccessRule_STATUS from the provided source ResourceAccessRule_STATUS +func (rule *ResourceAccessRule_STATUS) AssignProperties_From_ResourceAccessRule_STATUS(source *v20230101s.ResourceAccessRule_STATUS) error { + + // ResourceId + rule.ResourceId = genruntime.ClonePointerToString(source.ResourceId) + + // TenantId + rule.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // No error + return nil +} + +// AssignProperties_To_ResourceAccessRule_STATUS populates the provided destination ResourceAccessRule_STATUS from our ResourceAccessRule_STATUS +func (rule *ResourceAccessRule_STATUS) AssignProperties_To_ResourceAccessRule_STATUS(destination *v20230101s.ResourceAccessRule_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ResourceId + destination.ResourceId = genruntime.ClonePointerToString(rule.ResourceId) + + // TenantId + destination.TenantId = genruntime.ClonePointerToString(rule.TenantId) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"InternetRouting","MicrosoftRouting"} +type RoutingPreference_RoutingChoice string + +const ( + RoutingPreference_RoutingChoice_InternetRouting = RoutingPreference_RoutingChoice("InternetRouting") + RoutingPreference_RoutingChoice_MicrosoftRouting = RoutingPreference_RoutingChoice("MicrosoftRouting") +) + +type RoutingPreference_RoutingChoice_STATUS string + +const ( + RoutingPreference_RoutingChoice_STATUS_InternetRouting = RoutingPreference_RoutingChoice_STATUS("InternetRouting") + RoutingPreference_RoutingChoice_STATUS_MicrosoftRouting = RoutingPreference_RoutingChoice_STATUS("MicrosoftRouting") +) + +// +kubebuilder:validation:Enum={"Log"} +type SasPolicy_ExpirationAction string + +const SasPolicy_ExpirationAction_Log = SasPolicy_ExpirationAction("Log") + +type SasPolicy_ExpirationAction_STATUS string + +const SasPolicy_ExpirationAction_STATUS_Log = SasPolicy_ExpirationAction_STATUS("Log") + +// The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint. +type StorageAccountInternetEndpoints_STATUS struct { + // Blob: Gets the blob endpoint. + Blob *string `json:"blob,omitempty"` + + // Dfs: Gets the dfs endpoint. + Dfs *string `json:"dfs,omitempty"` + + // File: Gets the file endpoint. + File *string `json:"file,omitempty"` + + // Web: Gets the web endpoint. + Web *string `json:"web,omitempty"` +} + +var _ genruntime.FromARMConverter = &StorageAccountInternetEndpoints_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (endpoints *StorageAccountInternetEndpoints_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccountInternetEndpoints_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (endpoints *StorageAccountInternetEndpoints_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccountInternetEndpoints_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccountInternetEndpoints_STATUS_ARM, got %T", armInput) + } + + // Set property "Blob": + if typedInput.Blob != nil { + blob := *typedInput.Blob + endpoints.Blob = &blob + } + + // Set property "Dfs": + if typedInput.Dfs != nil { + dfs := *typedInput.Dfs + endpoints.Dfs = &dfs + } + + // Set property "File": + if typedInput.File != nil { + file := *typedInput.File + endpoints.File = &file + } + + // Set property "Web": + if typedInput.Web != nil { + web := *typedInput.Web + endpoints.Web = &web + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccountInternetEndpoints_STATUS populates our StorageAccountInternetEndpoints_STATUS from the provided source StorageAccountInternetEndpoints_STATUS +func (endpoints *StorageAccountInternetEndpoints_STATUS) AssignProperties_From_StorageAccountInternetEndpoints_STATUS(source *v20230101s.StorageAccountInternetEndpoints_STATUS) error { + + // Blob + endpoints.Blob = genruntime.ClonePointerToString(source.Blob) + + // Dfs + endpoints.Dfs = genruntime.ClonePointerToString(source.Dfs) + + // File + endpoints.File = genruntime.ClonePointerToString(source.File) + + // Web + endpoints.Web = genruntime.ClonePointerToString(source.Web) + + // No error + return nil +} + +// AssignProperties_To_StorageAccountInternetEndpoints_STATUS populates the provided destination StorageAccountInternetEndpoints_STATUS from our StorageAccountInternetEndpoints_STATUS +func (endpoints *StorageAccountInternetEndpoints_STATUS) AssignProperties_To_StorageAccountInternetEndpoints_STATUS(destination *v20230101s.StorageAccountInternetEndpoints_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Blob + destination.Blob = genruntime.ClonePointerToString(endpoints.Blob) + + // Dfs + destination.Dfs = genruntime.ClonePointerToString(endpoints.Dfs) + + // File + destination.File = genruntime.ClonePointerToString(endpoints.File) + + // Web + destination.Web = genruntime.ClonePointerToString(endpoints.Web) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object via a microsoft routing +// endpoint. +type StorageAccountMicrosoftEndpoints_STATUS struct { + // Blob: Gets the blob endpoint. + Blob *string `json:"blob,omitempty"` + + // Dfs: Gets the dfs endpoint. + Dfs *string `json:"dfs,omitempty"` + + // File: Gets the file endpoint. + File *string `json:"file,omitempty"` + + // Queue: Gets the queue endpoint. + Queue *string `json:"queue,omitempty"` + + // Table: Gets the table endpoint. + Table *string `json:"table,omitempty"` + + // Web: Gets the web endpoint. + Web *string `json:"web,omitempty"` +} + +var _ genruntime.FromARMConverter = &StorageAccountMicrosoftEndpoints_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (endpoints *StorageAccountMicrosoftEndpoints_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccountMicrosoftEndpoints_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (endpoints *StorageAccountMicrosoftEndpoints_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccountMicrosoftEndpoints_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccountMicrosoftEndpoints_STATUS_ARM, got %T", armInput) + } + + // Set property "Blob": + if typedInput.Blob != nil { + blob := *typedInput.Blob + endpoints.Blob = &blob + } + + // Set property "Dfs": + if typedInput.Dfs != nil { + dfs := *typedInput.Dfs + endpoints.Dfs = &dfs + } + + // Set property "File": + if typedInput.File != nil { + file := *typedInput.File + endpoints.File = &file + } + + // Set property "Queue": + if typedInput.Queue != nil { + queue := *typedInput.Queue + endpoints.Queue = &queue + } + + // Set property "Table": + if typedInput.Table != nil { + table := *typedInput.Table + endpoints.Table = &table + } + + // Set property "Web": + if typedInput.Web != nil { + web := *typedInput.Web + endpoints.Web = &web + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS populates our StorageAccountMicrosoftEndpoints_STATUS from the provided source StorageAccountMicrosoftEndpoints_STATUS +func (endpoints *StorageAccountMicrosoftEndpoints_STATUS) AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS(source *v20230101s.StorageAccountMicrosoftEndpoints_STATUS) error { + + // Blob + endpoints.Blob = genruntime.ClonePointerToString(source.Blob) + + // Dfs + endpoints.Dfs = genruntime.ClonePointerToString(source.Dfs) + + // File + endpoints.File = genruntime.ClonePointerToString(source.File) + + // Queue + endpoints.Queue = genruntime.ClonePointerToString(source.Queue) + + // Table + endpoints.Table = genruntime.ClonePointerToString(source.Table) + + // Web + endpoints.Web = genruntime.ClonePointerToString(source.Web) + + // No error + return nil +} + +// AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS populates the provided destination StorageAccountMicrosoftEndpoints_STATUS from our StorageAccountMicrosoftEndpoints_STATUS +func (endpoints *StorageAccountMicrosoftEndpoints_STATUS) AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS(destination *v20230101s.StorageAccountMicrosoftEndpoints_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Blob + destination.Blob = genruntime.ClonePointerToString(endpoints.Blob) + + // Dfs + destination.Dfs = genruntime.ClonePointerToString(endpoints.Dfs) + + // File + destination.File = genruntime.ClonePointerToString(endpoints.File) + + // Queue + destination.Queue = genruntime.ClonePointerToString(endpoints.Queue) + + // Table + destination.Table = genruntime.ClonePointerToString(endpoints.Table) + + // Web + destination.Web = genruntime.ClonePointerToString(endpoints.Web) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type StorageAccountOperatorConfigMaps struct { + // BlobEndpoint: indicates where the BlobEndpoint config map should be placed. If omitted, no config map will be created. + BlobEndpoint *genruntime.ConfigMapDestination `json:"blobEndpoint,omitempty"` + + // DfsEndpoint: indicates where the DfsEndpoint config map should be placed. If omitted, no config map will be created. + DfsEndpoint *genruntime.ConfigMapDestination `json:"dfsEndpoint,omitempty"` + + // FileEndpoint: indicates where the FileEndpoint config map should be placed. If omitted, no config map will be created. + FileEndpoint *genruntime.ConfigMapDestination `json:"fileEndpoint,omitempty"` + + // QueueEndpoint: indicates where the QueueEndpoint config map should be placed. If omitted, no config map will be created. + QueueEndpoint *genruntime.ConfigMapDestination `json:"queueEndpoint,omitempty"` + + // TableEndpoint: indicates where the TableEndpoint config map should be placed. If omitted, no config map will be created. + TableEndpoint *genruntime.ConfigMapDestination `json:"tableEndpoint,omitempty"` + + // WebEndpoint: indicates where the WebEndpoint config map should be placed. If omitted, no config map will be created. + WebEndpoint *genruntime.ConfigMapDestination `json:"webEndpoint,omitempty"` +} + +// AssignProperties_From_StorageAccountOperatorConfigMaps populates our StorageAccountOperatorConfigMaps from the provided source StorageAccountOperatorConfigMaps +func (maps *StorageAccountOperatorConfigMaps) AssignProperties_From_StorageAccountOperatorConfigMaps(source *v20230101s.StorageAccountOperatorConfigMaps) error { + + // BlobEndpoint + if source.BlobEndpoint != nil { + blobEndpoint := source.BlobEndpoint.Copy() + maps.BlobEndpoint = &blobEndpoint + } else { + maps.BlobEndpoint = nil + } + + // DfsEndpoint + if source.DfsEndpoint != nil { + dfsEndpoint := source.DfsEndpoint.Copy() + maps.DfsEndpoint = &dfsEndpoint + } else { + maps.DfsEndpoint = nil + } + + // FileEndpoint + if source.FileEndpoint != nil { + fileEndpoint := source.FileEndpoint.Copy() + maps.FileEndpoint = &fileEndpoint + } else { + maps.FileEndpoint = nil + } + + // QueueEndpoint + if source.QueueEndpoint != nil { + queueEndpoint := source.QueueEndpoint.Copy() + maps.QueueEndpoint = &queueEndpoint + } else { + maps.QueueEndpoint = nil + } + + // TableEndpoint + if source.TableEndpoint != nil { + tableEndpoint := source.TableEndpoint.Copy() + maps.TableEndpoint = &tableEndpoint + } else { + maps.TableEndpoint = nil + } + + // WebEndpoint + if source.WebEndpoint != nil { + webEndpoint := source.WebEndpoint.Copy() + maps.WebEndpoint = &webEndpoint + } else { + maps.WebEndpoint = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountOperatorConfigMaps populates the provided destination StorageAccountOperatorConfigMaps from our StorageAccountOperatorConfigMaps +func (maps *StorageAccountOperatorConfigMaps) AssignProperties_To_StorageAccountOperatorConfigMaps(destination *v20230101s.StorageAccountOperatorConfigMaps) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // BlobEndpoint + if maps.BlobEndpoint != nil { + blobEndpoint := maps.BlobEndpoint.Copy() + destination.BlobEndpoint = &blobEndpoint + } else { + destination.BlobEndpoint = nil + } + + // DfsEndpoint + if maps.DfsEndpoint != nil { + dfsEndpoint := maps.DfsEndpoint.Copy() + destination.DfsEndpoint = &dfsEndpoint + } else { + destination.DfsEndpoint = nil + } + + // FileEndpoint + if maps.FileEndpoint != nil { + fileEndpoint := maps.FileEndpoint.Copy() + destination.FileEndpoint = &fileEndpoint + } else { + destination.FileEndpoint = nil + } + + // QueueEndpoint + if maps.QueueEndpoint != nil { + queueEndpoint := maps.QueueEndpoint.Copy() + destination.QueueEndpoint = &queueEndpoint + } else { + destination.QueueEndpoint = nil + } + + // TableEndpoint + if maps.TableEndpoint != nil { + tableEndpoint := maps.TableEndpoint.Copy() + destination.TableEndpoint = &tableEndpoint + } else { + destination.TableEndpoint = nil + } + + // WebEndpoint + if maps.WebEndpoint != nil { + webEndpoint := maps.WebEndpoint.Copy() + destination.WebEndpoint = &webEndpoint + } else { + destination.WebEndpoint = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type StorageAccountOperatorSecrets struct { + // BlobEndpoint: indicates where the BlobEndpoint secret should be placed. If omitted, the secret will not be retrieved + // from Azure. + BlobEndpoint *genruntime.SecretDestination `json:"blobEndpoint,omitempty"` + + // DfsEndpoint: indicates where the DfsEndpoint secret should be placed. If omitted, the secret will not be retrieved from + // Azure. + DfsEndpoint *genruntime.SecretDestination `json:"dfsEndpoint,omitempty"` + + // FileEndpoint: indicates where the FileEndpoint secret should be placed. If omitted, the secret will not be retrieved + // from Azure. + FileEndpoint *genruntime.SecretDestination `json:"fileEndpoint,omitempty"` + + // Key1: indicates where the Key1 secret should be placed. If omitted, the secret will not be retrieved from Azure. + Key1 *genruntime.SecretDestination `json:"key1,omitempty"` + + // Key2: indicates where the Key2 secret should be placed. If omitted, the secret will not be retrieved from Azure. + Key2 *genruntime.SecretDestination `json:"key2,omitempty"` + + // QueueEndpoint: indicates where the QueueEndpoint secret should be placed. If omitted, the secret will not be retrieved + // from Azure. + QueueEndpoint *genruntime.SecretDestination `json:"queueEndpoint,omitempty"` + + // TableEndpoint: indicates where the TableEndpoint secret should be placed. If omitted, the secret will not be retrieved + // from Azure. + TableEndpoint *genruntime.SecretDestination `json:"tableEndpoint,omitempty"` + + // WebEndpoint: indicates where the WebEndpoint secret should be placed. If omitted, the secret will not be retrieved from + // Azure. + WebEndpoint *genruntime.SecretDestination `json:"webEndpoint,omitempty"` +} + +// AssignProperties_From_StorageAccountOperatorSecrets populates our StorageAccountOperatorSecrets from the provided source StorageAccountOperatorSecrets +func (secrets *StorageAccountOperatorSecrets) AssignProperties_From_StorageAccountOperatorSecrets(source *v20230101s.StorageAccountOperatorSecrets) error { + + // BlobEndpoint + if source.BlobEndpoint != nil { + blobEndpoint := source.BlobEndpoint.Copy() + secrets.BlobEndpoint = &blobEndpoint + } else { + secrets.BlobEndpoint = nil + } + + // DfsEndpoint + if source.DfsEndpoint != nil { + dfsEndpoint := source.DfsEndpoint.Copy() + secrets.DfsEndpoint = &dfsEndpoint + } else { + secrets.DfsEndpoint = nil + } + + // FileEndpoint + if source.FileEndpoint != nil { + fileEndpoint := source.FileEndpoint.Copy() + secrets.FileEndpoint = &fileEndpoint + } else { + secrets.FileEndpoint = nil + } + + // Key1 + if source.Key1 != nil { + key1 := source.Key1.Copy() + secrets.Key1 = &key1 + } else { + secrets.Key1 = nil + } + + // Key2 + if source.Key2 != nil { + key2 := source.Key2.Copy() + secrets.Key2 = &key2 + } else { + secrets.Key2 = nil + } + + // QueueEndpoint + if source.QueueEndpoint != nil { + queueEndpoint := source.QueueEndpoint.Copy() + secrets.QueueEndpoint = &queueEndpoint + } else { + secrets.QueueEndpoint = nil + } + + // TableEndpoint + if source.TableEndpoint != nil { + tableEndpoint := source.TableEndpoint.Copy() + secrets.TableEndpoint = &tableEndpoint + } else { + secrets.TableEndpoint = nil + } + + // WebEndpoint + if source.WebEndpoint != nil { + webEndpoint := source.WebEndpoint.Copy() + secrets.WebEndpoint = &webEndpoint + } else { + secrets.WebEndpoint = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccountOperatorSecrets populates the provided destination StorageAccountOperatorSecrets from our StorageAccountOperatorSecrets +func (secrets *StorageAccountOperatorSecrets) AssignProperties_To_StorageAccountOperatorSecrets(destination *v20230101s.StorageAccountOperatorSecrets) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // BlobEndpoint + if secrets.BlobEndpoint != nil { + blobEndpoint := secrets.BlobEndpoint.Copy() + destination.BlobEndpoint = &blobEndpoint + } else { + destination.BlobEndpoint = nil + } + + // DfsEndpoint + if secrets.DfsEndpoint != nil { + dfsEndpoint := secrets.DfsEndpoint.Copy() + destination.DfsEndpoint = &dfsEndpoint + } else { + destination.DfsEndpoint = nil + } + + // FileEndpoint + if secrets.FileEndpoint != nil { + fileEndpoint := secrets.FileEndpoint.Copy() + destination.FileEndpoint = &fileEndpoint + } else { + destination.FileEndpoint = nil + } + + // Key1 + if secrets.Key1 != nil { + key1 := secrets.Key1.Copy() + destination.Key1 = &key1 + } else { + destination.Key1 = nil + } + + // Key2 + if secrets.Key2 != nil { + key2 := secrets.Key2.Copy() + destination.Key2 = &key2 + } else { + destination.Key2 = nil + } + + // QueueEndpoint + if secrets.QueueEndpoint != nil { + queueEndpoint := secrets.QueueEndpoint.Copy() + destination.QueueEndpoint = &queueEndpoint + } else { + destination.QueueEndpoint = nil + } + + // TableEndpoint + if secrets.TableEndpoint != nil { + tableEndpoint := secrets.TableEndpoint.Copy() + destination.TableEndpoint = &tableEndpoint + } else { + destination.TableEndpoint = nil + } + + // WebEndpoint + if secrets.WebEndpoint != nil { + webEndpoint := secrets.WebEndpoint.Copy() + destination.WebEndpoint = &webEndpoint + } else { + destination.WebEndpoint = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS string + +const ( + StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Failed = StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS("Failed") + StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_InProgress = StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS("InProgress") + StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Succeeded = StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS("Succeeded") +) + +// UserAssignedIdentity for the resource. +type UserAssignedIdentity_STATUS struct { + // ClientId: The client ID of the identity. + ClientId *string `json:"clientId,omitempty"` + + // PrincipalId: The principal ID of the identity. + PrincipalId *string `json:"principalId,omitempty"` +} + +var _ genruntime.FromARMConverter = &UserAssignedIdentity_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identity *UserAssignedIdentity_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &UserAssignedIdentity_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identity *UserAssignedIdentity_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(UserAssignedIdentity_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected UserAssignedIdentity_STATUS_ARM, got %T", armInput) + } + + // Set property "ClientId": + if typedInput.ClientId != nil { + clientId := *typedInput.ClientId + identity.ClientId = &clientId + } + + // Set property "PrincipalId": + if typedInput.PrincipalId != nil { + principalId := *typedInput.PrincipalId + identity.PrincipalId = &principalId + } + + // No error + return nil +} + +// AssignProperties_From_UserAssignedIdentity_STATUS populates our UserAssignedIdentity_STATUS from the provided source UserAssignedIdentity_STATUS +func (identity *UserAssignedIdentity_STATUS) AssignProperties_From_UserAssignedIdentity_STATUS(source *v20230101s.UserAssignedIdentity_STATUS) error { + + // ClientId + identity.ClientId = genruntime.ClonePointerToString(source.ClientId) + + // PrincipalId + identity.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId) + + // No error + return nil +} + +// AssignProperties_To_UserAssignedIdentity_STATUS populates the provided destination UserAssignedIdentity_STATUS from our UserAssignedIdentity_STATUS +func (identity *UserAssignedIdentity_STATUS) AssignProperties_To_UserAssignedIdentity_STATUS(destination *v20230101s.UserAssignedIdentity_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ClientId + destination.ClientId = genruntime.ClonePointerToString(identity.ClientId) + + // PrincipalId + destination.PrincipalId = genruntime.ClonePointerToString(identity.PrincipalId) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Information about the user assigned identity for the resource +type UserAssignedIdentityDetails struct { + Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` +} + +// AssignProperties_From_UserAssignedIdentityDetails populates our UserAssignedIdentityDetails from the provided source UserAssignedIdentityDetails +func (details *UserAssignedIdentityDetails) AssignProperties_From_UserAssignedIdentityDetails(source *v20230101s.UserAssignedIdentityDetails) error { + + // Reference + details.Reference = source.Reference.Copy() + + // No error + return nil +} + +// AssignProperties_To_UserAssignedIdentityDetails populates the provided destination UserAssignedIdentityDetails from our UserAssignedIdentityDetails +func (details *UserAssignedIdentityDetails) AssignProperties_To_UserAssignedIdentityDetails(destination *v20230101s.UserAssignedIdentityDetails) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Reference + destination.Reference = details.Reference.Copy() + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Virtual Network rule. +type VirtualNetworkRule struct { + // Action: The action of virtual network rule. + Action *VirtualNetworkRule_Action `json:"action,omitempty"` + + // +kubebuilder:validation:Required + // Reference: Resource ID of a subnet, for example: + // /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` + + // State: Gets the state of virtual network rule. + State *VirtualNetworkRule_State `json:"state,omitempty"` +} + +var _ genruntime.ARMTransformer = &VirtualNetworkRule{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (rule *VirtualNetworkRule) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if rule == nil { + return nil, nil + } + result := &VirtualNetworkRule_ARM{} + + // Set property "Action": + if rule.Action != nil { + action := *rule.Action + result.Action = &action + } + + // Set property "Id": + if rule.Reference != nil { + referenceARMID, err := resolved.ResolvedReferences.Lookup(*rule.Reference) + if err != nil { + return nil, err + } + reference := referenceARMID + result.Id = &reference + } + + // Set property "State": + if rule.State != nil { + state := *rule.State + result.State = &state + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rule *VirtualNetworkRule) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &VirtualNetworkRule_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rule *VirtualNetworkRule) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(VirtualNetworkRule_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VirtualNetworkRule_ARM, got %T", armInput) + } + + // Set property "Action": + if typedInput.Action != nil { + action := *typedInput.Action + rule.Action = &action + } + + // no assignment for property "Reference" + + // Set property "State": + if typedInput.State != nil { + state := *typedInput.State + rule.State = &state + } + + // No error + return nil +} + +// AssignProperties_From_VirtualNetworkRule populates our VirtualNetworkRule from the provided source VirtualNetworkRule +func (rule *VirtualNetworkRule) AssignProperties_From_VirtualNetworkRule(source *v20230101s.VirtualNetworkRule) error { + + // Action + if source.Action != nil { + action := VirtualNetworkRule_Action(*source.Action) + rule.Action = &action + } else { + rule.Action = nil + } + + // Reference + if source.Reference != nil { + reference := source.Reference.Copy() + rule.Reference = &reference + } else { + rule.Reference = nil + } + + // State + if source.State != nil { + state := VirtualNetworkRule_State(*source.State) + rule.State = &state + } else { + rule.State = nil + } + + // No error + return nil +} + +// AssignProperties_To_VirtualNetworkRule populates the provided destination VirtualNetworkRule from our VirtualNetworkRule +func (rule *VirtualNetworkRule) AssignProperties_To_VirtualNetworkRule(destination *v20230101s.VirtualNetworkRule) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Action + if rule.Action != nil { + action := string(*rule.Action) + destination.Action = &action + } else { + destination.Action = nil + } + + // Reference + if rule.Reference != nil { + reference := rule.Reference.Copy() + destination.Reference = &reference + } else { + destination.Reference = nil + } + + // State + if rule.State != nil { + state := string(*rule.State) + destination.State = &state + } else { + destination.State = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_VirtualNetworkRule_STATUS populates our VirtualNetworkRule from the provided source VirtualNetworkRule_STATUS +func (rule *VirtualNetworkRule) Initialize_From_VirtualNetworkRule_STATUS(source *VirtualNetworkRule_STATUS) error { + + // Action + if source.Action != nil { + action := VirtualNetworkRule_Action(*source.Action) + rule.Action = &action + } else { + rule.Action = nil + } + + // Reference + if source.Id != nil { + reference := genruntime.CreateResourceReferenceFromARMID(*source.Id) + rule.Reference = &reference + } else { + rule.Reference = nil + } + + // State + if source.State != nil { + state := VirtualNetworkRule_State(*source.State) + rule.State = &state + } else { + rule.State = nil + } + + // No error + return nil +} + +// Virtual Network rule. +type VirtualNetworkRule_STATUS struct { + // Action: The action of virtual network rule. + Action *VirtualNetworkRule_Action_STATUS `json:"action,omitempty"` + + // Id: Resource ID of a subnet, for example: + // /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + Id *string `json:"id,omitempty"` + + // State: Gets the state of virtual network rule. + State *VirtualNetworkRule_State_STATUS `json:"state,omitempty"` +} + +var _ genruntime.FromARMConverter = &VirtualNetworkRule_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rule *VirtualNetworkRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &VirtualNetworkRule_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rule *VirtualNetworkRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(VirtualNetworkRule_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VirtualNetworkRule_STATUS_ARM, got %T", armInput) + } + + // Set property "Action": + if typedInput.Action != nil { + action := *typedInput.Action + rule.Action = &action + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + rule.Id = &id + } + + // Set property "State": + if typedInput.State != nil { + state := *typedInput.State + rule.State = &state + } + + // No error + return nil +} + +// AssignProperties_From_VirtualNetworkRule_STATUS populates our VirtualNetworkRule_STATUS from the provided source VirtualNetworkRule_STATUS +func (rule *VirtualNetworkRule_STATUS) AssignProperties_From_VirtualNetworkRule_STATUS(source *v20230101s.VirtualNetworkRule_STATUS) error { + + // Action + if source.Action != nil { + action := VirtualNetworkRule_Action_STATUS(*source.Action) + rule.Action = &action + } else { + rule.Action = nil + } + + // Id + rule.Id = genruntime.ClonePointerToString(source.Id) + + // State + if source.State != nil { + state := VirtualNetworkRule_State_STATUS(*source.State) + rule.State = &state + } else { + rule.State = nil + } + + // No error + return nil +} + +// AssignProperties_To_VirtualNetworkRule_STATUS populates the provided destination VirtualNetworkRule_STATUS from our VirtualNetworkRule_STATUS +func (rule *VirtualNetworkRule_STATUS) AssignProperties_To_VirtualNetworkRule_STATUS(destination *v20230101s.VirtualNetworkRule_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Action + if rule.Action != nil { + action := string(*rule.Action) + destination.Action = &action + } else { + destination.Action = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(rule.Id) + + // State + if rule.State != nil { + state := string(*rule.State) + destination.State = &state + } else { + destination.State = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"Disabled","Locked","Unlocked"} +type AccountImmutabilityPolicyProperties_State string + +const ( + AccountImmutabilityPolicyProperties_State_Disabled = AccountImmutabilityPolicyProperties_State("Disabled") + AccountImmutabilityPolicyProperties_State_Locked = AccountImmutabilityPolicyProperties_State("Locked") + AccountImmutabilityPolicyProperties_State_Unlocked = AccountImmutabilityPolicyProperties_State("Unlocked") +) + +type AccountImmutabilityPolicyProperties_State_STATUS string + +const ( + AccountImmutabilityPolicyProperties_State_STATUS_Disabled = AccountImmutabilityPolicyProperties_State_STATUS("Disabled") + AccountImmutabilityPolicyProperties_State_STATUS_Locked = AccountImmutabilityPolicyProperties_State_STATUS("Locked") + AccountImmutabilityPolicyProperties_State_STATUS_Unlocked = AccountImmutabilityPolicyProperties_State_STATUS("Unlocked") +) + +// +kubebuilder:validation:Enum={"Computer","User"} +type ActiveDirectoryProperties_AccountType string + +const ( + ActiveDirectoryProperties_AccountType_Computer = ActiveDirectoryProperties_AccountType("Computer") + ActiveDirectoryProperties_AccountType_User = ActiveDirectoryProperties_AccountType("User") +) + +type ActiveDirectoryProperties_AccountType_STATUS string + +const ( + ActiveDirectoryProperties_AccountType_STATUS_Computer = ActiveDirectoryProperties_AccountType_STATUS("Computer") + ActiveDirectoryProperties_AccountType_STATUS_User = ActiveDirectoryProperties_AccountType_STATUS("User") +) + +// Blob range +type BlobRestoreRange_STATUS struct { + // EndRange: Blob end range. This is exclusive. Empty means account end. + EndRange *string `json:"endRange,omitempty"` + + // StartRange: Blob start range. This is inclusive. Empty means account start. + StartRange *string `json:"startRange,omitempty"` +} + +var _ genruntime.FromARMConverter = &BlobRestoreRange_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (restoreRange *BlobRestoreRange_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &BlobRestoreRange_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (restoreRange *BlobRestoreRange_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(BlobRestoreRange_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected BlobRestoreRange_STATUS_ARM, got %T", armInput) + } + + // Set property "EndRange": + if typedInput.EndRange != nil { + endRange := *typedInput.EndRange + restoreRange.EndRange = &endRange + } + + // Set property "StartRange": + if typedInput.StartRange != nil { + startRange := *typedInput.StartRange + restoreRange.StartRange = &startRange + } + + // No error + return nil +} + +// AssignProperties_From_BlobRestoreRange_STATUS populates our BlobRestoreRange_STATUS from the provided source BlobRestoreRange_STATUS +func (restoreRange *BlobRestoreRange_STATUS) AssignProperties_From_BlobRestoreRange_STATUS(source *v20230101s.BlobRestoreRange_STATUS) error { + + // EndRange + restoreRange.EndRange = genruntime.ClonePointerToString(source.EndRange) + + // StartRange + restoreRange.StartRange = genruntime.ClonePointerToString(source.StartRange) + + // No error + return nil +} + +// AssignProperties_To_BlobRestoreRange_STATUS populates the provided destination BlobRestoreRange_STATUS from our BlobRestoreRange_STATUS +func (restoreRange *BlobRestoreRange_STATUS) AssignProperties_To_BlobRestoreRange_STATUS(destination *v20230101s.BlobRestoreRange_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // EndRange + destination.EndRange = genruntime.ClonePointerToString(restoreRange.EndRange) + + // StartRange + destination.StartRange = genruntime.ClonePointerToString(restoreRange.StartRange) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// A service that allows server-side encryption to be used. +type EncryptionService struct { + // Enabled: A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is + // enabled by default today and cannot be disabled. + Enabled *bool `json:"enabled,omitempty"` + + // KeyType: Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped + // encryption key will be used. 'Service' key type implies that a default service key is used. + KeyType *EncryptionService_KeyType `json:"keyType,omitempty"` +} + +var _ genruntime.ARMTransformer = &EncryptionService{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (service *EncryptionService) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if service == nil { + return nil, nil + } + result := &EncryptionService_ARM{} + + // Set property "Enabled": + if service.Enabled != nil { + enabled := *service.Enabled + result.Enabled = &enabled + } + + // Set property "KeyType": + if service.KeyType != nil { + keyType := *service.KeyType + result.KeyType = &keyType + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (service *EncryptionService) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &EncryptionService_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (service *EncryptionService) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(EncryptionService_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected EncryptionService_ARM, got %T", armInput) + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + service.Enabled = &enabled + } + + // Set property "KeyType": + if typedInput.KeyType != nil { + keyType := *typedInput.KeyType + service.KeyType = &keyType + } + + // No error + return nil +} + +// AssignProperties_From_EncryptionService populates our EncryptionService from the provided source EncryptionService +func (service *EncryptionService) AssignProperties_From_EncryptionService(source *v20230101s.EncryptionService) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + service.Enabled = &enabled + } else { + service.Enabled = nil + } + + // KeyType + if source.KeyType != nil { + keyType := EncryptionService_KeyType(*source.KeyType) + service.KeyType = &keyType + } else { + service.KeyType = nil + } + + // No error + return nil +} + +// AssignProperties_To_EncryptionService populates the provided destination EncryptionService from our EncryptionService +func (service *EncryptionService) AssignProperties_To_EncryptionService(destination *v20230101s.EncryptionService) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Enabled + if service.Enabled != nil { + enabled := *service.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // KeyType + if service.KeyType != nil { + keyType := string(*service.KeyType) + destination.KeyType = &keyType + } else { + destination.KeyType = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_EncryptionService_STATUS populates our EncryptionService from the provided source EncryptionService_STATUS +func (service *EncryptionService) Initialize_From_EncryptionService_STATUS(source *EncryptionService_STATUS) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + service.Enabled = &enabled + } else { + service.Enabled = nil + } + + // KeyType + if source.KeyType != nil { + keyType := EncryptionService_KeyType(*source.KeyType) + service.KeyType = &keyType + } else { + service.KeyType = nil + } + + // No error + return nil +} + +// A service that allows server-side encryption to be used. +type EncryptionService_STATUS struct { + // Enabled: A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is + // enabled by default today and cannot be disabled. + Enabled *bool `json:"enabled,omitempty"` + + // KeyType: Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped + // encryption key will be used. 'Service' key type implies that a default service key is used. + KeyType *EncryptionService_KeyType_STATUS `json:"keyType,omitempty"` + + // LastEnabledTime: Gets a rough estimate of the date/time when the encryption was last enabled by the user. Data is + // encrypted at rest by default today and cannot be disabled. + LastEnabledTime *string `json:"lastEnabledTime,omitempty"` +} + +var _ genruntime.FromARMConverter = &EncryptionService_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (service *EncryptionService_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &EncryptionService_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (service *EncryptionService_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(EncryptionService_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected EncryptionService_STATUS_ARM, got %T", armInput) + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + service.Enabled = &enabled + } + + // Set property "KeyType": + if typedInput.KeyType != nil { + keyType := *typedInput.KeyType + service.KeyType = &keyType + } + + // Set property "LastEnabledTime": + if typedInput.LastEnabledTime != nil { + lastEnabledTime := *typedInput.LastEnabledTime + service.LastEnabledTime = &lastEnabledTime + } + + // No error + return nil +} + +// AssignProperties_From_EncryptionService_STATUS populates our EncryptionService_STATUS from the provided source EncryptionService_STATUS +func (service *EncryptionService_STATUS) AssignProperties_From_EncryptionService_STATUS(source *v20230101s.EncryptionService_STATUS) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + service.Enabled = &enabled + } else { + service.Enabled = nil + } + + // KeyType + if source.KeyType != nil { + keyType := EncryptionService_KeyType_STATUS(*source.KeyType) + service.KeyType = &keyType + } else { + service.KeyType = nil + } + + // LastEnabledTime + service.LastEnabledTime = genruntime.ClonePointerToString(source.LastEnabledTime) + + // No error + return nil +} + +// AssignProperties_To_EncryptionService_STATUS populates the provided destination EncryptionService_STATUS from our EncryptionService_STATUS +func (service *EncryptionService_STATUS) AssignProperties_To_EncryptionService_STATUS(destination *v20230101s.EncryptionService_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Enabled + if service.Enabled != nil { + enabled := *service.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // KeyType + if service.KeyType != nil { + keyType := string(*service.KeyType) + destination.KeyType = &keyType + } else { + destination.KeyType = nil + } + + // LastEnabledTime + destination.LastEnabledTime = genruntime.ClonePointerToString(service.LastEnabledTime) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"Allow"} +type IPRule_Action string + +const IPRule_Action_Allow = IPRule_Action("Allow") + +type IPRule_Action_STATUS string + +const IPRule_Action_STATUS_Allow = IPRule_Action_STATUS("Allow") + +// +kubebuilder:validation:Enum={"Allow"} +type VirtualNetworkRule_Action string + +const VirtualNetworkRule_Action_Allow = VirtualNetworkRule_Action("Allow") + +type VirtualNetworkRule_Action_STATUS string + +const VirtualNetworkRule_Action_STATUS_Allow = VirtualNetworkRule_Action_STATUS("Allow") + +// +kubebuilder:validation:Enum={"Deprovisioning","Failed","NetworkSourceDeleted","Provisioning","Succeeded"} +type VirtualNetworkRule_State string + +const ( + VirtualNetworkRule_State_Deprovisioning = VirtualNetworkRule_State("Deprovisioning") + VirtualNetworkRule_State_Failed = VirtualNetworkRule_State("Failed") + VirtualNetworkRule_State_NetworkSourceDeleted = VirtualNetworkRule_State("NetworkSourceDeleted") + VirtualNetworkRule_State_Provisioning = VirtualNetworkRule_State("Provisioning") + VirtualNetworkRule_State_Succeeded = VirtualNetworkRule_State("Succeeded") +) + +type VirtualNetworkRule_State_STATUS string + +const ( + VirtualNetworkRule_State_STATUS_Deprovisioning = VirtualNetworkRule_State_STATUS("Deprovisioning") + VirtualNetworkRule_State_STATUS_Failed = VirtualNetworkRule_State_STATUS("Failed") + VirtualNetworkRule_State_STATUS_NetworkSourceDeleted = VirtualNetworkRule_State_STATUS("NetworkSourceDeleted") + VirtualNetworkRule_State_STATUS_Provisioning = VirtualNetworkRule_State_STATUS("Provisioning") + VirtualNetworkRule_State_STATUS_Succeeded = VirtualNetworkRule_State_STATUS("Succeeded") +) + +// +kubebuilder:validation:Enum={"Account","Service"} +type EncryptionService_KeyType string + +const ( + EncryptionService_KeyType_Account = EncryptionService_KeyType("Account") + EncryptionService_KeyType_Service = EncryptionService_KeyType("Service") +) + +type EncryptionService_KeyType_STATUS string + +const ( + EncryptionService_KeyType_STATUS_Account = EncryptionService_KeyType_STATUS("Account") + EncryptionService_KeyType_STATUS_Service = EncryptionService_KeyType_STATUS("Service") +) + +func init() { + SchemeBuilder.Register(&StorageAccount{}, &StorageAccountList{}) +} diff --git a/v2/api/storage/v1api20230101/storage_account_types_gen_test.go b/v2/api/storage/v1api20230101/storage_account_types_gen_test.go new file mode 100644 index 00000000000..8ec86f69a38 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_account_types_gen_test.go @@ -0,0 +1,6458 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccount_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccount to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccount, StorageAccountGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccount tests if a specific instance of StorageAccount round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccount(subject StorageAccount) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccount + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccount + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccount_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccount to StorageAccount via AssignProperties_To_StorageAccount & AssignProperties_From_StorageAccount returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccount, StorageAccountGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccount tests if a specific instance of StorageAccount can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccount(subject StorageAccount) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccount + err := copied.AssignProperties_To_StorageAccount(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccount + err = actual.AssignProperties_From_StorageAccount(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccount_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccount via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccount, StorageAccountGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccount runs a test to see if a specific instance of StorageAccount round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccount(subject StorageAccount) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccount + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccount instances for property testing - lazily instantiated by StorageAccountGenerator() +var storageAccountGenerator gopter.Gen + +// StorageAccountGenerator returns a generator of StorageAccount instances for property testing. +func StorageAccountGenerator() gopter.Gen { + if storageAccountGenerator != nil { + return storageAccountGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccount(generators) + storageAccountGenerator = gen.Struct(reflect.TypeOf(StorageAccount{}), generators) + + return storageAccountGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccount is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccount(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccount_SpecGenerator() + gens["Status"] = StorageAccount_STATUSGenerator() +} + +func Test_StorageAccount_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccount_Spec to StorageAccount_Spec via AssignProperties_To_StorageAccount_Spec & AssignProperties_From_StorageAccount_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccount_Spec, StorageAccount_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccount_Spec tests if a specific instance of StorageAccount_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccount_Spec(subject StorageAccount_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccount_Spec + err := copied.AssignProperties_To_StorageAccount_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccount_Spec + err = actual.AssignProperties_From_StorageAccount_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccount_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccount_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccount_Spec, StorageAccount_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccount_Spec runs a test to see if a specific instance of StorageAccount_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccount_Spec(subject StorageAccount_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccount_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccount_Spec instances for property testing - lazily instantiated by +// StorageAccount_SpecGenerator() +var storageAccount_SpecGenerator gopter.Gen + +// StorageAccount_SpecGenerator returns a generator of StorageAccount_Spec instances for property testing. +// We first initialize storageAccount_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccount_SpecGenerator() gopter.Gen { + if storageAccount_SpecGenerator != nil { + return storageAccount_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccount_Spec(generators) + storageAccount_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccount_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccount_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccount_Spec(generators) + storageAccount_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccount_Spec{}), generators) + + return storageAccount_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccount_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccount_Spec(gens map[string]gopter.Gen) { + gens["AccessTier"] = gen.PtrOf(gen.OneConstOf(StorageAccountPropertiesCreateParameters_AccessTier_Cool, StorageAccountPropertiesCreateParameters_AccessTier_Hot, StorageAccountPropertiesCreateParameters_AccessTier_Premium)) + gens["AllowBlobPublicAccess"] = gen.PtrOf(gen.Bool()) + gens["AllowCrossTenantReplication"] = gen.PtrOf(gen.Bool()) + gens["AllowSharedKeyAccess"] = gen.PtrOf(gen.Bool()) + gens["AllowedCopyScope"] = gen.PtrOf(gen.OneConstOf(StorageAccountPropertiesCreateParameters_AllowedCopyScope_AAD, StorageAccountPropertiesCreateParameters_AllowedCopyScope_PrivateLink)) + gens["AzureName"] = gen.AlphaString() + gens["DefaultToOAuthAuthentication"] = gen.PtrOf(gen.Bool()) + gens["DnsEndpointType"] = gen.PtrOf(gen.OneConstOf(StorageAccountPropertiesCreateParameters_DnsEndpointType_AzureDnsZone, StorageAccountPropertiesCreateParameters_DnsEndpointType_Standard)) + gens["IsHnsEnabled"] = gen.PtrOf(gen.Bool()) + gens["IsLocalUserEnabled"] = gen.PtrOf(gen.Bool()) + gens["IsNfsV3Enabled"] = gen.PtrOf(gen.Bool()) + gens["IsSftpEnabled"] = gen.PtrOf(gen.Bool()) + gens["Kind"] = gen.PtrOf(gen.OneConstOf( + StorageAccount_Kind_Spec_BlobStorage, + StorageAccount_Kind_Spec_BlockBlobStorage, + StorageAccount_Kind_Spec_FileStorage, + StorageAccount_Kind_Spec_Storage, + StorageAccount_Kind_Spec_StorageV2)) + gens["LargeFileSharesState"] = gen.PtrOf(gen.OneConstOf(StorageAccountPropertiesCreateParameters_LargeFileSharesState_Disabled, StorageAccountPropertiesCreateParameters_LargeFileSharesState_Enabled)) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["MinimumTlsVersion"] = gen.PtrOf(gen.OneConstOf(StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_0, StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_1, StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_2)) + gens["PublicNetworkAccess"] = gen.PtrOf(gen.OneConstOf(StorageAccountPropertiesCreateParameters_PublicNetworkAccess_Disabled, StorageAccountPropertiesCreateParameters_PublicNetworkAccess_Enabled)) + gens["SupportsHttpsTrafficOnly"] = gen.PtrOf(gen.Bool()) + gens["Tags"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccount_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccount_Spec(gens map[string]gopter.Gen) { + gens["AzureFilesIdentityBasedAuthentication"] = gen.PtrOf(AzureFilesIdentityBasedAuthenticationGenerator()) + gens["CustomDomain"] = gen.PtrOf(CustomDomainGenerator()) + gens["Encryption"] = gen.PtrOf(EncryptionGenerator()) + gens["ExtendedLocation"] = gen.PtrOf(ExtendedLocationGenerator()) + gens["Identity"] = gen.PtrOf(IdentityGenerator()) + gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageAccountGenerator()) + gens["KeyPolicy"] = gen.PtrOf(KeyPolicyGenerator()) + gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSetGenerator()) + gens["OperatorSpec"] = gen.PtrOf(StorageAccountOperatorSpecGenerator()) + gens["RoutingPreference"] = gen.PtrOf(RoutingPreferenceGenerator()) + gens["SasPolicy"] = gen.PtrOf(SasPolicyGenerator()) + gens["Sku"] = gen.PtrOf(SkuGenerator()) +} + +func Test_StorageAccount_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccount_STATUS to StorageAccount_STATUS via AssignProperties_To_StorageAccount_STATUS & AssignProperties_From_StorageAccount_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccount_STATUS, StorageAccount_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccount_STATUS tests if a specific instance of StorageAccount_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccount_STATUS(subject StorageAccount_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccount_STATUS + err := copied.AssignProperties_To_StorageAccount_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccount_STATUS + err = actual.AssignProperties_From_StorageAccount_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccount_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccount_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccount_STATUS, StorageAccount_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccount_STATUS runs a test to see if a specific instance of StorageAccount_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccount_STATUS(subject StorageAccount_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccount_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccount_STATUS instances for property testing - lazily instantiated by +// StorageAccount_STATUSGenerator() +var storageAccount_STATUSGenerator gopter.Gen + +// StorageAccount_STATUSGenerator returns a generator of StorageAccount_STATUS instances for property testing. +// We first initialize storageAccount_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccount_STATUSGenerator() gopter.Gen { + if storageAccount_STATUSGenerator != nil { + return storageAccount_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccount_STATUS(generators) + storageAccount_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccount_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccount_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccount_STATUS(generators) + storageAccount_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccount_STATUS{}), generators) + + return storageAccount_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccount_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccount_STATUS(gens map[string]gopter.Gen) { + gens["AccessTier"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_AccessTier_STATUS_Cool, StorageAccountProperties_AccessTier_STATUS_Hot, StorageAccountProperties_AccessTier_STATUS_Premium)) + gens["AccountMigrationInProgress"] = gen.PtrOf(gen.Bool()) + gens["AllowBlobPublicAccess"] = gen.PtrOf(gen.Bool()) + gens["AllowCrossTenantReplication"] = gen.PtrOf(gen.Bool()) + gens["AllowSharedKeyAccess"] = gen.PtrOf(gen.Bool()) + gens["AllowedCopyScope"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_AllowedCopyScope_STATUS_AAD, StorageAccountProperties_AllowedCopyScope_STATUS_PrivateLink)) + gens["CreationTime"] = gen.PtrOf(gen.AlphaString()) + gens["DefaultToOAuthAuthentication"] = gen.PtrOf(gen.Bool()) + gens["DnsEndpointType"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_DnsEndpointType_STATUS_AzureDnsZone, StorageAccountProperties_DnsEndpointType_STATUS_Standard)) + gens["FailoverInProgress"] = gen.PtrOf(gen.Bool()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["IsHnsEnabled"] = gen.PtrOf(gen.Bool()) + gens["IsLocalUserEnabled"] = gen.PtrOf(gen.Bool()) + gens["IsNfsV3Enabled"] = gen.PtrOf(gen.Bool()) + gens["IsSftpEnabled"] = gen.PtrOf(gen.Bool()) + gens["IsSkuConversionBlocked"] = gen.PtrOf(gen.Bool()) + gens["Kind"] = gen.PtrOf(gen.OneConstOf( + StorageAccount_Kind_STATUS_BlobStorage, + StorageAccount_Kind_STATUS_BlockBlobStorage, + StorageAccount_Kind_STATUS_FileStorage, + StorageAccount_Kind_STATUS_Storage, + StorageAccount_Kind_STATUS_StorageV2)) + gens["LargeFileSharesState"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_LargeFileSharesState_STATUS_Disabled, StorageAccountProperties_LargeFileSharesState_STATUS_Enabled)) + gens["LastGeoFailoverTime"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["MinimumTlsVersion"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_0, StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_1, StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_2)) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["PrimaryLocation"] = gen.PtrOf(gen.AlphaString()) + gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_ProvisioningState_STATUS_Creating, StorageAccountProperties_ProvisioningState_STATUS_ResolvingDNS, StorageAccountProperties_ProvisioningState_STATUS_Succeeded)) + gens["PublicNetworkAccess"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_PublicNetworkAccess_STATUS_Disabled, StorageAccountProperties_PublicNetworkAccess_STATUS_Enabled)) + gens["SecondaryLocation"] = gen.PtrOf(gen.AlphaString()) + gens["StatusOfPrimary"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_StatusOfPrimary_STATUS_Available, StorageAccountProperties_StatusOfPrimary_STATUS_Unavailable)) + gens["StatusOfSecondary"] = gen.PtrOf(gen.OneConstOf(StorageAccountProperties_StatusOfSecondary_STATUS_Available, StorageAccountProperties_StatusOfSecondary_STATUS_Unavailable)) + gens["SupportsHttpsTrafficOnly"] = gen.PtrOf(gen.Bool()) + gens["Tags"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccount_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccount_STATUS(gens map[string]gopter.Gen) { + gens["AzureFilesIdentityBasedAuthentication"] = gen.PtrOf(AzureFilesIdentityBasedAuthentication_STATUSGenerator()) + gens["BlobRestoreStatus"] = gen.PtrOf(BlobRestoreStatus_STATUSGenerator()) + gens["CustomDomain"] = gen.PtrOf(CustomDomain_STATUSGenerator()) + gens["Encryption"] = gen.PtrOf(Encryption_STATUSGenerator()) + gens["ExtendedLocation"] = gen.PtrOf(ExtendedLocation_STATUSGenerator()) + gens["GeoReplicationStats"] = gen.PtrOf(GeoReplicationStats_STATUSGenerator()) + gens["Identity"] = gen.PtrOf(Identity_STATUSGenerator()) + gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageAccount_STATUSGenerator()) + gens["KeyCreationTime"] = gen.PtrOf(KeyCreationTime_STATUSGenerator()) + gens["KeyPolicy"] = gen.PtrOf(KeyPolicy_STATUSGenerator()) + gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSet_STATUSGenerator()) + gens["PrimaryEndpoints"] = gen.PtrOf(Endpoints_STATUSGenerator()) + gens["PrivateEndpointConnections"] = gen.SliceOf(PrivateEndpointConnection_STATUSGenerator()) + gens["RoutingPreference"] = gen.PtrOf(RoutingPreference_STATUSGenerator()) + gens["SasPolicy"] = gen.PtrOf(SasPolicy_STATUSGenerator()) + gens["SecondaryEndpoints"] = gen.PtrOf(Endpoints_STATUSGenerator()) + gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator()) + gens["StorageAccountSkuConversionStatus"] = gen.PtrOf(StorageAccountSkuConversionStatus_STATUSGenerator()) +} + +func Test_AzureFilesIdentityBasedAuthentication_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from AzureFilesIdentityBasedAuthentication to AzureFilesIdentityBasedAuthentication via AssignProperties_To_AzureFilesIdentityBasedAuthentication & AssignProperties_From_AzureFilesIdentityBasedAuthentication returns original", + prop.ForAll(RunPropertyAssignmentTestForAzureFilesIdentityBasedAuthentication, AzureFilesIdentityBasedAuthenticationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForAzureFilesIdentityBasedAuthentication tests if a specific instance of AzureFilesIdentityBasedAuthentication can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForAzureFilesIdentityBasedAuthentication(subject AzureFilesIdentityBasedAuthentication) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.AzureFilesIdentityBasedAuthentication + err := copied.AssignProperties_To_AzureFilesIdentityBasedAuthentication(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual AzureFilesIdentityBasedAuthentication + err = actual.AssignProperties_From_AzureFilesIdentityBasedAuthentication(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_AzureFilesIdentityBasedAuthentication_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AzureFilesIdentityBasedAuthentication via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication, AzureFilesIdentityBasedAuthenticationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication runs a test to see if a specific instance of AzureFilesIdentityBasedAuthentication round trips to JSON and back losslessly +func RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication(subject AzureFilesIdentityBasedAuthentication) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AzureFilesIdentityBasedAuthentication + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AzureFilesIdentityBasedAuthentication instances for property testing - lazily instantiated by +// AzureFilesIdentityBasedAuthenticationGenerator() +var azureFilesIdentityBasedAuthenticationGenerator gopter.Gen + +// AzureFilesIdentityBasedAuthenticationGenerator returns a generator of AzureFilesIdentityBasedAuthentication instances for property testing. +// We first initialize azureFilesIdentityBasedAuthenticationGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func AzureFilesIdentityBasedAuthenticationGenerator() gopter.Gen { + if azureFilesIdentityBasedAuthenticationGenerator != nil { + return azureFilesIdentityBasedAuthenticationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication(generators) + azureFilesIdentityBasedAuthenticationGenerator = gen.Struct(reflect.TypeOf(AzureFilesIdentityBasedAuthentication{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication(generators) + AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication(generators) + azureFilesIdentityBasedAuthenticationGenerator = gen.Struct(reflect.TypeOf(AzureFilesIdentityBasedAuthentication{}), generators) + + return azureFilesIdentityBasedAuthenticationGenerator +} + +// AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication(gens map[string]gopter.Gen) { + gens["DefaultSharePermission"] = gen.PtrOf(gen.OneConstOf( + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_None, + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareContributor, + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareElevatedContributor, + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareReader)) + gens["DirectoryServiceOptions"] = gen.PtrOf(gen.OneConstOf( + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADDS, + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADKERB, + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AD, + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_None)) +} + +// AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication(gens map[string]gopter.Gen) { + gens["ActiveDirectoryProperties"] = gen.PtrOf(ActiveDirectoryPropertiesGenerator()) +} + +func Test_AzureFilesIdentityBasedAuthentication_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from AzureFilesIdentityBasedAuthentication_STATUS to AzureFilesIdentityBasedAuthentication_STATUS via AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS & AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForAzureFilesIdentityBasedAuthentication_STATUS, AzureFilesIdentityBasedAuthentication_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForAzureFilesIdentityBasedAuthentication_STATUS tests if a specific instance of AzureFilesIdentityBasedAuthentication_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForAzureFilesIdentityBasedAuthentication_STATUS(subject AzureFilesIdentityBasedAuthentication_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.AzureFilesIdentityBasedAuthentication_STATUS + err := copied.AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual AzureFilesIdentityBasedAuthentication_STATUS + err = actual.AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_AzureFilesIdentityBasedAuthentication_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AzureFilesIdentityBasedAuthentication_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication_STATUS, AzureFilesIdentityBasedAuthentication_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication_STATUS runs a test to see if a specific instance of AzureFilesIdentityBasedAuthentication_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForAzureFilesIdentityBasedAuthentication_STATUS(subject AzureFilesIdentityBasedAuthentication_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AzureFilesIdentityBasedAuthentication_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AzureFilesIdentityBasedAuthentication_STATUS instances for property testing - lazily instantiated by +// AzureFilesIdentityBasedAuthentication_STATUSGenerator() +var azureFilesIdentityBasedAuthentication_STATUSGenerator gopter.Gen + +// AzureFilesIdentityBasedAuthentication_STATUSGenerator returns a generator of AzureFilesIdentityBasedAuthentication_STATUS instances for property testing. +// We first initialize azureFilesIdentityBasedAuthentication_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func AzureFilesIdentityBasedAuthentication_STATUSGenerator() gopter.Gen { + if azureFilesIdentityBasedAuthentication_STATUSGenerator != nil { + return azureFilesIdentityBasedAuthentication_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS(generators) + azureFilesIdentityBasedAuthentication_STATUSGenerator = gen.Struct(reflect.TypeOf(AzureFilesIdentityBasedAuthentication_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS(generators) + AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS(generators) + azureFilesIdentityBasedAuthentication_STATUSGenerator = gen.Struct(reflect.TypeOf(AzureFilesIdentityBasedAuthentication_STATUS{}), generators) + + return azureFilesIdentityBasedAuthentication_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS(gens map[string]gopter.Gen) { + gens["DefaultSharePermission"] = gen.PtrOf(gen.OneConstOf( + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_None, + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareContributor, + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareElevatedContributor, + AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareReader)) + gens["DirectoryServiceOptions"] = gen.PtrOf(gen.OneConstOf( + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADDS, + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADKERB, + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AD, + AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_None)) +} + +// AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForAzureFilesIdentityBasedAuthentication_STATUS(gens map[string]gopter.Gen) { + gens["ActiveDirectoryProperties"] = gen.PtrOf(ActiveDirectoryProperties_STATUSGenerator()) +} + +func Test_BlobRestoreStatus_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from BlobRestoreStatus_STATUS to BlobRestoreStatus_STATUS via AssignProperties_To_BlobRestoreStatus_STATUS & AssignProperties_From_BlobRestoreStatus_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForBlobRestoreStatus_STATUS, BlobRestoreStatus_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForBlobRestoreStatus_STATUS tests if a specific instance of BlobRestoreStatus_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForBlobRestoreStatus_STATUS(subject BlobRestoreStatus_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.BlobRestoreStatus_STATUS + err := copied.AssignProperties_To_BlobRestoreStatus_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual BlobRestoreStatus_STATUS + err = actual.AssignProperties_From_BlobRestoreStatus_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_BlobRestoreStatus_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of BlobRestoreStatus_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForBlobRestoreStatus_STATUS, BlobRestoreStatus_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForBlobRestoreStatus_STATUS runs a test to see if a specific instance of BlobRestoreStatus_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForBlobRestoreStatus_STATUS(subject BlobRestoreStatus_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual BlobRestoreStatus_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of BlobRestoreStatus_STATUS instances for property testing - lazily instantiated by +// BlobRestoreStatus_STATUSGenerator() +var blobRestoreStatus_STATUSGenerator gopter.Gen + +// BlobRestoreStatus_STATUSGenerator returns a generator of BlobRestoreStatus_STATUS instances for property testing. +// We first initialize blobRestoreStatus_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func BlobRestoreStatus_STATUSGenerator() gopter.Gen { + if blobRestoreStatus_STATUSGenerator != nil { + return blobRestoreStatus_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreStatus_STATUS(generators) + blobRestoreStatus_STATUSGenerator = gen.Struct(reflect.TypeOf(BlobRestoreStatus_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreStatus_STATUS(generators) + AddRelatedPropertyGeneratorsForBlobRestoreStatus_STATUS(generators) + blobRestoreStatus_STATUSGenerator = gen.Struct(reflect.TypeOf(BlobRestoreStatus_STATUS{}), generators) + + return blobRestoreStatus_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForBlobRestoreStatus_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForBlobRestoreStatus_STATUS(gens map[string]gopter.Gen) { + gens["FailureReason"] = gen.PtrOf(gen.AlphaString()) + gens["RestoreId"] = gen.PtrOf(gen.AlphaString()) + gens["Status"] = gen.PtrOf(gen.OneConstOf(BlobRestoreStatus_Status_STATUS_Complete, BlobRestoreStatus_Status_STATUS_Failed, BlobRestoreStatus_Status_STATUS_InProgress)) +} + +// AddRelatedPropertyGeneratorsForBlobRestoreStatus_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForBlobRestoreStatus_STATUS(gens map[string]gopter.Gen) { + gens["Parameters"] = gen.PtrOf(BlobRestoreParameters_STATUSGenerator()) +} + +func Test_CustomDomain_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from CustomDomain to CustomDomain via AssignProperties_To_CustomDomain & AssignProperties_From_CustomDomain returns original", + prop.ForAll(RunPropertyAssignmentTestForCustomDomain, CustomDomainGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCustomDomain tests if a specific instance of CustomDomain can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCustomDomain(subject CustomDomain) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.CustomDomain + err := copied.AssignProperties_To_CustomDomain(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual CustomDomain + err = actual.AssignProperties_From_CustomDomain(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_CustomDomain_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CustomDomain via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCustomDomain, CustomDomainGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCustomDomain runs a test to see if a specific instance of CustomDomain round trips to JSON and back losslessly +func RunJSONSerializationTestForCustomDomain(subject CustomDomain) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CustomDomain + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CustomDomain instances for property testing - lazily instantiated by CustomDomainGenerator() +var customDomainGenerator gopter.Gen + +// CustomDomainGenerator returns a generator of CustomDomain instances for property testing. +func CustomDomainGenerator() gopter.Gen { + if customDomainGenerator != nil { + return customDomainGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCustomDomain(generators) + customDomainGenerator = gen.Struct(reflect.TypeOf(CustomDomain{}), generators) + + return customDomainGenerator +} + +// AddIndependentPropertyGeneratorsForCustomDomain is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCustomDomain(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["UseSubDomainName"] = gen.PtrOf(gen.Bool()) +} + +func Test_CustomDomain_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from CustomDomain_STATUS to CustomDomain_STATUS via AssignProperties_To_CustomDomain_STATUS & AssignProperties_From_CustomDomain_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForCustomDomain_STATUS, CustomDomain_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCustomDomain_STATUS tests if a specific instance of CustomDomain_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCustomDomain_STATUS(subject CustomDomain_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.CustomDomain_STATUS + err := copied.AssignProperties_To_CustomDomain_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual CustomDomain_STATUS + err = actual.AssignProperties_From_CustomDomain_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_CustomDomain_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CustomDomain_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCustomDomain_STATUS, CustomDomain_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCustomDomain_STATUS runs a test to see if a specific instance of CustomDomain_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForCustomDomain_STATUS(subject CustomDomain_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CustomDomain_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CustomDomain_STATUS instances for property testing - lazily instantiated by +// CustomDomain_STATUSGenerator() +var customDomain_STATUSGenerator gopter.Gen + +// CustomDomain_STATUSGenerator returns a generator of CustomDomain_STATUS instances for property testing. +func CustomDomain_STATUSGenerator() gopter.Gen { + if customDomain_STATUSGenerator != nil { + return customDomain_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCustomDomain_STATUS(generators) + customDomain_STATUSGenerator = gen.Struct(reflect.TypeOf(CustomDomain_STATUS{}), generators) + + return customDomain_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForCustomDomain_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCustomDomain_STATUS(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["UseSubDomainName"] = gen.PtrOf(gen.Bool()) +} + +func Test_Encryption_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Encryption to Encryption via AssignProperties_To_Encryption & AssignProperties_From_Encryption returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryption, EncryptionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryption tests if a specific instance of Encryption can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryption(subject Encryption) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Encryption + err := copied.AssignProperties_To_Encryption(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Encryption + err = actual.AssignProperties_From_Encryption(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_Encryption_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Encryption via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryption, EncryptionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryption runs a test to see if a specific instance of Encryption round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryption(subject Encryption) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Encryption + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Encryption instances for property testing - lazily instantiated by EncryptionGenerator() +var encryptionGenerator gopter.Gen + +// EncryptionGenerator returns a generator of Encryption instances for property testing. +// We first initialize encryptionGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func EncryptionGenerator() gopter.Gen { + if encryptionGenerator != nil { + return encryptionGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryption(generators) + encryptionGenerator = gen.Struct(reflect.TypeOf(Encryption{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryption(generators) + AddRelatedPropertyGeneratorsForEncryption(generators) + encryptionGenerator = gen.Struct(reflect.TypeOf(Encryption{}), generators) + + return encryptionGenerator +} + +// AddIndependentPropertyGeneratorsForEncryption is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryption(gens map[string]gopter.Gen) { + gens["KeySource"] = gen.PtrOf(gen.OneConstOf(Encryption_KeySource_MicrosoftKeyvault, Encryption_KeySource_MicrosoftStorage)) + gens["RequireInfrastructureEncryption"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForEncryption is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryption(gens map[string]gopter.Gen) { + gens["Identity"] = gen.PtrOf(EncryptionIdentityGenerator()) + gens["Keyvaultproperties"] = gen.PtrOf(KeyVaultPropertiesGenerator()) + gens["Services"] = gen.PtrOf(EncryptionServicesGenerator()) +} + +func Test_Encryption_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Encryption_STATUS to Encryption_STATUS via AssignProperties_To_Encryption_STATUS & AssignProperties_From_Encryption_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryption_STATUS, Encryption_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryption_STATUS tests if a specific instance of Encryption_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryption_STATUS(subject Encryption_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Encryption_STATUS + err := copied.AssignProperties_To_Encryption_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Encryption_STATUS + err = actual.AssignProperties_From_Encryption_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_Encryption_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Encryption_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryption_STATUS, Encryption_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryption_STATUS runs a test to see if a specific instance of Encryption_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryption_STATUS(subject Encryption_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Encryption_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Encryption_STATUS instances for property testing - lazily instantiated by Encryption_STATUSGenerator() +var encryption_STATUSGenerator gopter.Gen + +// Encryption_STATUSGenerator returns a generator of Encryption_STATUS instances for property testing. +// We first initialize encryption_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Encryption_STATUSGenerator() gopter.Gen { + if encryption_STATUSGenerator != nil { + return encryption_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryption_STATUS(generators) + encryption_STATUSGenerator = gen.Struct(reflect.TypeOf(Encryption_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryption_STATUS(generators) + AddRelatedPropertyGeneratorsForEncryption_STATUS(generators) + encryption_STATUSGenerator = gen.Struct(reflect.TypeOf(Encryption_STATUS{}), generators) + + return encryption_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForEncryption_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryption_STATUS(gens map[string]gopter.Gen) { + gens["KeySource"] = gen.PtrOf(gen.OneConstOf(Encryption_KeySource_STATUS_MicrosoftKeyvault, Encryption_KeySource_STATUS_MicrosoftStorage)) + gens["RequireInfrastructureEncryption"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForEncryption_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryption_STATUS(gens map[string]gopter.Gen) { + gens["Identity"] = gen.PtrOf(EncryptionIdentity_STATUSGenerator()) + gens["Keyvaultproperties"] = gen.PtrOf(KeyVaultProperties_STATUSGenerator()) + gens["Services"] = gen.PtrOf(EncryptionServices_STATUSGenerator()) +} + +func Test_Endpoints_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Endpoints_STATUS to Endpoints_STATUS via AssignProperties_To_Endpoints_STATUS & AssignProperties_From_Endpoints_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForEndpoints_STATUS, Endpoints_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEndpoints_STATUS tests if a specific instance of Endpoints_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEndpoints_STATUS(subject Endpoints_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Endpoints_STATUS + err := copied.AssignProperties_To_Endpoints_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Endpoints_STATUS + err = actual.AssignProperties_From_Endpoints_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_Endpoints_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Endpoints_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEndpoints_STATUS, Endpoints_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEndpoints_STATUS runs a test to see if a specific instance of Endpoints_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEndpoints_STATUS(subject Endpoints_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Endpoints_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Endpoints_STATUS instances for property testing - lazily instantiated by Endpoints_STATUSGenerator() +var endpoints_STATUSGenerator gopter.Gen + +// Endpoints_STATUSGenerator returns a generator of Endpoints_STATUS instances for property testing. +// We first initialize endpoints_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Endpoints_STATUSGenerator() gopter.Gen { + if endpoints_STATUSGenerator != nil { + return endpoints_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEndpoints_STATUS(generators) + endpoints_STATUSGenerator = gen.Struct(reflect.TypeOf(Endpoints_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEndpoints_STATUS(generators) + AddRelatedPropertyGeneratorsForEndpoints_STATUS(generators) + endpoints_STATUSGenerator = gen.Struct(reflect.TypeOf(Endpoints_STATUS{}), generators) + + return endpoints_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForEndpoints_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEndpoints_STATUS(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(gen.AlphaString()) + gens["Dfs"] = gen.PtrOf(gen.AlphaString()) + gens["File"] = gen.PtrOf(gen.AlphaString()) + gens["Queue"] = gen.PtrOf(gen.AlphaString()) + gens["Table"] = gen.PtrOf(gen.AlphaString()) + gens["Web"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForEndpoints_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEndpoints_STATUS(gens map[string]gopter.Gen) { + gens["InternetEndpoints"] = gen.PtrOf(StorageAccountInternetEndpoints_STATUSGenerator()) + gens["MicrosoftEndpoints"] = gen.PtrOf(StorageAccountMicrosoftEndpoints_STATUSGenerator()) +} + +func Test_ExtendedLocation_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ExtendedLocation to ExtendedLocation via AssignProperties_To_ExtendedLocation & AssignProperties_From_ExtendedLocation returns original", + prop.ForAll(RunPropertyAssignmentTestForExtendedLocation, ExtendedLocationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForExtendedLocation tests if a specific instance of ExtendedLocation can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForExtendedLocation(subject ExtendedLocation) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ExtendedLocation + err := copied.AssignProperties_To_ExtendedLocation(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ExtendedLocation + err = actual.AssignProperties_From_ExtendedLocation(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ExtendedLocation_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ExtendedLocation via JSON returns original", + prop.ForAll(RunJSONSerializationTestForExtendedLocation, ExtendedLocationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForExtendedLocation runs a test to see if a specific instance of ExtendedLocation round trips to JSON and back losslessly +func RunJSONSerializationTestForExtendedLocation(subject ExtendedLocation) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ExtendedLocation + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ExtendedLocation instances for property testing - lazily instantiated by ExtendedLocationGenerator() +var extendedLocationGenerator gopter.Gen + +// ExtendedLocationGenerator returns a generator of ExtendedLocation instances for property testing. +func ExtendedLocationGenerator() gopter.Gen { + if extendedLocationGenerator != nil { + return extendedLocationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForExtendedLocation(generators) + extendedLocationGenerator = gen.Struct(reflect.TypeOf(ExtendedLocation{}), generators) + + return extendedLocationGenerator +} + +// AddIndependentPropertyGeneratorsForExtendedLocation is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForExtendedLocation(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf(ExtendedLocationType_EdgeZone)) +} + +func Test_ExtendedLocation_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ExtendedLocation_STATUS to ExtendedLocation_STATUS via AssignProperties_To_ExtendedLocation_STATUS & AssignProperties_From_ExtendedLocation_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForExtendedLocation_STATUS, ExtendedLocation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForExtendedLocation_STATUS tests if a specific instance of ExtendedLocation_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForExtendedLocation_STATUS(subject ExtendedLocation_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ExtendedLocation_STATUS + err := copied.AssignProperties_To_ExtendedLocation_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ExtendedLocation_STATUS + err = actual.AssignProperties_From_ExtendedLocation_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ExtendedLocation_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ExtendedLocation_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForExtendedLocation_STATUS, ExtendedLocation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForExtendedLocation_STATUS runs a test to see if a specific instance of ExtendedLocation_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForExtendedLocation_STATUS(subject ExtendedLocation_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ExtendedLocation_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ExtendedLocation_STATUS instances for property testing - lazily instantiated by +// ExtendedLocation_STATUSGenerator() +var extendedLocation_STATUSGenerator gopter.Gen + +// ExtendedLocation_STATUSGenerator returns a generator of ExtendedLocation_STATUS instances for property testing. +func ExtendedLocation_STATUSGenerator() gopter.Gen { + if extendedLocation_STATUSGenerator != nil { + return extendedLocation_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForExtendedLocation_STATUS(generators) + extendedLocation_STATUSGenerator = gen.Struct(reflect.TypeOf(ExtendedLocation_STATUS{}), generators) + + return extendedLocation_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForExtendedLocation_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForExtendedLocation_STATUS(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf(ExtendedLocationType_STATUS_EdgeZone)) +} + +func Test_GeoReplicationStats_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from GeoReplicationStats_STATUS to GeoReplicationStats_STATUS via AssignProperties_To_GeoReplicationStats_STATUS & AssignProperties_From_GeoReplicationStats_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForGeoReplicationStats_STATUS, GeoReplicationStats_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForGeoReplicationStats_STATUS tests if a specific instance of GeoReplicationStats_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForGeoReplicationStats_STATUS(subject GeoReplicationStats_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.GeoReplicationStats_STATUS + err := copied.AssignProperties_To_GeoReplicationStats_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual GeoReplicationStats_STATUS + err = actual.AssignProperties_From_GeoReplicationStats_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_GeoReplicationStats_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of GeoReplicationStats_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForGeoReplicationStats_STATUS, GeoReplicationStats_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForGeoReplicationStats_STATUS runs a test to see if a specific instance of GeoReplicationStats_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForGeoReplicationStats_STATUS(subject GeoReplicationStats_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual GeoReplicationStats_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of GeoReplicationStats_STATUS instances for property testing - lazily instantiated by +// GeoReplicationStats_STATUSGenerator() +var geoReplicationStats_STATUSGenerator gopter.Gen + +// GeoReplicationStats_STATUSGenerator returns a generator of GeoReplicationStats_STATUS instances for property testing. +func GeoReplicationStats_STATUSGenerator() gopter.Gen { + if geoReplicationStats_STATUSGenerator != nil { + return geoReplicationStats_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForGeoReplicationStats_STATUS(generators) + geoReplicationStats_STATUSGenerator = gen.Struct(reflect.TypeOf(GeoReplicationStats_STATUS{}), generators) + + return geoReplicationStats_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForGeoReplicationStats_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForGeoReplicationStats_STATUS(gens map[string]gopter.Gen) { + gens["CanFailover"] = gen.PtrOf(gen.Bool()) + gens["CanPlannedFailover"] = gen.PtrOf(gen.Bool()) + gens["LastSyncTime"] = gen.PtrOf(gen.AlphaString()) + gens["PostFailoverRedundancy"] = gen.PtrOf(gen.OneConstOf(GeoReplicationStats_PostFailoverRedundancy_STATUS_Standard_LRS, GeoReplicationStats_PostFailoverRedundancy_STATUS_Standard_ZRS)) + gens["PostPlannedFailoverRedundancy"] = gen.PtrOf(gen.OneConstOf( + GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_GRS, + GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_GZRS, + GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_RAGRS, + GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_RAGZRS)) + gens["Status"] = gen.PtrOf(gen.OneConstOf(GeoReplicationStats_Status_STATUS_Bootstrap, GeoReplicationStats_Status_STATUS_Live, GeoReplicationStats_Status_STATUS_Unavailable)) +} + +func Test_Identity_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Identity to Identity via AssignProperties_To_Identity & AssignProperties_From_Identity returns original", + prop.ForAll(RunPropertyAssignmentTestForIdentity, IdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForIdentity tests if a specific instance of Identity can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForIdentity(subject Identity) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Identity + err := copied.AssignProperties_To_Identity(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Identity + err = actual.AssignProperties_From_Identity(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_Identity_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Identity via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIdentity, IdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIdentity runs a test to see if a specific instance of Identity round trips to JSON and back losslessly +func RunJSONSerializationTestForIdentity(subject Identity) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Identity + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Identity instances for property testing - lazily instantiated by IdentityGenerator() +var identityGenerator gopter.Gen + +// IdentityGenerator returns a generator of Identity instances for property testing. +// We first initialize identityGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func IdentityGenerator() gopter.Gen { + if identityGenerator != nil { + return identityGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity(generators) + identityGenerator = gen.Struct(reflect.TypeOf(Identity{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity(generators) + AddRelatedPropertyGeneratorsForIdentity(generators) + identityGenerator = gen.Struct(reflect.TypeOf(Identity{}), generators) + + return identityGenerator +} + +// AddIndependentPropertyGeneratorsForIdentity is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIdentity(gens map[string]gopter.Gen) { + gens["Type"] = gen.PtrOf(gen.OneConstOf( + Identity_Type_None, + Identity_Type_SystemAssigned, + Identity_Type_SystemAssignedUserAssigned, + Identity_Type_UserAssigned)) +} + +// AddRelatedPropertyGeneratorsForIdentity is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForIdentity(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.SliceOf(UserAssignedIdentityDetailsGenerator()) +} + +func Test_Identity_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Identity_STATUS to Identity_STATUS via AssignProperties_To_Identity_STATUS & AssignProperties_From_Identity_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForIdentity_STATUS, Identity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForIdentity_STATUS tests if a specific instance of Identity_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForIdentity_STATUS(subject Identity_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Identity_STATUS + err := copied.AssignProperties_To_Identity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Identity_STATUS + err = actual.AssignProperties_From_Identity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_Identity_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Identity_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIdentity_STATUS, Identity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIdentity_STATUS runs a test to see if a specific instance of Identity_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForIdentity_STATUS(subject Identity_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Identity_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Identity_STATUS instances for property testing - lazily instantiated by Identity_STATUSGenerator() +var identity_STATUSGenerator gopter.Gen + +// Identity_STATUSGenerator returns a generator of Identity_STATUS instances for property testing. +// We first initialize identity_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Identity_STATUSGenerator() gopter.Gen { + if identity_STATUSGenerator != nil { + return identity_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_STATUS(generators) + identity_STATUSGenerator = gen.Struct(reflect.TypeOf(Identity_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_STATUS(generators) + AddRelatedPropertyGeneratorsForIdentity_STATUS(generators) + identity_STATUSGenerator = gen.Struct(reflect.TypeOf(Identity_STATUS{}), generators) + + return identity_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForIdentity_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIdentity_STATUS(gens map[string]gopter.Gen) { + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf( + Identity_Type_STATUS_None, + Identity_Type_STATUS_SystemAssigned, + Identity_Type_STATUS_SystemAssignedUserAssigned, + Identity_Type_STATUS_UserAssigned)) +} + +// AddRelatedPropertyGeneratorsForIdentity_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForIdentity_STATUS(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.MapOf(gen.AlphaString(), UserAssignedIdentity_STATUSGenerator()) +} + +func Test_ImmutableStorageAccount_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ImmutableStorageAccount to ImmutableStorageAccount via AssignProperties_To_ImmutableStorageAccount & AssignProperties_From_ImmutableStorageAccount returns original", + prop.ForAll(RunPropertyAssignmentTestForImmutableStorageAccount, ImmutableStorageAccountGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForImmutableStorageAccount tests if a specific instance of ImmutableStorageAccount can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForImmutableStorageAccount(subject ImmutableStorageAccount) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ImmutableStorageAccount + err := copied.AssignProperties_To_ImmutableStorageAccount(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ImmutableStorageAccount + err = actual.AssignProperties_From_ImmutableStorageAccount(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ImmutableStorageAccount_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutableStorageAccount via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutableStorageAccount, ImmutableStorageAccountGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutableStorageAccount runs a test to see if a specific instance of ImmutableStorageAccount round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutableStorageAccount(subject ImmutableStorageAccount) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutableStorageAccount + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutableStorageAccount instances for property testing - lazily instantiated by +// ImmutableStorageAccountGenerator() +var immutableStorageAccountGenerator gopter.Gen + +// ImmutableStorageAccountGenerator returns a generator of ImmutableStorageAccount instances for property testing. +// We first initialize immutableStorageAccountGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ImmutableStorageAccountGenerator() gopter.Gen { + if immutableStorageAccountGenerator != nil { + return immutableStorageAccountGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageAccount(generators) + immutableStorageAccountGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageAccount{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageAccount(generators) + AddRelatedPropertyGeneratorsForImmutableStorageAccount(generators) + immutableStorageAccountGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageAccount{}), generators) + + return immutableStorageAccountGenerator +} + +// AddIndependentPropertyGeneratorsForImmutableStorageAccount is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutableStorageAccount(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForImmutableStorageAccount is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForImmutableStorageAccount(gens map[string]gopter.Gen) { + gens["ImmutabilityPolicy"] = gen.PtrOf(AccountImmutabilityPolicyPropertiesGenerator()) +} + +func Test_ImmutableStorageAccount_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ImmutableStorageAccount_STATUS to ImmutableStorageAccount_STATUS via AssignProperties_To_ImmutableStorageAccount_STATUS & AssignProperties_From_ImmutableStorageAccount_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForImmutableStorageAccount_STATUS, ImmutableStorageAccount_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForImmutableStorageAccount_STATUS tests if a specific instance of ImmutableStorageAccount_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForImmutableStorageAccount_STATUS(subject ImmutableStorageAccount_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ImmutableStorageAccount_STATUS + err := copied.AssignProperties_To_ImmutableStorageAccount_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ImmutableStorageAccount_STATUS + err = actual.AssignProperties_From_ImmutableStorageAccount_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ImmutableStorageAccount_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutableStorageAccount_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutableStorageAccount_STATUS, ImmutableStorageAccount_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutableStorageAccount_STATUS runs a test to see if a specific instance of ImmutableStorageAccount_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutableStorageAccount_STATUS(subject ImmutableStorageAccount_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutableStorageAccount_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutableStorageAccount_STATUS instances for property testing - lazily instantiated by +// ImmutableStorageAccount_STATUSGenerator() +var immutableStorageAccount_STATUSGenerator gopter.Gen + +// ImmutableStorageAccount_STATUSGenerator returns a generator of ImmutableStorageAccount_STATUS instances for property testing. +// We first initialize immutableStorageAccount_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ImmutableStorageAccount_STATUSGenerator() gopter.Gen { + if immutableStorageAccount_STATUSGenerator != nil { + return immutableStorageAccount_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageAccount_STATUS(generators) + immutableStorageAccount_STATUSGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageAccount_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageAccount_STATUS(generators) + AddRelatedPropertyGeneratorsForImmutableStorageAccount_STATUS(generators) + immutableStorageAccount_STATUSGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageAccount_STATUS{}), generators) + + return immutableStorageAccount_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForImmutableStorageAccount_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutableStorageAccount_STATUS(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForImmutableStorageAccount_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForImmutableStorageAccount_STATUS(gens map[string]gopter.Gen) { + gens["ImmutabilityPolicy"] = gen.PtrOf(AccountImmutabilityPolicyProperties_STATUSGenerator()) +} + +func Test_KeyCreationTime_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from KeyCreationTime_STATUS to KeyCreationTime_STATUS via AssignProperties_To_KeyCreationTime_STATUS & AssignProperties_From_KeyCreationTime_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForKeyCreationTime_STATUS, KeyCreationTime_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForKeyCreationTime_STATUS tests if a specific instance of KeyCreationTime_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForKeyCreationTime_STATUS(subject KeyCreationTime_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.KeyCreationTime_STATUS + err := copied.AssignProperties_To_KeyCreationTime_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual KeyCreationTime_STATUS + err = actual.AssignProperties_From_KeyCreationTime_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_KeyCreationTime_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyCreationTime_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyCreationTime_STATUS, KeyCreationTime_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyCreationTime_STATUS runs a test to see if a specific instance of KeyCreationTime_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyCreationTime_STATUS(subject KeyCreationTime_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyCreationTime_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyCreationTime_STATUS instances for property testing - lazily instantiated by +// KeyCreationTime_STATUSGenerator() +var keyCreationTime_STATUSGenerator gopter.Gen + +// KeyCreationTime_STATUSGenerator returns a generator of KeyCreationTime_STATUS instances for property testing. +func KeyCreationTime_STATUSGenerator() gopter.Gen { + if keyCreationTime_STATUSGenerator != nil { + return keyCreationTime_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyCreationTime_STATUS(generators) + keyCreationTime_STATUSGenerator = gen.Struct(reflect.TypeOf(KeyCreationTime_STATUS{}), generators) + + return keyCreationTime_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForKeyCreationTime_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyCreationTime_STATUS(gens map[string]gopter.Gen) { + gens["Key1"] = gen.PtrOf(gen.AlphaString()) + gens["Key2"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_KeyPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from KeyPolicy to KeyPolicy via AssignProperties_To_KeyPolicy & AssignProperties_From_KeyPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForKeyPolicy, KeyPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForKeyPolicy tests if a specific instance of KeyPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForKeyPolicy(subject KeyPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.KeyPolicy + err := copied.AssignProperties_To_KeyPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual KeyPolicy + err = actual.AssignProperties_From_KeyPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_KeyPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyPolicy, KeyPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyPolicy runs a test to see if a specific instance of KeyPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyPolicy(subject KeyPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyPolicy instances for property testing - lazily instantiated by KeyPolicyGenerator() +var keyPolicyGenerator gopter.Gen + +// KeyPolicyGenerator returns a generator of KeyPolicy instances for property testing. +func KeyPolicyGenerator() gopter.Gen { + if keyPolicyGenerator != nil { + return keyPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyPolicy(generators) + keyPolicyGenerator = gen.Struct(reflect.TypeOf(KeyPolicy{}), generators) + + return keyPolicyGenerator +} + +// AddIndependentPropertyGeneratorsForKeyPolicy is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyPolicy(gens map[string]gopter.Gen) { + gens["KeyExpirationPeriodInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_KeyPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from KeyPolicy_STATUS to KeyPolicy_STATUS via AssignProperties_To_KeyPolicy_STATUS & AssignProperties_From_KeyPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForKeyPolicy_STATUS, KeyPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForKeyPolicy_STATUS tests if a specific instance of KeyPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForKeyPolicy_STATUS(subject KeyPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.KeyPolicy_STATUS + err := copied.AssignProperties_To_KeyPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual KeyPolicy_STATUS + err = actual.AssignProperties_From_KeyPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_KeyPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyPolicy_STATUS, KeyPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyPolicy_STATUS runs a test to see if a specific instance of KeyPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyPolicy_STATUS(subject KeyPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyPolicy_STATUS instances for property testing - lazily instantiated by KeyPolicy_STATUSGenerator() +var keyPolicy_STATUSGenerator gopter.Gen + +// KeyPolicy_STATUSGenerator returns a generator of KeyPolicy_STATUS instances for property testing. +func KeyPolicy_STATUSGenerator() gopter.Gen { + if keyPolicy_STATUSGenerator != nil { + return keyPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyPolicy_STATUS(generators) + keyPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(KeyPolicy_STATUS{}), generators) + + return keyPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForKeyPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyPolicy_STATUS(gens map[string]gopter.Gen) { + gens["KeyExpirationPeriodInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_NetworkRuleSet_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from NetworkRuleSet to NetworkRuleSet via AssignProperties_To_NetworkRuleSet & AssignProperties_From_NetworkRuleSet returns original", + prop.ForAll(RunPropertyAssignmentTestForNetworkRuleSet, NetworkRuleSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForNetworkRuleSet tests if a specific instance of NetworkRuleSet can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForNetworkRuleSet(subject NetworkRuleSet) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.NetworkRuleSet + err := copied.AssignProperties_To_NetworkRuleSet(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual NetworkRuleSet + err = actual.AssignProperties_From_NetworkRuleSet(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_NetworkRuleSet_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of NetworkRuleSet via JSON returns original", + prop.ForAll(RunJSONSerializationTestForNetworkRuleSet, NetworkRuleSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForNetworkRuleSet runs a test to see if a specific instance of NetworkRuleSet round trips to JSON and back losslessly +func RunJSONSerializationTestForNetworkRuleSet(subject NetworkRuleSet) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual NetworkRuleSet + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of NetworkRuleSet instances for property testing - lazily instantiated by NetworkRuleSetGenerator() +var networkRuleSetGenerator gopter.Gen + +// NetworkRuleSetGenerator returns a generator of NetworkRuleSet instances for property testing. +// We first initialize networkRuleSetGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func NetworkRuleSetGenerator() gopter.Gen { + if networkRuleSetGenerator != nil { + return networkRuleSetGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet(generators) + networkRuleSetGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet(generators) + AddRelatedPropertyGeneratorsForNetworkRuleSet(generators) + networkRuleSetGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet{}), generators) + + return networkRuleSetGenerator +} + +// AddIndependentPropertyGeneratorsForNetworkRuleSet is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForNetworkRuleSet(gens map[string]gopter.Gen) { + gens["Bypass"] = gen.PtrOf(gen.OneConstOf( + NetworkRuleSet_Bypass_AzureServices, + NetworkRuleSet_Bypass_Logging, + NetworkRuleSet_Bypass_Metrics, + NetworkRuleSet_Bypass_None)) + gens["DefaultAction"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_DefaultAction_Allow, NetworkRuleSet_DefaultAction_Deny)) +} + +// AddRelatedPropertyGeneratorsForNetworkRuleSet is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForNetworkRuleSet(gens map[string]gopter.Gen) { + gens["IpRules"] = gen.SliceOf(IPRuleGenerator()) + gens["ResourceAccessRules"] = gen.SliceOf(ResourceAccessRuleGenerator()) + gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRuleGenerator()) +} + +func Test_NetworkRuleSet_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from NetworkRuleSet_STATUS to NetworkRuleSet_STATUS via AssignProperties_To_NetworkRuleSet_STATUS & AssignProperties_From_NetworkRuleSet_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForNetworkRuleSet_STATUS, NetworkRuleSet_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForNetworkRuleSet_STATUS tests if a specific instance of NetworkRuleSet_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForNetworkRuleSet_STATUS(subject NetworkRuleSet_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.NetworkRuleSet_STATUS + err := copied.AssignProperties_To_NetworkRuleSet_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual NetworkRuleSet_STATUS + err = actual.AssignProperties_From_NetworkRuleSet_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_NetworkRuleSet_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of NetworkRuleSet_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForNetworkRuleSet_STATUS, NetworkRuleSet_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForNetworkRuleSet_STATUS runs a test to see if a specific instance of NetworkRuleSet_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForNetworkRuleSet_STATUS(subject NetworkRuleSet_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual NetworkRuleSet_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of NetworkRuleSet_STATUS instances for property testing - lazily instantiated by +// NetworkRuleSet_STATUSGenerator() +var networkRuleSet_STATUSGenerator gopter.Gen + +// NetworkRuleSet_STATUSGenerator returns a generator of NetworkRuleSet_STATUS instances for property testing. +// We first initialize networkRuleSet_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func NetworkRuleSet_STATUSGenerator() gopter.Gen { + if networkRuleSet_STATUSGenerator != nil { + return networkRuleSet_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS(generators) + networkRuleSet_STATUSGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS(generators) + AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS(generators) + networkRuleSet_STATUSGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS{}), generators) + + return networkRuleSet_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS(gens map[string]gopter.Gen) { + gens["Bypass"] = gen.PtrOf(gen.OneConstOf( + NetworkRuleSet_Bypass_STATUS_AzureServices, + NetworkRuleSet_Bypass_STATUS_Logging, + NetworkRuleSet_Bypass_STATUS_Metrics, + NetworkRuleSet_Bypass_STATUS_None)) + gens["DefaultAction"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_DefaultAction_STATUS_Allow, NetworkRuleSet_DefaultAction_STATUS_Deny)) +} + +// AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS(gens map[string]gopter.Gen) { + gens["IpRules"] = gen.SliceOf(IPRule_STATUSGenerator()) + gens["ResourceAccessRules"] = gen.SliceOf(ResourceAccessRule_STATUSGenerator()) + gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRule_STATUSGenerator()) +} + +func Test_PrivateEndpointConnection_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from PrivateEndpointConnection_STATUS to PrivateEndpointConnection_STATUS via AssignProperties_To_PrivateEndpointConnection_STATUS & AssignProperties_From_PrivateEndpointConnection_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForPrivateEndpointConnection_STATUS, PrivateEndpointConnection_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForPrivateEndpointConnection_STATUS tests if a specific instance of PrivateEndpointConnection_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForPrivateEndpointConnection_STATUS(subject PrivateEndpointConnection_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.PrivateEndpointConnection_STATUS + err := copied.AssignProperties_To_PrivateEndpointConnection_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual PrivateEndpointConnection_STATUS + err = actual.AssignProperties_From_PrivateEndpointConnection_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_PrivateEndpointConnection_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of PrivateEndpointConnection_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPrivateEndpointConnection_STATUS, PrivateEndpointConnection_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPrivateEndpointConnection_STATUS runs a test to see if a specific instance of PrivateEndpointConnection_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForPrivateEndpointConnection_STATUS(subject PrivateEndpointConnection_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual PrivateEndpointConnection_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of PrivateEndpointConnection_STATUS instances for property testing - lazily instantiated by +// PrivateEndpointConnection_STATUSGenerator() +var privateEndpointConnection_STATUSGenerator gopter.Gen + +// PrivateEndpointConnection_STATUSGenerator returns a generator of PrivateEndpointConnection_STATUS instances for property testing. +func PrivateEndpointConnection_STATUSGenerator() gopter.Gen { + if privateEndpointConnection_STATUSGenerator != nil { + return privateEndpointConnection_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpointConnection_STATUS(generators) + privateEndpointConnection_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnection_STATUS{}), generators) + + return privateEndpointConnection_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForPrivateEndpointConnection_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPrivateEndpointConnection_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_RoutingPreference_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from RoutingPreference to RoutingPreference via AssignProperties_To_RoutingPreference & AssignProperties_From_RoutingPreference returns original", + prop.ForAll(RunPropertyAssignmentTestForRoutingPreference, RoutingPreferenceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForRoutingPreference tests if a specific instance of RoutingPreference can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForRoutingPreference(subject RoutingPreference) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.RoutingPreference + err := copied.AssignProperties_To_RoutingPreference(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual RoutingPreference + err = actual.AssignProperties_From_RoutingPreference(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_RoutingPreference_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RoutingPreference via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRoutingPreference, RoutingPreferenceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRoutingPreference runs a test to see if a specific instance of RoutingPreference round trips to JSON and back losslessly +func RunJSONSerializationTestForRoutingPreference(subject RoutingPreference) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RoutingPreference + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RoutingPreference instances for property testing - lazily instantiated by RoutingPreferenceGenerator() +var routingPreferenceGenerator gopter.Gen + +// RoutingPreferenceGenerator returns a generator of RoutingPreference instances for property testing. +func RoutingPreferenceGenerator() gopter.Gen { + if routingPreferenceGenerator != nil { + return routingPreferenceGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRoutingPreference(generators) + routingPreferenceGenerator = gen.Struct(reflect.TypeOf(RoutingPreference{}), generators) + + return routingPreferenceGenerator +} + +// AddIndependentPropertyGeneratorsForRoutingPreference is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRoutingPreference(gens map[string]gopter.Gen) { + gens["PublishInternetEndpoints"] = gen.PtrOf(gen.Bool()) + gens["PublishMicrosoftEndpoints"] = gen.PtrOf(gen.Bool()) + gens["RoutingChoice"] = gen.PtrOf(gen.OneConstOf(RoutingPreference_RoutingChoice_InternetRouting, RoutingPreference_RoutingChoice_MicrosoftRouting)) +} + +func Test_RoutingPreference_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from RoutingPreference_STATUS to RoutingPreference_STATUS via AssignProperties_To_RoutingPreference_STATUS & AssignProperties_From_RoutingPreference_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForRoutingPreference_STATUS, RoutingPreference_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForRoutingPreference_STATUS tests if a specific instance of RoutingPreference_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForRoutingPreference_STATUS(subject RoutingPreference_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.RoutingPreference_STATUS + err := copied.AssignProperties_To_RoutingPreference_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual RoutingPreference_STATUS + err = actual.AssignProperties_From_RoutingPreference_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_RoutingPreference_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RoutingPreference_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRoutingPreference_STATUS, RoutingPreference_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRoutingPreference_STATUS runs a test to see if a specific instance of RoutingPreference_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForRoutingPreference_STATUS(subject RoutingPreference_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RoutingPreference_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RoutingPreference_STATUS instances for property testing - lazily instantiated by +// RoutingPreference_STATUSGenerator() +var routingPreference_STATUSGenerator gopter.Gen + +// RoutingPreference_STATUSGenerator returns a generator of RoutingPreference_STATUS instances for property testing. +func RoutingPreference_STATUSGenerator() gopter.Gen { + if routingPreference_STATUSGenerator != nil { + return routingPreference_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRoutingPreference_STATUS(generators) + routingPreference_STATUSGenerator = gen.Struct(reflect.TypeOf(RoutingPreference_STATUS{}), generators) + + return routingPreference_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForRoutingPreference_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRoutingPreference_STATUS(gens map[string]gopter.Gen) { + gens["PublishInternetEndpoints"] = gen.PtrOf(gen.Bool()) + gens["PublishMicrosoftEndpoints"] = gen.PtrOf(gen.Bool()) + gens["RoutingChoice"] = gen.PtrOf(gen.OneConstOf(RoutingPreference_RoutingChoice_STATUS_InternetRouting, RoutingPreference_RoutingChoice_STATUS_MicrosoftRouting)) +} + +func Test_SasPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SasPolicy to SasPolicy via AssignProperties_To_SasPolicy & AssignProperties_From_SasPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForSasPolicy, SasPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSasPolicy tests if a specific instance of SasPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSasPolicy(subject SasPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.SasPolicy + err := copied.AssignProperties_To_SasPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SasPolicy + err = actual.AssignProperties_From_SasPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_SasPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SasPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSasPolicy, SasPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSasPolicy runs a test to see if a specific instance of SasPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForSasPolicy(subject SasPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SasPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SasPolicy instances for property testing - lazily instantiated by SasPolicyGenerator() +var sasPolicyGenerator gopter.Gen + +// SasPolicyGenerator returns a generator of SasPolicy instances for property testing. +func SasPolicyGenerator() gopter.Gen { + if sasPolicyGenerator != nil { + return sasPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSasPolicy(generators) + sasPolicyGenerator = gen.Struct(reflect.TypeOf(SasPolicy{}), generators) + + return sasPolicyGenerator +} + +// AddIndependentPropertyGeneratorsForSasPolicy is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSasPolicy(gens map[string]gopter.Gen) { + gens["ExpirationAction"] = gen.PtrOf(gen.OneConstOf(SasPolicy_ExpirationAction_Log)) + gens["SasExpirationPeriod"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_SasPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SasPolicy_STATUS to SasPolicy_STATUS via AssignProperties_To_SasPolicy_STATUS & AssignProperties_From_SasPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSasPolicy_STATUS, SasPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSasPolicy_STATUS tests if a specific instance of SasPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSasPolicy_STATUS(subject SasPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.SasPolicy_STATUS + err := copied.AssignProperties_To_SasPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SasPolicy_STATUS + err = actual.AssignProperties_From_SasPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_SasPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SasPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSasPolicy_STATUS, SasPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSasPolicy_STATUS runs a test to see if a specific instance of SasPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSasPolicy_STATUS(subject SasPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SasPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SasPolicy_STATUS instances for property testing - lazily instantiated by SasPolicy_STATUSGenerator() +var sasPolicy_STATUSGenerator gopter.Gen + +// SasPolicy_STATUSGenerator returns a generator of SasPolicy_STATUS instances for property testing. +func SasPolicy_STATUSGenerator() gopter.Gen { + if sasPolicy_STATUSGenerator != nil { + return sasPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSasPolicy_STATUS(generators) + sasPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(SasPolicy_STATUS{}), generators) + + return sasPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSasPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSasPolicy_STATUS(gens map[string]gopter.Gen) { + gens["ExpirationAction"] = gen.PtrOf(gen.OneConstOf(SasPolicy_ExpirationAction_STATUS_Log)) + gens["SasExpirationPeriod"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_Sku_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Sku to Sku via AssignProperties_To_Sku & AssignProperties_From_Sku returns original", + prop.ForAll(RunPropertyAssignmentTestForSku, SkuGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSku tests if a specific instance of Sku can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSku(subject Sku) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Sku + err := copied.AssignProperties_To_Sku(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Sku + err = actual.AssignProperties_From_Sku(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_Sku_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Sku via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSku, SkuGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSku runs a test to see if a specific instance of Sku round trips to JSON and back losslessly +func RunJSONSerializationTestForSku(subject Sku) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Sku + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Sku instances for property testing - lazily instantiated by SkuGenerator() +var skuGenerator gopter.Gen + +// SkuGenerator returns a generator of Sku instances for property testing. +func SkuGenerator() gopter.Gen { + if skuGenerator != nil { + return skuGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSku(generators) + skuGenerator = gen.Struct(reflect.TypeOf(Sku{}), generators) + + return skuGenerator +} + +// AddIndependentPropertyGeneratorsForSku is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSku(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.OneConstOf( + SkuName_Premium_LRS, + SkuName_Premium_ZRS, + SkuName_Standard_GRS, + SkuName_Standard_GZRS, + SkuName_Standard_LRS, + SkuName_Standard_RAGRS, + SkuName_Standard_RAGZRS, + SkuName_Standard_ZRS)) + gens["Tier"] = gen.PtrOf(gen.OneConstOf(Tier_Premium, Tier_Standard)) +} + +func Test_Sku_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Sku_STATUS to Sku_STATUS via AssignProperties_To_Sku_STATUS & AssignProperties_From_Sku_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSku_STATUS, Sku_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSku_STATUS tests if a specific instance of Sku_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSku_STATUS(subject Sku_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Sku_STATUS + err := copied.AssignProperties_To_Sku_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Sku_STATUS + err = actual.AssignProperties_From_Sku_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_Sku_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Sku_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSku_STATUS, Sku_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSku_STATUS runs a test to see if a specific instance of Sku_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSku_STATUS(subject Sku_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Sku_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Sku_STATUS instances for property testing - lazily instantiated by Sku_STATUSGenerator() +var sku_STATUSGenerator gopter.Gen + +// Sku_STATUSGenerator returns a generator of Sku_STATUS instances for property testing. +func Sku_STATUSGenerator() gopter.Gen { + if sku_STATUSGenerator != nil { + return sku_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSku_STATUS(generators) + sku_STATUSGenerator = gen.Struct(reflect.TypeOf(Sku_STATUS{}), generators) + + return sku_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSku_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSku_STATUS(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.OneConstOf( + SkuName_STATUS_Premium_LRS, + SkuName_STATUS_Premium_ZRS, + SkuName_STATUS_Standard_GRS, + SkuName_STATUS_Standard_GZRS, + SkuName_STATUS_Standard_LRS, + SkuName_STATUS_Standard_RAGRS, + SkuName_STATUS_Standard_RAGZRS, + SkuName_STATUS_Standard_ZRS)) + gens["Tier"] = gen.PtrOf(gen.OneConstOf(Tier_STATUS_Premium, Tier_STATUS_Standard)) +} + +func Test_StorageAccountOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountOperatorSpec to StorageAccountOperatorSpec via AssignProperties_To_StorageAccountOperatorSpec & AssignProperties_From_StorageAccountOperatorSpec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountOperatorSpec, StorageAccountOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountOperatorSpec tests if a specific instance of StorageAccountOperatorSpec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountOperatorSpec(subject StorageAccountOperatorSpec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountOperatorSpec + err := copied.AssignProperties_To_StorageAccountOperatorSpec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountOperatorSpec + err = actual.AssignProperties_From_StorageAccountOperatorSpec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountOperatorSpec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountOperatorSpec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountOperatorSpec, StorageAccountOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountOperatorSpec runs a test to see if a specific instance of StorageAccountOperatorSpec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountOperatorSpec(subject StorageAccountOperatorSpec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountOperatorSpec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountOperatorSpec instances for property testing - lazily instantiated by +// StorageAccountOperatorSpecGenerator() +var storageAccountOperatorSpecGenerator gopter.Gen + +// StorageAccountOperatorSpecGenerator returns a generator of StorageAccountOperatorSpec instances for property testing. +func StorageAccountOperatorSpecGenerator() gopter.Gen { + if storageAccountOperatorSpecGenerator != nil { + return storageAccountOperatorSpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountOperatorSpec(generators) + storageAccountOperatorSpecGenerator = gen.Struct(reflect.TypeOf(StorageAccountOperatorSpec{}), generators) + + return storageAccountOperatorSpecGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountOperatorSpec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountOperatorSpec(gens map[string]gopter.Gen) { + gens["ConfigMaps"] = gen.PtrOf(StorageAccountOperatorConfigMapsGenerator()) + gens["Secrets"] = gen.PtrOf(StorageAccountOperatorSecretsGenerator()) +} + +func Test_StorageAccountSkuConversionStatus_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountSkuConversionStatus_STATUS to StorageAccountSkuConversionStatus_STATUS via AssignProperties_To_StorageAccountSkuConversionStatus_STATUS & AssignProperties_From_StorageAccountSkuConversionStatus_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountSkuConversionStatus_STATUS, StorageAccountSkuConversionStatus_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountSkuConversionStatus_STATUS tests if a specific instance of StorageAccountSkuConversionStatus_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountSkuConversionStatus_STATUS(subject StorageAccountSkuConversionStatus_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountSkuConversionStatus_STATUS + err := copied.AssignProperties_To_StorageAccountSkuConversionStatus_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountSkuConversionStatus_STATUS + err = actual.AssignProperties_From_StorageAccountSkuConversionStatus_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountSkuConversionStatus_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountSkuConversionStatus_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountSkuConversionStatus_STATUS, StorageAccountSkuConversionStatus_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountSkuConversionStatus_STATUS runs a test to see if a specific instance of StorageAccountSkuConversionStatus_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountSkuConversionStatus_STATUS(subject StorageAccountSkuConversionStatus_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountSkuConversionStatus_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountSkuConversionStatus_STATUS instances for property testing - lazily instantiated by +// StorageAccountSkuConversionStatus_STATUSGenerator() +var storageAccountSkuConversionStatus_STATUSGenerator gopter.Gen + +// StorageAccountSkuConversionStatus_STATUSGenerator returns a generator of StorageAccountSkuConversionStatus_STATUS instances for property testing. +func StorageAccountSkuConversionStatus_STATUSGenerator() gopter.Gen { + if storageAccountSkuConversionStatus_STATUSGenerator != nil { + return storageAccountSkuConversionStatus_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountSkuConversionStatus_STATUS(generators) + storageAccountSkuConversionStatus_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccountSkuConversionStatus_STATUS{}), generators) + + return storageAccountSkuConversionStatus_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccountSkuConversionStatus_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccountSkuConversionStatus_STATUS(gens map[string]gopter.Gen) { + gens["EndTime"] = gen.PtrOf(gen.AlphaString()) + gens["SkuConversionStatus"] = gen.PtrOf(gen.OneConstOf(StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Failed, StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_InProgress, StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Succeeded)) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) + gens["TargetSkuName"] = gen.PtrOf(gen.OneConstOf( + SkuName_STATUS_Premium_LRS, + SkuName_STATUS_Premium_ZRS, + SkuName_STATUS_Standard_GRS, + SkuName_STATUS_Standard_GZRS, + SkuName_STATUS_Standard_LRS, + SkuName_STATUS_Standard_RAGRS, + SkuName_STATUS_Standard_RAGZRS, + SkuName_STATUS_Standard_ZRS)) +} + +func Test_AccountImmutabilityPolicyProperties_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from AccountImmutabilityPolicyProperties to AccountImmutabilityPolicyProperties via AssignProperties_To_AccountImmutabilityPolicyProperties & AssignProperties_From_AccountImmutabilityPolicyProperties returns original", + prop.ForAll(RunPropertyAssignmentTestForAccountImmutabilityPolicyProperties, AccountImmutabilityPolicyPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForAccountImmutabilityPolicyProperties tests if a specific instance of AccountImmutabilityPolicyProperties can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForAccountImmutabilityPolicyProperties(subject AccountImmutabilityPolicyProperties) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.AccountImmutabilityPolicyProperties + err := copied.AssignProperties_To_AccountImmutabilityPolicyProperties(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual AccountImmutabilityPolicyProperties + err = actual.AssignProperties_From_AccountImmutabilityPolicyProperties(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_AccountImmutabilityPolicyProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccountImmutabilityPolicyProperties via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccountImmutabilityPolicyProperties, AccountImmutabilityPolicyPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccountImmutabilityPolicyProperties runs a test to see if a specific instance of AccountImmutabilityPolicyProperties round trips to JSON and back losslessly +func RunJSONSerializationTestForAccountImmutabilityPolicyProperties(subject AccountImmutabilityPolicyProperties) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccountImmutabilityPolicyProperties + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccountImmutabilityPolicyProperties instances for property testing - lazily instantiated by +// AccountImmutabilityPolicyPropertiesGenerator() +var accountImmutabilityPolicyPropertiesGenerator gopter.Gen + +// AccountImmutabilityPolicyPropertiesGenerator returns a generator of AccountImmutabilityPolicyProperties instances for property testing. +func AccountImmutabilityPolicyPropertiesGenerator() gopter.Gen { + if accountImmutabilityPolicyPropertiesGenerator != nil { + return accountImmutabilityPolicyPropertiesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties(generators) + accountImmutabilityPolicyPropertiesGenerator = gen.Struct(reflect.TypeOf(AccountImmutabilityPolicyProperties{}), generators) + + return accountImmutabilityPolicyPropertiesGenerator +} + +// AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWrites"] = gen.PtrOf(gen.Bool()) + gens["ImmutabilityPeriodSinceCreationInDays"] = gen.PtrOf(gen.Int()) + gens["State"] = gen.PtrOf(gen.OneConstOf(AccountImmutabilityPolicyProperties_State_Disabled, AccountImmutabilityPolicyProperties_State_Locked, AccountImmutabilityPolicyProperties_State_Unlocked)) +} + +func Test_AccountImmutabilityPolicyProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from AccountImmutabilityPolicyProperties_STATUS to AccountImmutabilityPolicyProperties_STATUS via AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS & AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForAccountImmutabilityPolicyProperties_STATUS, AccountImmutabilityPolicyProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForAccountImmutabilityPolicyProperties_STATUS tests if a specific instance of AccountImmutabilityPolicyProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForAccountImmutabilityPolicyProperties_STATUS(subject AccountImmutabilityPolicyProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.AccountImmutabilityPolicyProperties_STATUS + err := copied.AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual AccountImmutabilityPolicyProperties_STATUS + err = actual.AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_AccountImmutabilityPolicyProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccountImmutabilityPolicyProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccountImmutabilityPolicyProperties_STATUS, AccountImmutabilityPolicyProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccountImmutabilityPolicyProperties_STATUS runs a test to see if a specific instance of AccountImmutabilityPolicyProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForAccountImmutabilityPolicyProperties_STATUS(subject AccountImmutabilityPolicyProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccountImmutabilityPolicyProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccountImmutabilityPolicyProperties_STATUS instances for property testing - lazily instantiated by +// AccountImmutabilityPolicyProperties_STATUSGenerator() +var accountImmutabilityPolicyProperties_STATUSGenerator gopter.Gen + +// AccountImmutabilityPolicyProperties_STATUSGenerator returns a generator of AccountImmutabilityPolicyProperties_STATUS instances for property testing. +func AccountImmutabilityPolicyProperties_STATUSGenerator() gopter.Gen { + if accountImmutabilityPolicyProperties_STATUSGenerator != nil { + return accountImmutabilityPolicyProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_STATUS(generators) + accountImmutabilityPolicyProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(AccountImmutabilityPolicyProperties_STATUS{}), generators) + + return accountImmutabilityPolicyProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccountImmutabilityPolicyProperties_STATUS(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWrites"] = gen.PtrOf(gen.Bool()) + gens["ImmutabilityPeriodSinceCreationInDays"] = gen.PtrOf(gen.Int()) + gens["State"] = gen.PtrOf(gen.OneConstOf(AccountImmutabilityPolicyProperties_State_STATUS_Disabled, AccountImmutabilityPolicyProperties_State_STATUS_Locked, AccountImmutabilityPolicyProperties_State_STATUS_Unlocked)) +} + +func Test_ActiveDirectoryProperties_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ActiveDirectoryProperties to ActiveDirectoryProperties via AssignProperties_To_ActiveDirectoryProperties & AssignProperties_From_ActiveDirectoryProperties returns original", + prop.ForAll(RunPropertyAssignmentTestForActiveDirectoryProperties, ActiveDirectoryPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForActiveDirectoryProperties tests if a specific instance of ActiveDirectoryProperties can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForActiveDirectoryProperties(subject ActiveDirectoryProperties) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ActiveDirectoryProperties + err := copied.AssignProperties_To_ActiveDirectoryProperties(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ActiveDirectoryProperties + err = actual.AssignProperties_From_ActiveDirectoryProperties(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ActiveDirectoryProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ActiveDirectoryProperties via JSON returns original", + prop.ForAll(RunJSONSerializationTestForActiveDirectoryProperties, ActiveDirectoryPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForActiveDirectoryProperties runs a test to see if a specific instance of ActiveDirectoryProperties round trips to JSON and back losslessly +func RunJSONSerializationTestForActiveDirectoryProperties(subject ActiveDirectoryProperties) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ActiveDirectoryProperties + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ActiveDirectoryProperties instances for property testing - lazily instantiated by +// ActiveDirectoryPropertiesGenerator() +var activeDirectoryPropertiesGenerator gopter.Gen + +// ActiveDirectoryPropertiesGenerator returns a generator of ActiveDirectoryProperties instances for property testing. +func ActiveDirectoryPropertiesGenerator() gopter.Gen { + if activeDirectoryPropertiesGenerator != nil { + return activeDirectoryPropertiesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForActiveDirectoryProperties(generators) + activeDirectoryPropertiesGenerator = gen.Struct(reflect.TypeOf(ActiveDirectoryProperties{}), generators) + + return activeDirectoryPropertiesGenerator +} + +// AddIndependentPropertyGeneratorsForActiveDirectoryProperties is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForActiveDirectoryProperties(gens map[string]gopter.Gen) { + gens["AccountType"] = gen.PtrOf(gen.OneConstOf(ActiveDirectoryProperties_AccountType_Computer, ActiveDirectoryProperties_AccountType_User)) + gens["AzureStorageSid"] = gen.PtrOf(gen.AlphaString()) + gens["DomainGuid"] = gen.PtrOf(gen.AlphaString()) + gens["DomainName"] = gen.PtrOf(gen.AlphaString()) + gens["DomainSid"] = gen.PtrOf(gen.AlphaString()) + gens["ForestName"] = gen.PtrOf(gen.AlphaString()) + gens["NetBiosDomainName"] = gen.PtrOf(gen.AlphaString()) + gens["SamAccountName"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ActiveDirectoryProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ActiveDirectoryProperties_STATUS to ActiveDirectoryProperties_STATUS via AssignProperties_To_ActiveDirectoryProperties_STATUS & AssignProperties_From_ActiveDirectoryProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForActiveDirectoryProperties_STATUS, ActiveDirectoryProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForActiveDirectoryProperties_STATUS tests if a specific instance of ActiveDirectoryProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForActiveDirectoryProperties_STATUS(subject ActiveDirectoryProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ActiveDirectoryProperties_STATUS + err := copied.AssignProperties_To_ActiveDirectoryProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ActiveDirectoryProperties_STATUS + err = actual.AssignProperties_From_ActiveDirectoryProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ActiveDirectoryProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ActiveDirectoryProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForActiveDirectoryProperties_STATUS, ActiveDirectoryProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForActiveDirectoryProperties_STATUS runs a test to see if a specific instance of ActiveDirectoryProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForActiveDirectoryProperties_STATUS(subject ActiveDirectoryProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ActiveDirectoryProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ActiveDirectoryProperties_STATUS instances for property testing - lazily instantiated by +// ActiveDirectoryProperties_STATUSGenerator() +var activeDirectoryProperties_STATUSGenerator gopter.Gen + +// ActiveDirectoryProperties_STATUSGenerator returns a generator of ActiveDirectoryProperties_STATUS instances for property testing. +func ActiveDirectoryProperties_STATUSGenerator() gopter.Gen { + if activeDirectoryProperties_STATUSGenerator != nil { + return activeDirectoryProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForActiveDirectoryProperties_STATUS(generators) + activeDirectoryProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(ActiveDirectoryProperties_STATUS{}), generators) + + return activeDirectoryProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForActiveDirectoryProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForActiveDirectoryProperties_STATUS(gens map[string]gopter.Gen) { + gens["AccountType"] = gen.PtrOf(gen.OneConstOf(ActiveDirectoryProperties_AccountType_STATUS_Computer, ActiveDirectoryProperties_AccountType_STATUS_User)) + gens["AzureStorageSid"] = gen.PtrOf(gen.AlphaString()) + gens["DomainGuid"] = gen.PtrOf(gen.AlphaString()) + gens["DomainName"] = gen.PtrOf(gen.AlphaString()) + gens["DomainSid"] = gen.PtrOf(gen.AlphaString()) + gens["ForestName"] = gen.PtrOf(gen.AlphaString()) + gens["NetBiosDomainName"] = gen.PtrOf(gen.AlphaString()) + gens["SamAccountName"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_BlobRestoreParameters_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from BlobRestoreParameters_STATUS to BlobRestoreParameters_STATUS via AssignProperties_To_BlobRestoreParameters_STATUS & AssignProperties_From_BlobRestoreParameters_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForBlobRestoreParameters_STATUS, BlobRestoreParameters_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForBlobRestoreParameters_STATUS tests if a specific instance of BlobRestoreParameters_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForBlobRestoreParameters_STATUS(subject BlobRestoreParameters_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.BlobRestoreParameters_STATUS + err := copied.AssignProperties_To_BlobRestoreParameters_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual BlobRestoreParameters_STATUS + err = actual.AssignProperties_From_BlobRestoreParameters_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_BlobRestoreParameters_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of BlobRestoreParameters_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForBlobRestoreParameters_STATUS, BlobRestoreParameters_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForBlobRestoreParameters_STATUS runs a test to see if a specific instance of BlobRestoreParameters_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForBlobRestoreParameters_STATUS(subject BlobRestoreParameters_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual BlobRestoreParameters_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of BlobRestoreParameters_STATUS instances for property testing - lazily instantiated by +// BlobRestoreParameters_STATUSGenerator() +var blobRestoreParameters_STATUSGenerator gopter.Gen + +// BlobRestoreParameters_STATUSGenerator returns a generator of BlobRestoreParameters_STATUS instances for property testing. +// We first initialize blobRestoreParameters_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func BlobRestoreParameters_STATUSGenerator() gopter.Gen { + if blobRestoreParameters_STATUSGenerator != nil { + return blobRestoreParameters_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreParameters_STATUS(generators) + blobRestoreParameters_STATUSGenerator = gen.Struct(reflect.TypeOf(BlobRestoreParameters_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreParameters_STATUS(generators) + AddRelatedPropertyGeneratorsForBlobRestoreParameters_STATUS(generators) + blobRestoreParameters_STATUSGenerator = gen.Struct(reflect.TypeOf(BlobRestoreParameters_STATUS{}), generators) + + return blobRestoreParameters_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForBlobRestoreParameters_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForBlobRestoreParameters_STATUS(gens map[string]gopter.Gen) { + gens["TimeToRestore"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForBlobRestoreParameters_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForBlobRestoreParameters_STATUS(gens map[string]gopter.Gen) { + gens["BlobRanges"] = gen.SliceOf(BlobRestoreRange_STATUSGenerator()) +} + +func Test_EncryptionIdentity_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionIdentity to EncryptionIdentity via AssignProperties_To_EncryptionIdentity & AssignProperties_From_EncryptionIdentity returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionIdentity, EncryptionIdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionIdentity tests if a specific instance of EncryptionIdentity can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryptionIdentity(subject EncryptionIdentity) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.EncryptionIdentity + err := copied.AssignProperties_To_EncryptionIdentity(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionIdentity + err = actual.AssignProperties_From_EncryptionIdentity(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_EncryptionIdentity_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionIdentity via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionIdentity, EncryptionIdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionIdentity runs a test to see if a specific instance of EncryptionIdentity round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionIdentity(subject EncryptionIdentity) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionIdentity + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionIdentity instances for property testing - lazily instantiated by EncryptionIdentityGenerator() +var encryptionIdentityGenerator gopter.Gen + +// EncryptionIdentityGenerator returns a generator of EncryptionIdentity instances for property testing. +func EncryptionIdentityGenerator() gopter.Gen { + if encryptionIdentityGenerator != nil { + return encryptionIdentityGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionIdentity(generators) + encryptionIdentityGenerator = gen.Struct(reflect.TypeOf(EncryptionIdentity{}), generators) + + return encryptionIdentityGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionIdentity is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionIdentity(gens map[string]gopter.Gen) { + gens["FederatedIdentityClientId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionIdentity_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionIdentity_STATUS to EncryptionIdentity_STATUS via AssignProperties_To_EncryptionIdentity_STATUS & AssignProperties_From_EncryptionIdentity_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionIdentity_STATUS, EncryptionIdentity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionIdentity_STATUS tests if a specific instance of EncryptionIdentity_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryptionIdentity_STATUS(subject EncryptionIdentity_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.EncryptionIdentity_STATUS + err := copied.AssignProperties_To_EncryptionIdentity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionIdentity_STATUS + err = actual.AssignProperties_From_EncryptionIdentity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_EncryptionIdentity_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionIdentity_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionIdentity_STATUS, EncryptionIdentity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionIdentity_STATUS runs a test to see if a specific instance of EncryptionIdentity_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionIdentity_STATUS(subject EncryptionIdentity_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionIdentity_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionIdentity_STATUS instances for property testing - lazily instantiated by +// EncryptionIdentity_STATUSGenerator() +var encryptionIdentity_STATUSGenerator gopter.Gen + +// EncryptionIdentity_STATUSGenerator returns a generator of EncryptionIdentity_STATUS instances for property testing. +func EncryptionIdentity_STATUSGenerator() gopter.Gen { + if encryptionIdentity_STATUSGenerator != nil { + return encryptionIdentity_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionIdentity_STATUS(generators) + encryptionIdentity_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionIdentity_STATUS{}), generators) + + return encryptionIdentity_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionIdentity_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionIdentity_STATUS(gens map[string]gopter.Gen) { + gens["FederatedIdentityClientId"] = gen.PtrOf(gen.AlphaString()) + gens["UserAssignedIdentity"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionServices_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionServices to EncryptionServices via AssignProperties_To_EncryptionServices & AssignProperties_From_EncryptionServices returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionServices, EncryptionServicesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionServices tests if a specific instance of EncryptionServices can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryptionServices(subject EncryptionServices) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.EncryptionServices + err := copied.AssignProperties_To_EncryptionServices(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionServices + err = actual.AssignProperties_From_EncryptionServices(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_EncryptionServices_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionServices via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionServices, EncryptionServicesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionServices runs a test to see if a specific instance of EncryptionServices round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionServices(subject EncryptionServices) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionServices + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionServices instances for property testing - lazily instantiated by EncryptionServicesGenerator() +var encryptionServicesGenerator gopter.Gen + +// EncryptionServicesGenerator returns a generator of EncryptionServices instances for property testing. +func EncryptionServicesGenerator() gopter.Gen { + if encryptionServicesGenerator != nil { + return encryptionServicesGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForEncryptionServices(generators) + encryptionServicesGenerator = gen.Struct(reflect.TypeOf(EncryptionServices{}), generators) + + return encryptionServicesGenerator +} + +// AddRelatedPropertyGeneratorsForEncryptionServices is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionServices(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(EncryptionServiceGenerator()) + gens["File"] = gen.PtrOf(EncryptionServiceGenerator()) + gens["Queue"] = gen.PtrOf(EncryptionServiceGenerator()) + gens["Table"] = gen.PtrOf(EncryptionServiceGenerator()) +} + +func Test_EncryptionServices_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionServices_STATUS to EncryptionServices_STATUS via AssignProperties_To_EncryptionServices_STATUS & AssignProperties_From_EncryptionServices_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionServices_STATUS, EncryptionServices_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionServices_STATUS tests if a specific instance of EncryptionServices_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryptionServices_STATUS(subject EncryptionServices_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.EncryptionServices_STATUS + err := copied.AssignProperties_To_EncryptionServices_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionServices_STATUS + err = actual.AssignProperties_From_EncryptionServices_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_EncryptionServices_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionServices_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionServices_STATUS, EncryptionServices_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionServices_STATUS runs a test to see if a specific instance of EncryptionServices_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionServices_STATUS(subject EncryptionServices_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionServices_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionServices_STATUS instances for property testing - lazily instantiated by +// EncryptionServices_STATUSGenerator() +var encryptionServices_STATUSGenerator gopter.Gen + +// EncryptionServices_STATUSGenerator returns a generator of EncryptionServices_STATUS instances for property testing. +func EncryptionServices_STATUSGenerator() gopter.Gen { + if encryptionServices_STATUSGenerator != nil { + return encryptionServices_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForEncryptionServices_STATUS(generators) + encryptionServices_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionServices_STATUS{}), generators) + + return encryptionServices_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForEncryptionServices_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionServices_STATUS(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(EncryptionService_STATUSGenerator()) + gens["File"] = gen.PtrOf(EncryptionService_STATUSGenerator()) + gens["Queue"] = gen.PtrOf(EncryptionService_STATUSGenerator()) + gens["Table"] = gen.PtrOf(EncryptionService_STATUSGenerator()) +} + +func Test_IPRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from IPRule to IPRule via AssignProperties_To_IPRule & AssignProperties_From_IPRule returns original", + prop.ForAll(RunPropertyAssignmentTestForIPRule, IPRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForIPRule tests if a specific instance of IPRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForIPRule(subject IPRule) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.IPRule + err := copied.AssignProperties_To_IPRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual IPRule + err = actual.AssignProperties_From_IPRule(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_IPRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of IPRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIPRule, IPRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIPRule runs a test to see if a specific instance of IPRule round trips to JSON and back losslessly +func RunJSONSerializationTestForIPRule(subject IPRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual IPRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of IPRule instances for property testing - lazily instantiated by IPRuleGenerator() +var ipRuleGenerator gopter.Gen + +// IPRuleGenerator returns a generator of IPRule instances for property testing. +func IPRuleGenerator() gopter.Gen { + if ipRuleGenerator != nil { + return ipRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIPRule(generators) + ipRuleGenerator = gen.Struct(reflect.TypeOf(IPRule{}), generators) + + return ipRuleGenerator +} + +// AddIndependentPropertyGeneratorsForIPRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIPRule(gens map[string]gopter.Gen) { + gens["Action"] = gen.PtrOf(gen.OneConstOf(IPRule_Action_Allow)) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_IPRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from IPRule_STATUS to IPRule_STATUS via AssignProperties_To_IPRule_STATUS & AssignProperties_From_IPRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForIPRule_STATUS, IPRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForIPRule_STATUS tests if a specific instance of IPRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForIPRule_STATUS(subject IPRule_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.IPRule_STATUS + err := copied.AssignProperties_To_IPRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual IPRule_STATUS + err = actual.AssignProperties_From_IPRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_IPRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of IPRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIPRule_STATUS, IPRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIPRule_STATUS runs a test to see if a specific instance of IPRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForIPRule_STATUS(subject IPRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual IPRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of IPRule_STATUS instances for property testing - lazily instantiated by IPRule_STATUSGenerator() +var ipRule_STATUSGenerator gopter.Gen + +// IPRule_STATUSGenerator returns a generator of IPRule_STATUS instances for property testing. +func IPRule_STATUSGenerator() gopter.Gen { + if ipRule_STATUSGenerator != nil { + return ipRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIPRule_STATUS(generators) + ipRule_STATUSGenerator = gen.Struct(reflect.TypeOf(IPRule_STATUS{}), generators) + + return ipRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForIPRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIPRule_STATUS(gens map[string]gopter.Gen) { + gens["Action"] = gen.PtrOf(gen.OneConstOf(IPRule_Action_STATUS_Allow)) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_KeyVaultProperties_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from KeyVaultProperties to KeyVaultProperties via AssignProperties_To_KeyVaultProperties & AssignProperties_From_KeyVaultProperties returns original", + prop.ForAll(RunPropertyAssignmentTestForKeyVaultProperties, KeyVaultPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForKeyVaultProperties tests if a specific instance of KeyVaultProperties can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForKeyVaultProperties(subject KeyVaultProperties) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.KeyVaultProperties + err := copied.AssignProperties_To_KeyVaultProperties(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual KeyVaultProperties + err = actual.AssignProperties_From_KeyVaultProperties(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_KeyVaultProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyVaultProperties via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyVaultProperties, KeyVaultPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyVaultProperties runs a test to see if a specific instance of KeyVaultProperties round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyVaultProperties(subject KeyVaultProperties) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyVaultProperties + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyVaultProperties instances for property testing - lazily instantiated by KeyVaultPropertiesGenerator() +var keyVaultPropertiesGenerator gopter.Gen + +// KeyVaultPropertiesGenerator returns a generator of KeyVaultProperties instances for property testing. +func KeyVaultPropertiesGenerator() gopter.Gen { + if keyVaultPropertiesGenerator != nil { + return keyVaultPropertiesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyVaultProperties(generators) + keyVaultPropertiesGenerator = gen.Struct(reflect.TypeOf(KeyVaultProperties{}), generators) + + return keyVaultPropertiesGenerator +} + +// AddIndependentPropertyGeneratorsForKeyVaultProperties is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyVaultProperties(gens map[string]gopter.Gen) { + gens["Keyname"] = gen.PtrOf(gen.AlphaString()) + gens["Keyvaulturi"] = gen.PtrOf(gen.AlphaString()) + gens["Keyversion"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_KeyVaultProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from KeyVaultProperties_STATUS to KeyVaultProperties_STATUS via AssignProperties_To_KeyVaultProperties_STATUS & AssignProperties_From_KeyVaultProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForKeyVaultProperties_STATUS, KeyVaultProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForKeyVaultProperties_STATUS tests if a specific instance of KeyVaultProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForKeyVaultProperties_STATUS(subject KeyVaultProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.KeyVaultProperties_STATUS + err := copied.AssignProperties_To_KeyVaultProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual KeyVaultProperties_STATUS + err = actual.AssignProperties_From_KeyVaultProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_KeyVaultProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyVaultProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyVaultProperties_STATUS, KeyVaultProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyVaultProperties_STATUS runs a test to see if a specific instance of KeyVaultProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyVaultProperties_STATUS(subject KeyVaultProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyVaultProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyVaultProperties_STATUS instances for property testing - lazily instantiated by +// KeyVaultProperties_STATUSGenerator() +var keyVaultProperties_STATUSGenerator gopter.Gen + +// KeyVaultProperties_STATUSGenerator returns a generator of KeyVaultProperties_STATUS instances for property testing. +func KeyVaultProperties_STATUSGenerator() gopter.Gen { + if keyVaultProperties_STATUSGenerator != nil { + return keyVaultProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyVaultProperties_STATUS(generators) + keyVaultProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(KeyVaultProperties_STATUS{}), generators) + + return keyVaultProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForKeyVaultProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyVaultProperties_STATUS(gens map[string]gopter.Gen) { + gens["CurrentVersionedKeyExpirationTimestamp"] = gen.PtrOf(gen.AlphaString()) + gens["CurrentVersionedKeyIdentifier"] = gen.PtrOf(gen.AlphaString()) + gens["Keyname"] = gen.PtrOf(gen.AlphaString()) + gens["Keyvaulturi"] = gen.PtrOf(gen.AlphaString()) + gens["Keyversion"] = gen.PtrOf(gen.AlphaString()) + gens["LastKeyRotationTimestamp"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ResourceAccessRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ResourceAccessRule to ResourceAccessRule via AssignProperties_To_ResourceAccessRule & AssignProperties_From_ResourceAccessRule returns original", + prop.ForAll(RunPropertyAssignmentTestForResourceAccessRule, ResourceAccessRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForResourceAccessRule tests if a specific instance of ResourceAccessRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForResourceAccessRule(subject ResourceAccessRule) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ResourceAccessRule + err := copied.AssignProperties_To_ResourceAccessRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ResourceAccessRule + err = actual.AssignProperties_From_ResourceAccessRule(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ResourceAccessRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ResourceAccessRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForResourceAccessRule, ResourceAccessRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForResourceAccessRule runs a test to see if a specific instance of ResourceAccessRule round trips to JSON and back losslessly +func RunJSONSerializationTestForResourceAccessRule(subject ResourceAccessRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ResourceAccessRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ResourceAccessRule instances for property testing - lazily instantiated by ResourceAccessRuleGenerator() +var resourceAccessRuleGenerator gopter.Gen + +// ResourceAccessRuleGenerator returns a generator of ResourceAccessRule instances for property testing. +func ResourceAccessRuleGenerator() gopter.Gen { + if resourceAccessRuleGenerator != nil { + return resourceAccessRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForResourceAccessRule(generators) + resourceAccessRuleGenerator = gen.Struct(reflect.TypeOf(ResourceAccessRule{}), generators) + + return resourceAccessRuleGenerator +} + +// AddIndependentPropertyGeneratorsForResourceAccessRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForResourceAccessRule(gens map[string]gopter.Gen) { + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ResourceAccessRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ResourceAccessRule_STATUS to ResourceAccessRule_STATUS via AssignProperties_To_ResourceAccessRule_STATUS & AssignProperties_From_ResourceAccessRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForResourceAccessRule_STATUS, ResourceAccessRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForResourceAccessRule_STATUS tests if a specific instance of ResourceAccessRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForResourceAccessRule_STATUS(subject ResourceAccessRule_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ResourceAccessRule_STATUS + err := copied.AssignProperties_To_ResourceAccessRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ResourceAccessRule_STATUS + err = actual.AssignProperties_From_ResourceAccessRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ResourceAccessRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ResourceAccessRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForResourceAccessRule_STATUS, ResourceAccessRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForResourceAccessRule_STATUS runs a test to see if a specific instance of ResourceAccessRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForResourceAccessRule_STATUS(subject ResourceAccessRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ResourceAccessRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ResourceAccessRule_STATUS instances for property testing - lazily instantiated by +// ResourceAccessRule_STATUSGenerator() +var resourceAccessRule_STATUSGenerator gopter.Gen + +// ResourceAccessRule_STATUSGenerator returns a generator of ResourceAccessRule_STATUS instances for property testing. +func ResourceAccessRule_STATUSGenerator() gopter.Gen { + if resourceAccessRule_STATUSGenerator != nil { + return resourceAccessRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForResourceAccessRule_STATUS(generators) + resourceAccessRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ResourceAccessRule_STATUS{}), generators) + + return resourceAccessRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForResourceAccessRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForResourceAccessRule_STATUS(gens map[string]gopter.Gen) { + gens["ResourceId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_StorageAccountInternetEndpoints_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountInternetEndpoints_STATUS to StorageAccountInternetEndpoints_STATUS via AssignProperties_To_StorageAccountInternetEndpoints_STATUS & AssignProperties_From_StorageAccountInternetEndpoints_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountInternetEndpoints_STATUS, StorageAccountInternetEndpoints_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountInternetEndpoints_STATUS tests if a specific instance of StorageAccountInternetEndpoints_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountInternetEndpoints_STATUS(subject StorageAccountInternetEndpoints_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountInternetEndpoints_STATUS + err := copied.AssignProperties_To_StorageAccountInternetEndpoints_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountInternetEndpoints_STATUS + err = actual.AssignProperties_From_StorageAccountInternetEndpoints_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountInternetEndpoints_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountInternetEndpoints_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountInternetEndpoints_STATUS, StorageAccountInternetEndpoints_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountInternetEndpoints_STATUS runs a test to see if a specific instance of StorageAccountInternetEndpoints_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountInternetEndpoints_STATUS(subject StorageAccountInternetEndpoints_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountInternetEndpoints_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountInternetEndpoints_STATUS instances for property testing - lazily instantiated by +// StorageAccountInternetEndpoints_STATUSGenerator() +var storageAccountInternetEndpoints_STATUSGenerator gopter.Gen + +// StorageAccountInternetEndpoints_STATUSGenerator returns a generator of StorageAccountInternetEndpoints_STATUS instances for property testing. +func StorageAccountInternetEndpoints_STATUSGenerator() gopter.Gen { + if storageAccountInternetEndpoints_STATUSGenerator != nil { + return storageAccountInternetEndpoints_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountInternetEndpoints_STATUS(generators) + storageAccountInternetEndpoints_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccountInternetEndpoints_STATUS{}), generators) + + return storageAccountInternetEndpoints_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccountInternetEndpoints_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccountInternetEndpoints_STATUS(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(gen.AlphaString()) + gens["Dfs"] = gen.PtrOf(gen.AlphaString()) + gens["File"] = gen.PtrOf(gen.AlphaString()) + gens["Web"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_StorageAccountMicrosoftEndpoints_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountMicrosoftEndpoints_STATUS to StorageAccountMicrosoftEndpoints_STATUS via AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS & AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountMicrosoftEndpoints_STATUS, StorageAccountMicrosoftEndpoints_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountMicrosoftEndpoints_STATUS tests if a specific instance of StorageAccountMicrosoftEndpoints_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountMicrosoftEndpoints_STATUS(subject StorageAccountMicrosoftEndpoints_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountMicrosoftEndpoints_STATUS + err := copied.AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountMicrosoftEndpoints_STATUS + err = actual.AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountMicrosoftEndpoints_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountMicrosoftEndpoints_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountMicrosoftEndpoints_STATUS, StorageAccountMicrosoftEndpoints_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountMicrosoftEndpoints_STATUS runs a test to see if a specific instance of StorageAccountMicrosoftEndpoints_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountMicrosoftEndpoints_STATUS(subject StorageAccountMicrosoftEndpoints_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountMicrosoftEndpoints_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountMicrosoftEndpoints_STATUS instances for property testing - lazily instantiated by +// StorageAccountMicrosoftEndpoints_STATUSGenerator() +var storageAccountMicrosoftEndpoints_STATUSGenerator gopter.Gen + +// StorageAccountMicrosoftEndpoints_STATUSGenerator returns a generator of StorageAccountMicrosoftEndpoints_STATUS instances for property testing. +func StorageAccountMicrosoftEndpoints_STATUSGenerator() gopter.Gen { + if storageAccountMicrosoftEndpoints_STATUSGenerator != nil { + return storageAccountMicrosoftEndpoints_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccountMicrosoftEndpoints_STATUS(generators) + storageAccountMicrosoftEndpoints_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccountMicrosoftEndpoints_STATUS{}), generators) + + return storageAccountMicrosoftEndpoints_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccountMicrosoftEndpoints_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccountMicrosoftEndpoints_STATUS(gens map[string]gopter.Gen) { + gens["Blob"] = gen.PtrOf(gen.AlphaString()) + gens["Dfs"] = gen.PtrOf(gen.AlphaString()) + gens["File"] = gen.PtrOf(gen.AlphaString()) + gens["Queue"] = gen.PtrOf(gen.AlphaString()) + gens["Table"] = gen.PtrOf(gen.AlphaString()) + gens["Web"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_StorageAccountOperatorConfigMaps_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountOperatorConfigMaps to StorageAccountOperatorConfigMaps via AssignProperties_To_StorageAccountOperatorConfigMaps & AssignProperties_From_StorageAccountOperatorConfigMaps returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountOperatorConfigMaps, StorageAccountOperatorConfigMapsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountOperatorConfigMaps tests if a specific instance of StorageAccountOperatorConfigMaps can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountOperatorConfigMaps(subject StorageAccountOperatorConfigMaps) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountOperatorConfigMaps + err := copied.AssignProperties_To_StorageAccountOperatorConfigMaps(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountOperatorConfigMaps + err = actual.AssignProperties_From_StorageAccountOperatorConfigMaps(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountOperatorConfigMaps_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountOperatorConfigMaps via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountOperatorConfigMaps, StorageAccountOperatorConfigMapsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountOperatorConfigMaps runs a test to see if a specific instance of StorageAccountOperatorConfigMaps round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountOperatorConfigMaps(subject StorageAccountOperatorConfigMaps) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountOperatorConfigMaps + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountOperatorConfigMaps instances for property testing - lazily instantiated by +// StorageAccountOperatorConfigMapsGenerator() +var storageAccountOperatorConfigMapsGenerator gopter.Gen + +// StorageAccountOperatorConfigMapsGenerator returns a generator of StorageAccountOperatorConfigMaps instances for property testing. +func StorageAccountOperatorConfigMapsGenerator() gopter.Gen { + if storageAccountOperatorConfigMapsGenerator != nil { + return storageAccountOperatorConfigMapsGenerator + } + + generators := make(map[string]gopter.Gen) + storageAccountOperatorConfigMapsGenerator = gen.Struct(reflect.TypeOf(StorageAccountOperatorConfigMaps{}), generators) + + return storageAccountOperatorConfigMapsGenerator +} + +func Test_StorageAccountOperatorSecrets_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountOperatorSecrets to StorageAccountOperatorSecrets via AssignProperties_To_StorageAccountOperatorSecrets & AssignProperties_From_StorageAccountOperatorSecrets returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountOperatorSecrets, StorageAccountOperatorSecretsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountOperatorSecrets tests if a specific instance of StorageAccountOperatorSecrets can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountOperatorSecrets(subject StorageAccountOperatorSecrets) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountOperatorSecrets + err := copied.AssignProperties_To_StorageAccountOperatorSecrets(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountOperatorSecrets + err = actual.AssignProperties_From_StorageAccountOperatorSecrets(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountOperatorSecrets_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountOperatorSecrets via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountOperatorSecrets, StorageAccountOperatorSecretsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountOperatorSecrets runs a test to see if a specific instance of StorageAccountOperatorSecrets round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountOperatorSecrets(subject StorageAccountOperatorSecrets) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountOperatorSecrets + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountOperatorSecrets instances for property testing - lazily instantiated by +// StorageAccountOperatorSecretsGenerator() +var storageAccountOperatorSecretsGenerator gopter.Gen + +// StorageAccountOperatorSecretsGenerator returns a generator of StorageAccountOperatorSecrets instances for property testing. +func StorageAccountOperatorSecretsGenerator() gopter.Gen { + if storageAccountOperatorSecretsGenerator != nil { + return storageAccountOperatorSecretsGenerator + } + + generators := make(map[string]gopter.Gen) + storageAccountOperatorSecretsGenerator = gen.Struct(reflect.TypeOf(StorageAccountOperatorSecrets{}), generators) + + return storageAccountOperatorSecretsGenerator +} + +func Test_UserAssignedIdentity_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from UserAssignedIdentity_STATUS to UserAssignedIdentity_STATUS via AssignProperties_To_UserAssignedIdentity_STATUS & AssignProperties_From_UserAssignedIdentity_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForUserAssignedIdentity_STATUS, UserAssignedIdentity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForUserAssignedIdentity_STATUS tests if a specific instance of UserAssignedIdentity_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForUserAssignedIdentity_STATUS(subject UserAssignedIdentity_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.UserAssignedIdentity_STATUS + err := copied.AssignProperties_To_UserAssignedIdentity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual UserAssignedIdentity_STATUS + err = actual.AssignProperties_From_UserAssignedIdentity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_UserAssignedIdentity_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of UserAssignedIdentity_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserAssignedIdentity_STATUS, UserAssignedIdentity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserAssignedIdentity_STATUS runs a test to see if a specific instance of UserAssignedIdentity_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForUserAssignedIdentity_STATUS(subject UserAssignedIdentity_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserAssignedIdentity_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of UserAssignedIdentity_STATUS instances for property testing - lazily instantiated by +// UserAssignedIdentity_STATUSGenerator() +var userAssignedIdentity_STATUSGenerator gopter.Gen + +// UserAssignedIdentity_STATUSGenerator returns a generator of UserAssignedIdentity_STATUS instances for property testing. +func UserAssignedIdentity_STATUSGenerator() gopter.Gen { + if userAssignedIdentity_STATUSGenerator != nil { + return userAssignedIdentity_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForUserAssignedIdentity_STATUS(generators) + userAssignedIdentity_STATUSGenerator = gen.Struct(reflect.TypeOf(UserAssignedIdentity_STATUS{}), generators) + + return userAssignedIdentity_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForUserAssignedIdentity_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForUserAssignedIdentity_STATUS(gens map[string]gopter.Gen) { + gens["ClientId"] = gen.PtrOf(gen.AlphaString()) + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_UserAssignedIdentityDetails_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from UserAssignedIdentityDetails to UserAssignedIdentityDetails via AssignProperties_To_UserAssignedIdentityDetails & AssignProperties_From_UserAssignedIdentityDetails returns original", + prop.ForAll(RunPropertyAssignmentTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForUserAssignedIdentityDetails tests if a specific instance of UserAssignedIdentityDetails can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForUserAssignedIdentityDetails(subject UserAssignedIdentityDetails) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.UserAssignedIdentityDetails + err := copied.AssignProperties_To_UserAssignedIdentityDetails(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual UserAssignedIdentityDetails + err = actual.AssignProperties_From_UserAssignedIdentityDetails(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_UserAssignedIdentityDetails_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of UserAssignedIdentityDetails via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserAssignedIdentityDetails runs a test to see if a specific instance of UserAssignedIdentityDetails round trips to JSON and back losslessly +func RunJSONSerializationTestForUserAssignedIdentityDetails(subject UserAssignedIdentityDetails) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserAssignedIdentityDetails + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of UserAssignedIdentityDetails instances for property testing - lazily instantiated by +// UserAssignedIdentityDetailsGenerator() +var userAssignedIdentityDetailsGenerator gopter.Gen + +// UserAssignedIdentityDetailsGenerator returns a generator of UserAssignedIdentityDetails instances for property testing. +func UserAssignedIdentityDetailsGenerator() gopter.Gen { + if userAssignedIdentityDetailsGenerator != nil { + return userAssignedIdentityDetailsGenerator + } + + generators := make(map[string]gopter.Gen) + userAssignedIdentityDetailsGenerator = gen.Struct(reflect.TypeOf(UserAssignedIdentityDetails{}), generators) + + return userAssignedIdentityDetailsGenerator +} + +func Test_VirtualNetworkRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from VirtualNetworkRule to VirtualNetworkRule via AssignProperties_To_VirtualNetworkRule & AssignProperties_From_VirtualNetworkRule returns original", + prop.ForAll(RunPropertyAssignmentTestForVirtualNetworkRule, VirtualNetworkRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForVirtualNetworkRule tests if a specific instance of VirtualNetworkRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForVirtualNetworkRule(subject VirtualNetworkRule) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.VirtualNetworkRule + err := copied.AssignProperties_To_VirtualNetworkRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual VirtualNetworkRule + err = actual.AssignProperties_From_VirtualNetworkRule(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_VirtualNetworkRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VirtualNetworkRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule, VirtualNetworkRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVirtualNetworkRule runs a test to see if a specific instance of VirtualNetworkRule round trips to JSON and back losslessly +func RunJSONSerializationTestForVirtualNetworkRule(subject VirtualNetworkRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VirtualNetworkRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VirtualNetworkRule instances for property testing - lazily instantiated by VirtualNetworkRuleGenerator() +var virtualNetworkRuleGenerator gopter.Gen + +// VirtualNetworkRuleGenerator returns a generator of VirtualNetworkRule instances for property testing. +func VirtualNetworkRuleGenerator() gopter.Gen { + if virtualNetworkRuleGenerator != nil { + return virtualNetworkRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVirtualNetworkRule(generators) + virtualNetworkRuleGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule{}), generators) + + return virtualNetworkRuleGenerator +} + +// AddIndependentPropertyGeneratorsForVirtualNetworkRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVirtualNetworkRule(gens map[string]gopter.Gen) { + gens["Action"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkRule_Action_Allow)) + gens["State"] = gen.PtrOf(gen.OneConstOf( + VirtualNetworkRule_State_Deprovisioning, + VirtualNetworkRule_State_Failed, + VirtualNetworkRule_State_NetworkSourceDeleted, + VirtualNetworkRule_State_Provisioning, + VirtualNetworkRule_State_Succeeded)) +} + +func Test_VirtualNetworkRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from VirtualNetworkRule_STATUS to VirtualNetworkRule_STATUS via AssignProperties_To_VirtualNetworkRule_STATUS & AssignProperties_From_VirtualNetworkRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForVirtualNetworkRule_STATUS, VirtualNetworkRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForVirtualNetworkRule_STATUS tests if a specific instance of VirtualNetworkRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForVirtualNetworkRule_STATUS(subject VirtualNetworkRule_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.VirtualNetworkRule_STATUS + err := copied.AssignProperties_To_VirtualNetworkRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual VirtualNetworkRule_STATUS + err = actual.AssignProperties_From_VirtualNetworkRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_VirtualNetworkRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VirtualNetworkRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule_STATUS, VirtualNetworkRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVirtualNetworkRule_STATUS runs a test to see if a specific instance of VirtualNetworkRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForVirtualNetworkRule_STATUS(subject VirtualNetworkRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VirtualNetworkRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VirtualNetworkRule_STATUS instances for property testing - lazily instantiated by +// VirtualNetworkRule_STATUSGenerator() +var virtualNetworkRule_STATUSGenerator gopter.Gen + +// VirtualNetworkRule_STATUSGenerator returns a generator of VirtualNetworkRule_STATUS instances for property testing. +func VirtualNetworkRule_STATUSGenerator() gopter.Gen { + if virtualNetworkRule_STATUSGenerator != nil { + return virtualNetworkRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS(generators) + virtualNetworkRule_STATUSGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule_STATUS{}), generators) + + return virtualNetworkRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS(gens map[string]gopter.Gen) { + gens["Action"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkRule_Action_STATUS_Allow)) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["State"] = gen.PtrOf(gen.OneConstOf( + VirtualNetworkRule_State_STATUS_Deprovisioning, + VirtualNetworkRule_State_STATUS_Failed, + VirtualNetworkRule_State_STATUS_NetworkSourceDeleted, + VirtualNetworkRule_State_STATUS_Provisioning, + VirtualNetworkRule_State_STATUS_Succeeded)) +} + +func Test_BlobRestoreRange_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from BlobRestoreRange_STATUS to BlobRestoreRange_STATUS via AssignProperties_To_BlobRestoreRange_STATUS & AssignProperties_From_BlobRestoreRange_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForBlobRestoreRange_STATUS, BlobRestoreRange_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForBlobRestoreRange_STATUS tests if a specific instance of BlobRestoreRange_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForBlobRestoreRange_STATUS(subject BlobRestoreRange_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.BlobRestoreRange_STATUS + err := copied.AssignProperties_To_BlobRestoreRange_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual BlobRestoreRange_STATUS + err = actual.AssignProperties_From_BlobRestoreRange_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_BlobRestoreRange_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of BlobRestoreRange_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForBlobRestoreRange_STATUS, BlobRestoreRange_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForBlobRestoreRange_STATUS runs a test to see if a specific instance of BlobRestoreRange_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForBlobRestoreRange_STATUS(subject BlobRestoreRange_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual BlobRestoreRange_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of BlobRestoreRange_STATUS instances for property testing - lazily instantiated by +// BlobRestoreRange_STATUSGenerator() +var blobRestoreRange_STATUSGenerator gopter.Gen + +// BlobRestoreRange_STATUSGenerator returns a generator of BlobRestoreRange_STATUS instances for property testing. +func BlobRestoreRange_STATUSGenerator() gopter.Gen { + if blobRestoreRange_STATUSGenerator != nil { + return blobRestoreRange_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForBlobRestoreRange_STATUS(generators) + blobRestoreRange_STATUSGenerator = gen.Struct(reflect.TypeOf(BlobRestoreRange_STATUS{}), generators) + + return blobRestoreRange_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForBlobRestoreRange_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForBlobRestoreRange_STATUS(gens map[string]gopter.Gen) { + gens["EndRange"] = gen.PtrOf(gen.AlphaString()) + gens["StartRange"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionService_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionService to EncryptionService via AssignProperties_To_EncryptionService & AssignProperties_From_EncryptionService returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionService, EncryptionServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionService tests if a specific instance of EncryptionService can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryptionService(subject EncryptionService) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.EncryptionService + err := copied.AssignProperties_To_EncryptionService(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionService + err = actual.AssignProperties_From_EncryptionService(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_EncryptionService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionService via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionService, EncryptionServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionService runs a test to see if a specific instance of EncryptionService round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionService(subject EncryptionService) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionService + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionService instances for property testing - lazily instantiated by EncryptionServiceGenerator() +var encryptionServiceGenerator gopter.Gen + +// EncryptionServiceGenerator returns a generator of EncryptionService instances for property testing. +func EncryptionServiceGenerator() gopter.Gen { + if encryptionServiceGenerator != nil { + return encryptionServiceGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionService(generators) + encryptionServiceGenerator = gen.Struct(reflect.TypeOf(EncryptionService{}), generators) + + return encryptionServiceGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionService is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionService(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["KeyType"] = gen.PtrOf(gen.OneConstOf(EncryptionService_KeyType_Account, EncryptionService_KeyType_Service)) +} + +func Test_EncryptionService_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionService_STATUS to EncryptionService_STATUS via AssignProperties_To_EncryptionService_STATUS & AssignProperties_From_EncryptionService_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionService_STATUS, EncryptionService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionService_STATUS tests if a specific instance of EncryptionService_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForEncryptionService_STATUS(subject EncryptionService_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.EncryptionService_STATUS + err := copied.AssignProperties_To_EncryptionService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionService_STATUS + err = actual.AssignProperties_From_EncryptionService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_EncryptionService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionService_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionService_STATUS, EncryptionService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionService_STATUS runs a test to see if a specific instance of EncryptionService_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionService_STATUS(subject EncryptionService_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionService_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionService_STATUS instances for property testing - lazily instantiated by +// EncryptionService_STATUSGenerator() +var encryptionService_STATUSGenerator gopter.Gen + +// EncryptionService_STATUSGenerator returns a generator of EncryptionService_STATUS instances for property testing. +func EncryptionService_STATUSGenerator() gopter.Gen { + if encryptionService_STATUSGenerator != nil { + return encryptionService_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionService_STATUS(generators) + encryptionService_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionService_STATUS{}), generators) + + return encryptionService_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionService_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionService_STATUS(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["KeyType"] = gen.PtrOf(gen.OneConstOf(EncryptionService_KeyType_STATUS_Account, EncryptionService_KeyType_STATUS_Service)) + gens["LastEnabledTime"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_service_spec_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_blob_service_spec_arm_types_gen.go new file mode 100644 index 00000000000..337211e2935 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_service_spec_arm_types_gen.go @@ -0,0 +1,141 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type StorageAccounts_BlobService_Spec_ARM struct { + Name string `json:"name,omitempty"` + + // Properties: The properties of a storage account’s Blob service. + Properties *StorageAccounts_BlobService_Properties_Spec_ARM `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &StorageAccounts_BlobService_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (service StorageAccounts_BlobService_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (service *StorageAccounts_BlobService_Spec_ARM) GetName() string { + return service.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/blobServices" +func (service *StorageAccounts_BlobService_Spec_ARM) GetType() string { + return "Microsoft.Storage/storageAccounts/blobServices" +} + +type StorageAccounts_BlobService_Properties_Spec_ARM struct { + // AutomaticSnapshotPolicyEnabled: Deprecated in favor of isVersioningEnabled property. + AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` + + // ChangeFeed: The blob service properties for change feed events. + ChangeFeed *ChangeFeed_ARM `json:"changeFeed,omitempty"` + + // ContainerDeleteRetentionPolicy: The blob service properties for container soft delete. + ContainerDeleteRetentionPolicy *DeleteRetentionPolicy_ARM `json:"containerDeleteRetentionPolicy,omitempty"` + + // Cors: Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // Blob service. + Cors *CorsRules_ARM `json:"cors,omitempty"` + + // DefaultServiceVersion: DefaultServiceVersion indicates the default version to use for requests to the Blob service if an + // incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions. + DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"` + + // DeleteRetentionPolicy: The blob service properties for blob soft delete. + DeleteRetentionPolicy *DeleteRetentionPolicy_ARM `json:"deleteRetentionPolicy,omitempty"` + + // IsVersioningEnabled: Versioning is enabled if set to true. + IsVersioningEnabled *bool `json:"isVersioningEnabled,omitempty"` + + // LastAccessTimeTrackingPolicy: The blob service property to configure last access time based tracking policy. + LastAccessTimeTrackingPolicy *LastAccessTimeTrackingPolicy_ARM `json:"lastAccessTimeTrackingPolicy,omitempty"` + + // RestorePolicy: The blob service properties for blob restore policy. + RestorePolicy *RestorePolicyProperties_ARM `json:"restorePolicy,omitempty"` +} + +// The blob service properties for change feed events. +type ChangeFeed_ARM struct { + // Enabled: Indicates whether change feed event logging is enabled for the Blob service. + Enabled *bool `json:"enabled,omitempty"` + + // RetentionInDays: Indicates the duration of changeFeed retention in days. Minimum value is 1 day and maximum value is + // 146000 days (400 years). A null value indicates an infinite retention of the change feed. + RetentionInDays *int `json:"retentionInDays,omitempty"` +} + +// Sets the CORS rules. You can include up to five CorsRule elements in the request. +type CorsRules_ARM struct { + // CorsRules: The List of CORS rules. You can include up to five CorsRule elements in the request. + CorsRules []CorsRule_ARM `json:"corsRules"` +} + +// The service properties for soft delete. +type DeleteRetentionPolicy_ARM struct { + // AllowPermanentDelete: This property when set to true allows deletion of the soft deleted blob versions and snapshots. + // This property cannot be used blob restore policy. This property only applies to blob service and does not apply to + // containers or file share. + AllowPermanentDelete *bool `json:"allowPermanentDelete,omitempty"` + + // Days: Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and + // the maximum value can be 365. + Days *int `json:"days,omitempty"` + + // Enabled: Indicates whether DeleteRetentionPolicy is enabled. + Enabled *bool `json:"enabled,omitempty"` +} + +// The blob service properties for Last access time based tracking policy. +type LastAccessTimeTrackingPolicy_ARM struct { + // BlobType: An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently + // read only + BlobType []string `json:"blobType"` + + // Enable: When set to true last access time based tracking is enabled. + Enable *bool `json:"enable,omitempty"` + + // Name: Name of the policy. The valid value is AccessTimeTracking. This field is currently read only + Name *LastAccessTimeTrackingPolicy_Name `json:"name,omitempty"` + + // TrackingGranularityInDays: The field specifies blob object tracking granularity in days, typically how often the blob + // object should be tracked.This field is currently read only with value as 1 + TrackingGranularityInDays *int `json:"trackingGranularityInDays,omitempty"` +} + +// The blob service properties for blob restore policy +type RestorePolicyProperties_ARM struct { + // Days: how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. + Days *int `json:"days,omitempty"` + + // Enabled: Blob restore is enabled if set to true. + Enabled *bool `json:"enabled,omitempty"` +} + +// Specifies a CORS rule for the Blob service. +type CorsRule_ARM struct { + // AllowedHeaders: Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin + // request. + AllowedHeaders []string `json:"allowedHeaders"` + + // AllowedMethods: Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the + // origin. + AllowedMethods []CorsRule_AllowedMethods `json:"allowedMethods"` + + // AllowedOrigins: Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" + // to allow all domains + AllowedOrigins []string `json:"allowedOrigins"` + + // ExposedHeaders: Required if CorsRule element is present. A list of response headers to expose to CORS clients. + ExposedHeaders []string `json:"exposedHeaders"` + + // MaxAgeInSeconds: Required if CorsRule element is present. The number of seconds that the client/browser should cache a + // preflight response. + MaxAgeInSeconds *int `json:"maxAgeInSeconds,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_service_spec_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_blob_service_spec_arm_types_gen_test.go new file mode 100644 index 00000000000..4f67973d2ac --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_service_spec_arm_types_gen_test.go @@ -0,0 +1,559 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_BlobService_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobService_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobService_Spec_ARM, StorageAccounts_BlobService_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobService_Spec_ARM runs a test to see if a specific instance of StorageAccounts_BlobService_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobService_Spec_ARM(subject StorageAccounts_BlobService_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobService_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobService_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_BlobService_Spec_ARMGenerator() +var storageAccounts_BlobService_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_BlobService_Spec_ARMGenerator returns a generator of StorageAccounts_BlobService_Spec_ARM instances for property testing. +// We first initialize storageAccounts_BlobService_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobService_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_BlobService_Spec_ARMGenerator != nil { + return storageAccounts_BlobService_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Spec_ARM(generators) + storageAccounts_BlobService_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Spec_ARM(generators) + storageAccounts_BlobService_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_Spec_ARM{}), generators) + + return storageAccounts_BlobService_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Spec_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Spec_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(StorageAccounts_BlobService_Properties_Spec_ARMGenerator()) +} + +func Test_StorageAccounts_BlobService_Properties_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobService_Properties_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobService_Properties_Spec_ARM, StorageAccounts_BlobService_Properties_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobService_Properties_Spec_ARM runs a test to see if a specific instance of StorageAccounts_BlobService_Properties_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobService_Properties_Spec_ARM(subject StorageAccounts_BlobService_Properties_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobService_Properties_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobService_Properties_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_BlobService_Properties_Spec_ARMGenerator() +var storageAccounts_BlobService_Properties_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_BlobService_Properties_Spec_ARMGenerator returns a generator of StorageAccounts_BlobService_Properties_Spec_ARM instances for property testing. +// We first initialize storageAccounts_BlobService_Properties_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobService_Properties_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_BlobService_Properties_Spec_ARMGenerator != nil { + return storageAccounts_BlobService_Properties_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Properties_Spec_ARM(generators) + storageAccounts_BlobService_Properties_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_Properties_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Properties_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Properties_Spec_ARM(generators) + storageAccounts_BlobService_Properties_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_Properties_Spec_ARM{}), generators) + + return storageAccounts_BlobService_Properties_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Properties_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Properties_Spec_ARM(gens map[string]gopter.Gen) { + gens["AutomaticSnapshotPolicyEnabled"] = gen.PtrOf(gen.Bool()) + gens["DefaultServiceVersion"] = gen.PtrOf(gen.AlphaString()) + gens["IsVersioningEnabled"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Properties_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Properties_Spec_ARM(gens map[string]gopter.Gen) { + gens["ChangeFeed"] = gen.PtrOf(ChangeFeed_ARMGenerator()) + gens["ContainerDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicy_ARMGenerator()) + gens["Cors"] = gen.PtrOf(CorsRules_ARMGenerator()) + gens["DeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicy_ARMGenerator()) + gens["LastAccessTimeTrackingPolicy"] = gen.PtrOf(LastAccessTimeTrackingPolicy_ARMGenerator()) + gens["RestorePolicy"] = gen.PtrOf(RestorePolicyProperties_ARMGenerator()) +} + +func Test_ChangeFeed_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ChangeFeed_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForChangeFeed_ARM, ChangeFeed_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForChangeFeed_ARM runs a test to see if a specific instance of ChangeFeed_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForChangeFeed_ARM(subject ChangeFeed_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ChangeFeed_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ChangeFeed_ARM instances for property testing - lazily instantiated by ChangeFeed_ARMGenerator() +var changeFeed_ARMGenerator gopter.Gen + +// ChangeFeed_ARMGenerator returns a generator of ChangeFeed_ARM instances for property testing. +func ChangeFeed_ARMGenerator() gopter.Gen { + if changeFeed_ARMGenerator != nil { + return changeFeed_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForChangeFeed_ARM(generators) + changeFeed_ARMGenerator = gen.Struct(reflect.TypeOf(ChangeFeed_ARM{}), generators) + + return changeFeed_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForChangeFeed_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForChangeFeed_ARM(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["RetentionInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_CorsRules_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CorsRules_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCorsRules_ARM, CorsRules_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCorsRules_ARM runs a test to see if a specific instance of CorsRules_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForCorsRules_ARM(subject CorsRules_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CorsRules_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CorsRules_ARM instances for property testing - lazily instantiated by CorsRules_ARMGenerator() +var corsRules_ARMGenerator gopter.Gen + +// CorsRules_ARMGenerator returns a generator of CorsRules_ARM instances for property testing. +func CorsRules_ARMGenerator() gopter.Gen { + if corsRules_ARMGenerator != nil { + return corsRules_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForCorsRules_ARM(generators) + corsRules_ARMGenerator = gen.Struct(reflect.TypeOf(CorsRules_ARM{}), generators) + + return corsRules_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForCorsRules_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForCorsRules_ARM(gens map[string]gopter.Gen) { + gens["CorsRules"] = gen.SliceOf(CorsRule_ARMGenerator()) +} + +func Test_DeleteRetentionPolicy_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DeleteRetentionPolicy_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDeleteRetentionPolicy_ARM, DeleteRetentionPolicy_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDeleteRetentionPolicy_ARM runs a test to see if a specific instance of DeleteRetentionPolicy_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForDeleteRetentionPolicy_ARM(subject DeleteRetentionPolicy_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DeleteRetentionPolicy_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DeleteRetentionPolicy_ARM instances for property testing - lazily instantiated by +// DeleteRetentionPolicy_ARMGenerator() +var deleteRetentionPolicy_ARMGenerator gopter.Gen + +// DeleteRetentionPolicy_ARMGenerator returns a generator of DeleteRetentionPolicy_ARM instances for property testing. +func DeleteRetentionPolicy_ARMGenerator() gopter.Gen { + if deleteRetentionPolicy_ARMGenerator != nil { + return deleteRetentionPolicy_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_ARM(generators) + deleteRetentionPolicy_ARMGenerator = gen.Struct(reflect.TypeOf(DeleteRetentionPolicy_ARM{}), generators) + + return deleteRetentionPolicy_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_ARM(gens map[string]gopter.Gen) { + gens["AllowPermanentDelete"] = gen.PtrOf(gen.Bool()) + gens["Days"] = gen.PtrOf(gen.Int()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_LastAccessTimeTrackingPolicy_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of LastAccessTimeTrackingPolicy_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForLastAccessTimeTrackingPolicy_ARM, LastAccessTimeTrackingPolicy_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForLastAccessTimeTrackingPolicy_ARM runs a test to see if a specific instance of LastAccessTimeTrackingPolicy_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForLastAccessTimeTrackingPolicy_ARM(subject LastAccessTimeTrackingPolicy_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual LastAccessTimeTrackingPolicy_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of LastAccessTimeTrackingPolicy_ARM instances for property testing - lazily instantiated by +// LastAccessTimeTrackingPolicy_ARMGenerator() +var lastAccessTimeTrackingPolicy_ARMGenerator gopter.Gen + +// LastAccessTimeTrackingPolicy_ARMGenerator returns a generator of LastAccessTimeTrackingPolicy_ARM instances for property testing. +func LastAccessTimeTrackingPolicy_ARMGenerator() gopter.Gen { + if lastAccessTimeTrackingPolicy_ARMGenerator != nil { + return lastAccessTimeTrackingPolicy_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_ARM(generators) + lastAccessTimeTrackingPolicy_ARMGenerator = gen.Struct(reflect.TypeOf(LastAccessTimeTrackingPolicy_ARM{}), generators) + + return lastAccessTimeTrackingPolicy_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_ARM(gens map[string]gopter.Gen) { + gens["BlobType"] = gen.SliceOf(gen.AlphaString()) + gens["Enable"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.OneConstOf(LastAccessTimeTrackingPolicy_Name_AccessTimeTracking)) + gens["TrackingGranularityInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_RestorePolicyProperties_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RestorePolicyProperties_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRestorePolicyProperties_ARM, RestorePolicyProperties_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRestorePolicyProperties_ARM runs a test to see if a specific instance of RestorePolicyProperties_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForRestorePolicyProperties_ARM(subject RestorePolicyProperties_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RestorePolicyProperties_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RestorePolicyProperties_ARM instances for property testing - lazily instantiated by +// RestorePolicyProperties_ARMGenerator() +var restorePolicyProperties_ARMGenerator gopter.Gen + +// RestorePolicyProperties_ARMGenerator returns a generator of RestorePolicyProperties_ARM instances for property testing. +func RestorePolicyProperties_ARMGenerator() gopter.Gen { + if restorePolicyProperties_ARMGenerator != nil { + return restorePolicyProperties_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRestorePolicyProperties_ARM(generators) + restorePolicyProperties_ARMGenerator = gen.Struct(reflect.TypeOf(RestorePolicyProperties_ARM{}), generators) + + return restorePolicyProperties_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForRestorePolicyProperties_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRestorePolicyProperties_ARM(gens map[string]gopter.Gen) { + gens["Days"] = gen.PtrOf(gen.Int()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_CorsRule_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CorsRule_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCorsRule_ARM, CorsRule_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCorsRule_ARM runs a test to see if a specific instance of CorsRule_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForCorsRule_ARM(subject CorsRule_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CorsRule_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CorsRule_ARM instances for property testing - lazily instantiated by CorsRule_ARMGenerator() +var corsRule_ARMGenerator gopter.Gen + +// CorsRule_ARMGenerator returns a generator of CorsRule_ARM instances for property testing. +func CorsRule_ARMGenerator() gopter.Gen { + if corsRule_ARMGenerator != nil { + return corsRule_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCorsRule_ARM(generators) + corsRule_ARMGenerator = gen.Struct(reflect.TypeOf(CorsRule_ARM{}), generators) + + return corsRule_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForCorsRule_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCorsRule_ARM(gens map[string]gopter.Gen) { + gens["AllowedHeaders"] = gen.SliceOf(gen.AlphaString()) + gens["AllowedMethods"] = gen.SliceOf(gen.OneConstOf( + CorsRule_AllowedMethods_CONNECT, + CorsRule_AllowedMethods_DELETE, + CorsRule_AllowedMethods_GET, + CorsRule_AllowedMethods_HEAD, + CorsRule_AllowedMethods_MERGE, + CorsRule_AllowedMethods_OPTIONS, + CorsRule_AllowedMethods_PATCH, + CorsRule_AllowedMethods_POST, + CorsRule_AllowedMethods_PUT, + CorsRule_AllowedMethods_TRACE)) + gens["AllowedOrigins"] = gen.SliceOf(gen.AlphaString()) + gens["ExposedHeaders"] = gen.SliceOf(gen.AlphaString()) + gens["MaxAgeInSeconds"] = gen.PtrOf(gen.Int()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_service_status_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_blob_service_status_arm_types_gen.go new file mode 100644 index 00000000000..f6748c299be --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_service_status_arm_types_gen.go @@ -0,0 +1,139 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +type StorageAccounts_BlobService_STATUS_ARM struct { + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Properties: The properties of a storage account’s Blob service. + Properties *StorageAccounts_BlobService_Properties_STATUS_ARM `json:"properties,omitempty"` + + // Sku: Sku name and tier. + Sku *Sku_STATUS_ARM `json:"sku,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +type StorageAccounts_BlobService_Properties_STATUS_ARM struct { + // AutomaticSnapshotPolicyEnabled: Deprecated in favor of isVersioningEnabled property. + AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` + + // ChangeFeed: The blob service properties for change feed events. + ChangeFeed *ChangeFeed_STATUS_ARM `json:"changeFeed,omitempty"` + + // ContainerDeleteRetentionPolicy: The blob service properties for container soft delete. + ContainerDeleteRetentionPolicy *DeleteRetentionPolicy_STATUS_ARM `json:"containerDeleteRetentionPolicy,omitempty"` + + // Cors: Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // Blob service. + Cors *CorsRules_STATUS_ARM `json:"cors,omitempty"` + + // DefaultServiceVersion: DefaultServiceVersion indicates the default version to use for requests to the Blob service if an + // incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions. + DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"` + + // DeleteRetentionPolicy: The blob service properties for blob soft delete. + DeleteRetentionPolicy *DeleteRetentionPolicy_STATUS_ARM `json:"deleteRetentionPolicy,omitempty"` + + // IsVersioningEnabled: Versioning is enabled if set to true. + IsVersioningEnabled *bool `json:"isVersioningEnabled,omitempty"` + + // LastAccessTimeTrackingPolicy: The blob service property to configure last access time based tracking policy. + LastAccessTimeTrackingPolicy *LastAccessTimeTrackingPolicy_STATUS_ARM `json:"lastAccessTimeTrackingPolicy,omitempty"` + + // RestorePolicy: The blob service properties for blob restore policy. + RestorePolicy *RestorePolicyProperties_STATUS_ARM `json:"restorePolicy,omitempty"` +} + +// The blob service properties for change feed events. +type ChangeFeed_STATUS_ARM struct { + // Enabled: Indicates whether change feed event logging is enabled for the Blob service. + Enabled *bool `json:"enabled,omitempty"` + + // RetentionInDays: Indicates the duration of changeFeed retention in days. Minimum value is 1 day and maximum value is + // 146000 days (400 years). A null value indicates an infinite retention of the change feed. + RetentionInDays *int `json:"retentionInDays,omitempty"` +} + +// Sets the CORS rules. You can include up to five CorsRule elements in the request. +type CorsRules_STATUS_ARM struct { + // CorsRules: The List of CORS rules. You can include up to five CorsRule elements in the request. + CorsRules []CorsRule_STATUS_ARM `json:"corsRules"` +} + +// The service properties for soft delete. +type DeleteRetentionPolicy_STATUS_ARM struct { + // AllowPermanentDelete: This property when set to true allows deletion of the soft deleted blob versions and snapshots. + // This property cannot be used blob restore policy. This property only applies to blob service and does not apply to + // containers or file share. + AllowPermanentDelete *bool `json:"allowPermanentDelete,omitempty"` + + // Days: Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and + // the maximum value can be 365. + Days *int `json:"days,omitempty"` + + // Enabled: Indicates whether DeleteRetentionPolicy is enabled. + Enabled *bool `json:"enabled,omitempty"` +} + +// The blob service properties for Last access time based tracking policy. +type LastAccessTimeTrackingPolicy_STATUS_ARM struct { + // BlobType: An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently + // read only + BlobType []string `json:"blobType"` + + // Enable: When set to true last access time based tracking is enabled. + Enable *bool `json:"enable,omitempty"` + + // Name: Name of the policy. The valid value is AccessTimeTracking. This field is currently read only + Name *LastAccessTimeTrackingPolicy_Name_STATUS `json:"name,omitempty"` + + // TrackingGranularityInDays: The field specifies blob object tracking granularity in days, typically how often the blob + // object should be tracked.This field is currently read only with value as 1 + TrackingGranularityInDays *int `json:"trackingGranularityInDays,omitempty"` +} + +// The blob service properties for blob restore policy +type RestorePolicyProperties_STATUS_ARM struct { + // Days: how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. + Days *int `json:"days,omitempty"` + + // Enabled: Blob restore is enabled if set to true. + Enabled *bool `json:"enabled,omitempty"` + + // LastEnabledTime: Deprecated in favor of minRestoreTime property. + LastEnabledTime *string `json:"lastEnabledTime,omitempty"` + + // MinRestoreTime: Returns the minimum date and time that the restore can be started. + MinRestoreTime *string `json:"minRestoreTime,omitempty"` +} + +// Specifies a CORS rule for the Blob service. +type CorsRule_STATUS_ARM struct { + // AllowedHeaders: Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin + // request. + AllowedHeaders []string `json:"allowedHeaders"` + + // AllowedMethods: Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the + // origin. + AllowedMethods []CorsRule_AllowedMethods_STATUS `json:"allowedMethods"` + + // AllowedOrigins: Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" + // to allow all domains + AllowedOrigins []string `json:"allowedOrigins"` + + // ExposedHeaders: Required if CorsRule element is present. A list of response headers to expose to CORS clients. + ExposedHeaders []string `json:"exposedHeaders"` + + // MaxAgeInSeconds: Required if CorsRule element is present. The number of seconds that the client/browser should cache a + // preflight response. + MaxAgeInSeconds *int `json:"maxAgeInSeconds,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_service_status_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_blob_service_status_arm_types_gen_test.go new file mode 100644 index 00000000000..75cc7627f4c --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_service_status_arm_types_gen_test.go @@ -0,0 +1,567 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_BlobService_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobService_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobService_STATUS_ARM, StorageAccounts_BlobService_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobService_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_BlobService_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobService_STATUS_ARM(subject StorageAccounts_BlobService_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobService_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobService_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccounts_BlobService_STATUS_ARMGenerator() +var storageAccounts_BlobService_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_BlobService_STATUS_ARMGenerator returns a generator of StorageAccounts_BlobService_STATUS_ARM instances for property testing. +// We first initialize storageAccounts_BlobService_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobService_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_BlobService_STATUS_ARMGenerator != nil { + return storageAccounts_BlobService_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_STATUS_ARM(generators) + storageAccounts_BlobService_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_STATUS_ARM(generators) + storageAccounts_BlobService_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_STATUS_ARM{}), generators) + + return storageAccounts_BlobService_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(StorageAccounts_BlobService_Properties_STATUS_ARMGenerator()) + gens["Sku"] = gen.PtrOf(Sku_STATUS_ARMGenerator()) +} + +func Test_StorageAccounts_BlobService_Properties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobService_Properties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobService_Properties_STATUS_ARM, StorageAccounts_BlobService_Properties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobService_Properties_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_BlobService_Properties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobService_Properties_STATUS_ARM(subject StorageAccounts_BlobService_Properties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobService_Properties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobService_Properties_STATUS_ARM instances for property testing - lazily instantiated +// by StorageAccounts_BlobService_Properties_STATUS_ARMGenerator() +var storageAccounts_BlobService_Properties_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_BlobService_Properties_STATUS_ARMGenerator returns a generator of StorageAccounts_BlobService_Properties_STATUS_ARM instances for property testing. +// We first initialize storageAccounts_BlobService_Properties_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobService_Properties_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_BlobService_Properties_STATUS_ARMGenerator != nil { + return storageAccounts_BlobService_Properties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Properties_STATUS_ARM(generators) + storageAccounts_BlobService_Properties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_Properties_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Properties_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Properties_STATUS_ARM(generators) + storageAccounts_BlobService_Properties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_Properties_STATUS_ARM{}), generators) + + return storageAccounts_BlobService_Properties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Properties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Properties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AutomaticSnapshotPolicyEnabled"] = gen.PtrOf(gen.Bool()) + gens["DefaultServiceVersion"] = gen.PtrOf(gen.AlphaString()) + gens["IsVersioningEnabled"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Properties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Properties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ChangeFeed"] = gen.PtrOf(ChangeFeed_STATUS_ARMGenerator()) + gens["ContainerDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicy_STATUS_ARMGenerator()) + gens["Cors"] = gen.PtrOf(CorsRules_STATUS_ARMGenerator()) + gens["DeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicy_STATUS_ARMGenerator()) + gens["LastAccessTimeTrackingPolicy"] = gen.PtrOf(LastAccessTimeTrackingPolicy_STATUS_ARMGenerator()) + gens["RestorePolicy"] = gen.PtrOf(RestorePolicyProperties_STATUS_ARMGenerator()) +} + +func Test_ChangeFeed_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ChangeFeed_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForChangeFeed_STATUS_ARM, ChangeFeed_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForChangeFeed_STATUS_ARM runs a test to see if a specific instance of ChangeFeed_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForChangeFeed_STATUS_ARM(subject ChangeFeed_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ChangeFeed_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ChangeFeed_STATUS_ARM instances for property testing - lazily instantiated by +// ChangeFeed_STATUS_ARMGenerator() +var changeFeed_STATUS_ARMGenerator gopter.Gen + +// ChangeFeed_STATUS_ARMGenerator returns a generator of ChangeFeed_STATUS_ARM instances for property testing. +func ChangeFeed_STATUS_ARMGenerator() gopter.Gen { + if changeFeed_STATUS_ARMGenerator != nil { + return changeFeed_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForChangeFeed_STATUS_ARM(generators) + changeFeed_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ChangeFeed_STATUS_ARM{}), generators) + + return changeFeed_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForChangeFeed_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForChangeFeed_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["RetentionInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_CorsRules_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CorsRules_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCorsRules_STATUS_ARM, CorsRules_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCorsRules_STATUS_ARM runs a test to see if a specific instance of CorsRules_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForCorsRules_STATUS_ARM(subject CorsRules_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CorsRules_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CorsRules_STATUS_ARM instances for property testing - lazily instantiated by +// CorsRules_STATUS_ARMGenerator() +var corsRules_STATUS_ARMGenerator gopter.Gen + +// CorsRules_STATUS_ARMGenerator returns a generator of CorsRules_STATUS_ARM instances for property testing. +func CorsRules_STATUS_ARMGenerator() gopter.Gen { + if corsRules_STATUS_ARMGenerator != nil { + return corsRules_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForCorsRules_STATUS_ARM(generators) + corsRules_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(CorsRules_STATUS_ARM{}), generators) + + return corsRules_STATUS_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForCorsRules_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForCorsRules_STATUS_ARM(gens map[string]gopter.Gen) { + gens["CorsRules"] = gen.SliceOf(CorsRule_STATUS_ARMGenerator()) +} + +func Test_DeleteRetentionPolicy_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DeleteRetentionPolicy_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDeleteRetentionPolicy_STATUS_ARM, DeleteRetentionPolicy_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDeleteRetentionPolicy_STATUS_ARM runs a test to see if a specific instance of DeleteRetentionPolicy_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForDeleteRetentionPolicy_STATUS_ARM(subject DeleteRetentionPolicy_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DeleteRetentionPolicy_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DeleteRetentionPolicy_STATUS_ARM instances for property testing - lazily instantiated by +// DeleteRetentionPolicy_STATUS_ARMGenerator() +var deleteRetentionPolicy_STATUS_ARMGenerator gopter.Gen + +// DeleteRetentionPolicy_STATUS_ARMGenerator returns a generator of DeleteRetentionPolicy_STATUS_ARM instances for property testing. +func DeleteRetentionPolicy_STATUS_ARMGenerator() gopter.Gen { + if deleteRetentionPolicy_STATUS_ARMGenerator != nil { + return deleteRetentionPolicy_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_STATUS_ARM(generators) + deleteRetentionPolicy_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(DeleteRetentionPolicy_STATUS_ARM{}), generators) + + return deleteRetentionPolicy_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AllowPermanentDelete"] = gen.PtrOf(gen.Bool()) + gens["Days"] = gen.PtrOf(gen.Int()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_LastAccessTimeTrackingPolicy_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of LastAccessTimeTrackingPolicy_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForLastAccessTimeTrackingPolicy_STATUS_ARM, LastAccessTimeTrackingPolicy_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForLastAccessTimeTrackingPolicy_STATUS_ARM runs a test to see if a specific instance of LastAccessTimeTrackingPolicy_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForLastAccessTimeTrackingPolicy_STATUS_ARM(subject LastAccessTimeTrackingPolicy_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual LastAccessTimeTrackingPolicy_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of LastAccessTimeTrackingPolicy_STATUS_ARM instances for property testing - lazily instantiated by +// LastAccessTimeTrackingPolicy_STATUS_ARMGenerator() +var lastAccessTimeTrackingPolicy_STATUS_ARMGenerator gopter.Gen + +// LastAccessTimeTrackingPolicy_STATUS_ARMGenerator returns a generator of LastAccessTimeTrackingPolicy_STATUS_ARM instances for property testing. +func LastAccessTimeTrackingPolicy_STATUS_ARMGenerator() gopter.Gen { + if lastAccessTimeTrackingPolicy_STATUS_ARMGenerator != nil { + return lastAccessTimeTrackingPolicy_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_STATUS_ARM(generators) + lastAccessTimeTrackingPolicy_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(LastAccessTimeTrackingPolicy_STATUS_ARM{}), generators) + + return lastAccessTimeTrackingPolicy_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_STATUS_ARM(gens map[string]gopter.Gen) { + gens["BlobType"] = gen.SliceOf(gen.AlphaString()) + gens["Enable"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.OneConstOf(LastAccessTimeTrackingPolicy_Name_STATUS_AccessTimeTracking)) + gens["TrackingGranularityInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_RestorePolicyProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RestorePolicyProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRestorePolicyProperties_STATUS_ARM, RestorePolicyProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRestorePolicyProperties_STATUS_ARM runs a test to see if a specific instance of RestorePolicyProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForRestorePolicyProperties_STATUS_ARM(subject RestorePolicyProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RestorePolicyProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RestorePolicyProperties_STATUS_ARM instances for property testing - lazily instantiated by +// RestorePolicyProperties_STATUS_ARMGenerator() +var restorePolicyProperties_STATUS_ARMGenerator gopter.Gen + +// RestorePolicyProperties_STATUS_ARMGenerator returns a generator of RestorePolicyProperties_STATUS_ARM instances for property testing. +func RestorePolicyProperties_STATUS_ARMGenerator() gopter.Gen { + if restorePolicyProperties_STATUS_ARMGenerator != nil { + return restorePolicyProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRestorePolicyProperties_STATUS_ARM(generators) + restorePolicyProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(RestorePolicyProperties_STATUS_ARM{}), generators) + + return restorePolicyProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForRestorePolicyProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRestorePolicyProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Days"] = gen.PtrOf(gen.Int()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["LastEnabledTime"] = gen.PtrOf(gen.AlphaString()) + gens["MinRestoreTime"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_CorsRule_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CorsRule_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCorsRule_STATUS_ARM, CorsRule_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCorsRule_STATUS_ARM runs a test to see if a specific instance of CorsRule_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForCorsRule_STATUS_ARM(subject CorsRule_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CorsRule_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CorsRule_STATUS_ARM instances for property testing - lazily instantiated by +// CorsRule_STATUS_ARMGenerator() +var corsRule_STATUS_ARMGenerator gopter.Gen + +// CorsRule_STATUS_ARMGenerator returns a generator of CorsRule_STATUS_ARM instances for property testing. +func CorsRule_STATUS_ARMGenerator() gopter.Gen { + if corsRule_STATUS_ARMGenerator != nil { + return corsRule_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCorsRule_STATUS_ARM(generators) + corsRule_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(CorsRule_STATUS_ARM{}), generators) + + return corsRule_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForCorsRule_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCorsRule_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AllowedHeaders"] = gen.SliceOf(gen.AlphaString()) + gens["AllowedMethods"] = gen.SliceOf(gen.OneConstOf( + CorsRule_AllowedMethods_STATUS_CONNECT, + CorsRule_AllowedMethods_STATUS_DELETE, + CorsRule_AllowedMethods_STATUS_GET, + CorsRule_AllowedMethods_STATUS_HEAD, + CorsRule_AllowedMethods_STATUS_MERGE, + CorsRule_AllowedMethods_STATUS_OPTIONS, + CorsRule_AllowedMethods_STATUS_PATCH, + CorsRule_AllowedMethods_STATUS_POST, + CorsRule_AllowedMethods_STATUS_PUT, + CorsRule_AllowedMethods_STATUS_TRACE)) + gens["AllowedOrigins"] = gen.SliceOf(gen.AlphaString()) + gens["ExposedHeaders"] = gen.SliceOf(gen.AlphaString()) + gens["MaxAgeInSeconds"] = gen.PtrOf(gen.Int()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_service_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_blob_service_types_gen.go new file mode 100644 index 00000000000..cf2aecd9ce8 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_service_types_gen.go @@ -0,0 +1,3174 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/blob.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default +type StorageAccountsBlobService struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_BlobService_Spec `json:"spec,omitempty"` + Status StorageAccounts_BlobService_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsBlobService{} + +// GetConditions returns the conditions of the resource +func (service *StorageAccountsBlobService) GetConditions() conditions.Conditions { + return service.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (service *StorageAccountsBlobService) SetConditions(conditions conditions.Conditions) { + service.Status.Conditions = conditions +} + +var _ conversion.Convertible = &StorageAccountsBlobService{} + +// ConvertFrom populates our StorageAccountsBlobService from the provided hub StorageAccountsBlobService +func (service *StorageAccountsBlobService) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsBlobService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsBlobService but received %T instead", hub) + } + + return service.AssignProperties_From_StorageAccountsBlobService(source) +} + +// ConvertTo populates the provided hub StorageAccountsBlobService from our StorageAccountsBlobService +func (service *StorageAccountsBlobService) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsBlobService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsBlobService but received %T instead", hub) + } + + return service.AssignProperties_To_StorageAccountsBlobService(destination) +} + +// +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20230101-storageaccountsblobservice,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsblobservices,verbs=create;update,versions=v1api20230101,name=default.v1api20230101.storageaccountsblobservices.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &StorageAccountsBlobService{} + +// Default applies defaults to the StorageAccountsBlobService resource +func (service *StorageAccountsBlobService) Default() { + service.defaultImpl() + var temp any = service + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultImpl applies the code generated defaults to the StorageAccountsBlobService resource +func (service *StorageAccountsBlobService) defaultImpl() {} + +var _ genruntime.ImportableResource = &StorageAccountsBlobService{} + +// InitializeSpec initializes the spec for this resource from the given status +func (service *StorageAccountsBlobService) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*StorageAccounts_BlobService_STATUS); ok { + return service.Spec.Initialize_From_StorageAccounts_BlobService_STATUS(s) + } + + return fmt.Errorf("expected Status of type StorageAccounts_BlobService_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &StorageAccountsBlobService{} + +// AzureName returns the Azure name of the resource (always "default") +func (service *StorageAccountsBlobService) AzureName() string { + return "default" +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (service StorageAccountsBlobService) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (service *StorageAccountsBlobService) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (service *StorageAccountsBlobService) GetSpec() genruntime.ConvertibleSpec { + return &service.Spec +} + +// GetStatus returns the status of this resource +func (service *StorageAccountsBlobService) GetStatus() genruntime.ConvertibleStatus { + return &service.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (service *StorageAccountsBlobService) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/blobServices" +func (service *StorageAccountsBlobService) GetType() string { + return "Microsoft.Storage/storageAccounts/blobServices" +} + +// NewEmptyStatus returns a new empty (blank) status +func (service *StorageAccountsBlobService) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_BlobService_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (service *StorageAccountsBlobService) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(service.Spec) + return service.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (service *StorageAccountsBlobService) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_BlobService_STATUS); ok { + service.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_BlobService_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + service.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-storage-azure-com-v1api20230101-storageaccountsblobservice,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsblobservices,verbs=create;update,versions=v1api20230101,name=validate.v1api20230101.storageaccountsblobservices.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &StorageAccountsBlobService{} + +// ValidateCreate validates the creation of the resource +func (service *StorageAccountsBlobService) ValidateCreate() (admission.Warnings, error) { + validations := service.createValidations() + var temp any = service + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (service *StorageAccountsBlobService) ValidateDelete() (admission.Warnings, error) { + validations := service.deleteValidations() + var temp any = service + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (service *StorageAccountsBlobService) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := service.updateValidations() + var temp any = service + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (service *StorageAccountsBlobService) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){service.validateResourceReferences, service.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (service *StorageAccountsBlobService) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (service *StorageAccountsBlobService) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return service.validateResourceReferences() + }, + service.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return service.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (service *StorageAccountsBlobService) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(service) +} + +// validateResourceReferences validates all resource references +func (service *StorageAccountsBlobService) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&service.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (service *StorageAccountsBlobService) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*StorageAccountsBlobService) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, service) +} + +// AssignProperties_From_StorageAccountsBlobService populates our StorageAccountsBlobService from the provided source StorageAccountsBlobService +func (service *StorageAccountsBlobService) AssignProperties_From_StorageAccountsBlobService(source *v20230101s.StorageAccountsBlobService) error { + + // ObjectMeta + service.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_BlobService_Spec + err := spec.AssignProperties_From_StorageAccounts_BlobService_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_BlobService_Spec() to populate field Spec") + } + service.Spec = spec + + // Status + var status StorageAccounts_BlobService_STATUS + err = status.AssignProperties_From_StorageAccounts_BlobService_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_BlobService_STATUS() to populate field Status") + } + service.Status = status + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsBlobService populates the provided destination StorageAccountsBlobService from our StorageAccountsBlobService +func (service *StorageAccountsBlobService) AssignProperties_To_StorageAccountsBlobService(destination *v20230101s.StorageAccountsBlobService) error { + + // ObjectMeta + destination.ObjectMeta = *service.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_BlobService_Spec + err := service.Spec.AssignProperties_To_StorageAccounts_BlobService_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_BlobService_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_BlobService_STATUS + err = service.Status.AssignProperties_To_StorageAccounts_BlobService_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_BlobService_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (service *StorageAccountsBlobService) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: service.Spec.OriginalVersion(), + Kind: "StorageAccountsBlobService", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/blob.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default +type StorageAccountsBlobServiceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsBlobService `json:"items"` +} + +type StorageAccounts_BlobService_Spec struct { + // AutomaticSnapshotPolicyEnabled: Deprecated in favor of isVersioningEnabled property. + AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` + + // ChangeFeed: The blob service properties for change feed events. + ChangeFeed *ChangeFeed `json:"changeFeed,omitempty"` + + // ContainerDeleteRetentionPolicy: The blob service properties for container soft delete. + ContainerDeleteRetentionPolicy *DeleteRetentionPolicy `json:"containerDeleteRetentionPolicy,omitempty"` + + // Cors: Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // Blob service. + Cors *CorsRules `json:"cors,omitempty"` + + // DefaultServiceVersion: DefaultServiceVersion indicates the default version to use for requests to the Blob service if an + // incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions. + DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"` + + // DeleteRetentionPolicy: The blob service properties for blob soft delete. + DeleteRetentionPolicy *DeleteRetentionPolicy `json:"deleteRetentionPolicy,omitempty"` + + // IsVersioningEnabled: Versioning is enabled if set to true. + IsVersioningEnabled *bool `json:"isVersioningEnabled,omitempty"` + + // LastAccessTimeTrackingPolicy: The blob service property to configure last access time based tracking policy. + LastAccessTimeTrackingPolicy *LastAccessTimeTrackingPolicy `json:"lastAccessTimeTrackingPolicy,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccount resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccount"` + + // RestorePolicy: The blob service properties for blob restore policy. + RestorePolicy *RestorePolicyProperties `json:"restorePolicy,omitempty"` +} + +var _ genruntime.ARMTransformer = &StorageAccounts_BlobService_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (service *StorageAccounts_BlobService_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if service == nil { + return nil, nil + } + result := &StorageAccounts_BlobService_Spec_ARM{} + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if service.AutomaticSnapshotPolicyEnabled != nil || + service.ChangeFeed != nil || + service.ContainerDeleteRetentionPolicy != nil || + service.Cors != nil || + service.DefaultServiceVersion != nil || + service.DeleteRetentionPolicy != nil || + service.IsVersioningEnabled != nil || + service.LastAccessTimeTrackingPolicy != nil || + service.RestorePolicy != nil { + result.Properties = &StorageAccounts_BlobService_Properties_Spec_ARM{} + } + if service.AutomaticSnapshotPolicyEnabled != nil { + automaticSnapshotPolicyEnabled := *service.AutomaticSnapshotPolicyEnabled + result.Properties.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled + } + if service.ChangeFeed != nil { + changeFeed_ARM, err := (*service.ChangeFeed).ConvertToARM(resolved) + if err != nil { + return nil, err + } + changeFeed := *changeFeed_ARM.(*ChangeFeed_ARM) + result.Properties.ChangeFeed = &changeFeed + } + if service.ContainerDeleteRetentionPolicy != nil { + containerDeleteRetentionPolicy_ARM, err := (*service.ContainerDeleteRetentionPolicy).ConvertToARM(resolved) + if err != nil { + return nil, err + } + containerDeleteRetentionPolicy := *containerDeleteRetentionPolicy_ARM.(*DeleteRetentionPolicy_ARM) + result.Properties.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy + } + if service.Cors != nil { + cors_ARM, err := (*service.Cors).ConvertToARM(resolved) + if err != nil { + return nil, err + } + cors := *cors_ARM.(*CorsRules_ARM) + result.Properties.Cors = &cors + } + if service.DefaultServiceVersion != nil { + defaultServiceVersion := *service.DefaultServiceVersion + result.Properties.DefaultServiceVersion = &defaultServiceVersion + } + if service.DeleteRetentionPolicy != nil { + deleteRetentionPolicy_ARM, err := (*service.DeleteRetentionPolicy).ConvertToARM(resolved) + if err != nil { + return nil, err + } + deleteRetentionPolicy := *deleteRetentionPolicy_ARM.(*DeleteRetentionPolicy_ARM) + result.Properties.DeleteRetentionPolicy = &deleteRetentionPolicy + } + if service.IsVersioningEnabled != nil { + isVersioningEnabled := *service.IsVersioningEnabled + result.Properties.IsVersioningEnabled = &isVersioningEnabled + } + if service.LastAccessTimeTrackingPolicy != nil { + lastAccessTimeTrackingPolicy_ARM, err := (*service.LastAccessTimeTrackingPolicy).ConvertToARM(resolved) + if err != nil { + return nil, err + } + lastAccessTimeTrackingPolicy := *lastAccessTimeTrackingPolicy_ARM.(*LastAccessTimeTrackingPolicy_ARM) + result.Properties.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy + } + if service.RestorePolicy != nil { + restorePolicy_ARM, err := (*service.RestorePolicy).ConvertToARM(resolved) + if err != nil { + return nil, err + } + restorePolicy := *restorePolicy_ARM.(*RestorePolicyProperties_ARM) + result.Properties.RestorePolicy = &restorePolicy + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (service *StorageAccounts_BlobService_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_BlobService_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (service *StorageAccounts_BlobService_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_BlobService_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_BlobService_Spec_ARM, got %T", armInput) + } + + // Set property "AutomaticSnapshotPolicyEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AutomaticSnapshotPolicyEnabled != nil { + automaticSnapshotPolicyEnabled := *typedInput.Properties.AutomaticSnapshotPolicyEnabled + service.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled + } + } + + // Set property "ChangeFeed": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ChangeFeed != nil { + var changeFeed1 ChangeFeed + err := changeFeed1.PopulateFromARM(owner, *typedInput.Properties.ChangeFeed) + if err != nil { + return err + } + changeFeed := changeFeed1 + service.ChangeFeed = &changeFeed + } + } + + // Set property "ContainerDeleteRetentionPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ContainerDeleteRetentionPolicy != nil { + var containerDeleteRetentionPolicy1 DeleteRetentionPolicy + err := containerDeleteRetentionPolicy1.PopulateFromARM(owner, *typedInput.Properties.ContainerDeleteRetentionPolicy) + if err != nil { + return err + } + containerDeleteRetentionPolicy := containerDeleteRetentionPolicy1 + service.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy + } + } + + // Set property "Cors": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Cors != nil { + var cors1 CorsRules + err := cors1.PopulateFromARM(owner, *typedInput.Properties.Cors) + if err != nil { + return err + } + cors := cors1 + service.Cors = &cors + } + } + + // Set property "DefaultServiceVersion": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DefaultServiceVersion != nil { + defaultServiceVersion := *typedInput.Properties.DefaultServiceVersion + service.DefaultServiceVersion = &defaultServiceVersion + } + } + + // Set property "DeleteRetentionPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DeleteRetentionPolicy != nil { + var deleteRetentionPolicy1 DeleteRetentionPolicy + err := deleteRetentionPolicy1.PopulateFromARM(owner, *typedInput.Properties.DeleteRetentionPolicy) + if err != nil { + return err + } + deleteRetentionPolicy := deleteRetentionPolicy1 + service.DeleteRetentionPolicy = &deleteRetentionPolicy + } + } + + // Set property "IsVersioningEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsVersioningEnabled != nil { + isVersioningEnabled := *typedInput.Properties.IsVersioningEnabled + service.IsVersioningEnabled = &isVersioningEnabled + } + } + + // Set property "LastAccessTimeTrackingPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LastAccessTimeTrackingPolicy != nil { + var lastAccessTimeTrackingPolicy1 LastAccessTimeTrackingPolicy + err := lastAccessTimeTrackingPolicy1.PopulateFromARM(owner, *typedInput.Properties.LastAccessTimeTrackingPolicy) + if err != nil { + return err + } + lastAccessTimeTrackingPolicy := lastAccessTimeTrackingPolicy1 + service.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy + } + } + + // Set property "Owner": + service.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "RestorePolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.RestorePolicy != nil { + var restorePolicy1 RestorePolicyProperties + err := restorePolicy1.PopulateFromARM(owner, *typedInput.Properties.RestorePolicy) + if err != nil { + return err + } + restorePolicy := restorePolicy1 + service.RestorePolicy = &restorePolicy + } + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_BlobService_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_BlobService_Spec from the provided source +func (service *StorageAccounts_BlobService_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20230101s.StorageAccounts_BlobService_Spec) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_BlobService_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_BlobService_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_BlobService_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_BlobService_Spec +func (service *StorageAccounts_BlobService_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20230101s.StorageAccounts_BlobService_Spec) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_BlobService_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_BlobService_Spec{} + err := service.AssignProperties_To_StorageAccounts_BlobService_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_BlobService_Spec populates our StorageAccounts_BlobService_Spec from the provided source StorageAccounts_BlobService_Spec +func (service *StorageAccounts_BlobService_Spec) AssignProperties_From_StorageAccounts_BlobService_Spec(source *v20230101s.StorageAccounts_BlobService_Spec) error { + + // AutomaticSnapshotPolicyEnabled + if source.AutomaticSnapshotPolicyEnabled != nil { + automaticSnapshotPolicyEnabled := *source.AutomaticSnapshotPolicyEnabled + service.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled + } else { + service.AutomaticSnapshotPolicyEnabled = nil + } + + // ChangeFeed + if source.ChangeFeed != nil { + var changeFeed ChangeFeed + err := changeFeed.AssignProperties_From_ChangeFeed(source.ChangeFeed) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ChangeFeed() to populate field ChangeFeed") + } + service.ChangeFeed = &changeFeed + } else { + service.ChangeFeed = nil + } + + // ContainerDeleteRetentionPolicy + if source.ContainerDeleteRetentionPolicy != nil { + var containerDeleteRetentionPolicy DeleteRetentionPolicy + err := containerDeleteRetentionPolicy.AssignProperties_From_DeleteRetentionPolicy(source.ContainerDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DeleteRetentionPolicy() to populate field ContainerDeleteRetentionPolicy") + } + service.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy + } else { + service.ContainerDeleteRetentionPolicy = nil + } + + // Cors + if source.Cors != nil { + var cor CorsRules + err := cor.AssignProperties_From_CorsRules(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // DefaultServiceVersion + service.DefaultServiceVersion = genruntime.ClonePointerToString(source.DefaultServiceVersion) + + // DeleteRetentionPolicy + if source.DeleteRetentionPolicy != nil { + var deleteRetentionPolicy DeleteRetentionPolicy + err := deleteRetentionPolicy.AssignProperties_From_DeleteRetentionPolicy(source.DeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DeleteRetentionPolicy() to populate field DeleteRetentionPolicy") + } + service.DeleteRetentionPolicy = &deleteRetentionPolicy + } else { + service.DeleteRetentionPolicy = nil + } + + // IsVersioningEnabled + if source.IsVersioningEnabled != nil { + isVersioningEnabled := *source.IsVersioningEnabled + service.IsVersioningEnabled = &isVersioningEnabled + } else { + service.IsVersioningEnabled = nil + } + + // LastAccessTimeTrackingPolicy + if source.LastAccessTimeTrackingPolicy != nil { + var lastAccessTimeTrackingPolicy LastAccessTimeTrackingPolicy + err := lastAccessTimeTrackingPolicy.AssignProperties_From_LastAccessTimeTrackingPolicy(source.LastAccessTimeTrackingPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_LastAccessTimeTrackingPolicy() to populate field LastAccessTimeTrackingPolicy") + } + service.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy + } else { + service.LastAccessTimeTrackingPolicy = nil + } + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + service.Owner = &owner + } else { + service.Owner = nil + } + + // RestorePolicy + if source.RestorePolicy != nil { + var restorePolicy RestorePolicyProperties + err := restorePolicy.AssignProperties_From_RestorePolicyProperties(source.RestorePolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_RestorePolicyProperties() to populate field RestorePolicy") + } + service.RestorePolicy = &restorePolicy + } else { + service.RestorePolicy = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_BlobService_Spec populates the provided destination StorageAccounts_BlobService_Spec from our StorageAccounts_BlobService_Spec +func (service *StorageAccounts_BlobService_Spec) AssignProperties_To_StorageAccounts_BlobService_Spec(destination *v20230101s.StorageAccounts_BlobService_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AutomaticSnapshotPolicyEnabled + if service.AutomaticSnapshotPolicyEnabled != nil { + automaticSnapshotPolicyEnabled := *service.AutomaticSnapshotPolicyEnabled + destination.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled + } else { + destination.AutomaticSnapshotPolicyEnabled = nil + } + + // ChangeFeed + if service.ChangeFeed != nil { + var changeFeed v20230101s.ChangeFeed + err := service.ChangeFeed.AssignProperties_To_ChangeFeed(&changeFeed) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ChangeFeed() to populate field ChangeFeed") + } + destination.ChangeFeed = &changeFeed + } else { + destination.ChangeFeed = nil + } + + // ContainerDeleteRetentionPolicy + if service.ContainerDeleteRetentionPolicy != nil { + var containerDeleteRetentionPolicy v20230101s.DeleteRetentionPolicy + err := service.ContainerDeleteRetentionPolicy.AssignProperties_To_DeleteRetentionPolicy(&containerDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DeleteRetentionPolicy() to populate field ContainerDeleteRetentionPolicy") + } + destination.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy + } else { + destination.ContainerDeleteRetentionPolicy = nil + } + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules + err := service.Cors.AssignProperties_To_CorsRules(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // DefaultServiceVersion + destination.DefaultServiceVersion = genruntime.ClonePointerToString(service.DefaultServiceVersion) + + // DeleteRetentionPolicy + if service.DeleteRetentionPolicy != nil { + var deleteRetentionPolicy v20230101s.DeleteRetentionPolicy + err := service.DeleteRetentionPolicy.AssignProperties_To_DeleteRetentionPolicy(&deleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DeleteRetentionPolicy() to populate field DeleteRetentionPolicy") + } + destination.DeleteRetentionPolicy = &deleteRetentionPolicy + } else { + destination.DeleteRetentionPolicy = nil + } + + // IsVersioningEnabled + if service.IsVersioningEnabled != nil { + isVersioningEnabled := *service.IsVersioningEnabled + destination.IsVersioningEnabled = &isVersioningEnabled + } else { + destination.IsVersioningEnabled = nil + } + + // LastAccessTimeTrackingPolicy + if service.LastAccessTimeTrackingPolicy != nil { + var lastAccessTimeTrackingPolicy v20230101s.LastAccessTimeTrackingPolicy + err := service.LastAccessTimeTrackingPolicy.AssignProperties_To_LastAccessTimeTrackingPolicy(&lastAccessTimeTrackingPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_LastAccessTimeTrackingPolicy() to populate field LastAccessTimeTrackingPolicy") + } + destination.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy + } else { + destination.LastAccessTimeTrackingPolicy = nil + } + + // OriginalVersion + destination.OriginalVersion = service.OriginalVersion() + + // Owner + if service.Owner != nil { + owner := service.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // RestorePolicy + if service.RestorePolicy != nil { + var restorePolicy v20230101s.RestorePolicyProperties + err := service.RestorePolicy.AssignProperties_To_RestorePolicyProperties(&restorePolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_RestorePolicyProperties() to populate field RestorePolicy") + } + destination.RestorePolicy = &restorePolicy + } else { + destination.RestorePolicy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_StorageAccounts_BlobService_STATUS populates our StorageAccounts_BlobService_Spec from the provided source StorageAccounts_BlobService_STATUS +func (service *StorageAccounts_BlobService_Spec) Initialize_From_StorageAccounts_BlobService_STATUS(source *StorageAccounts_BlobService_STATUS) error { + + // AutomaticSnapshotPolicyEnabled + if source.AutomaticSnapshotPolicyEnabled != nil { + automaticSnapshotPolicyEnabled := *source.AutomaticSnapshotPolicyEnabled + service.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled + } else { + service.AutomaticSnapshotPolicyEnabled = nil + } + + // ChangeFeed + if source.ChangeFeed != nil { + var changeFeed ChangeFeed + err := changeFeed.Initialize_From_ChangeFeed_STATUS(source.ChangeFeed) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ChangeFeed_STATUS() to populate field ChangeFeed") + } + service.ChangeFeed = &changeFeed + } else { + service.ChangeFeed = nil + } + + // ContainerDeleteRetentionPolicy + if source.ContainerDeleteRetentionPolicy != nil { + var containerDeleteRetentionPolicy DeleteRetentionPolicy + err := containerDeleteRetentionPolicy.Initialize_From_DeleteRetentionPolicy_STATUS(source.ContainerDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DeleteRetentionPolicy_STATUS() to populate field ContainerDeleteRetentionPolicy") + } + service.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy + } else { + service.ContainerDeleteRetentionPolicy = nil + } + + // Cors + if source.Cors != nil { + var cor CorsRules + err := cor.Initialize_From_CorsRules_STATUS(source.Cors) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_CorsRules_STATUS() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // DefaultServiceVersion + service.DefaultServiceVersion = genruntime.ClonePointerToString(source.DefaultServiceVersion) + + // DeleteRetentionPolicy + if source.DeleteRetentionPolicy != nil { + var deleteRetentionPolicy DeleteRetentionPolicy + err := deleteRetentionPolicy.Initialize_From_DeleteRetentionPolicy_STATUS(source.DeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DeleteRetentionPolicy_STATUS() to populate field DeleteRetentionPolicy") + } + service.DeleteRetentionPolicy = &deleteRetentionPolicy + } else { + service.DeleteRetentionPolicy = nil + } + + // IsVersioningEnabled + if source.IsVersioningEnabled != nil { + isVersioningEnabled := *source.IsVersioningEnabled + service.IsVersioningEnabled = &isVersioningEnabled + } else { + service.IsVersioningEnabled = nil + } + + // LastAccessTimeTrackingPolicy + if source.LastAccessTimeTrackingPolicy != nil { + var lastAccessTimeTrackingPolicy LastAccessTimeTrackingPolicy + err := lastAccessTimeTrackingPolicy.Initialize_From_LastAccessTimeTrackingPolicy_STATUS(source.LastAccessTimeTrackingPolicy) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_LastAccessTimeTrackingPolicy_STATUS() to populate field LastAccessTimeTrackingPolicy") + } + service.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy + } else { + service.LastAccessTimeTrackingPolicy = nil + } + + // RestorePolicy + if source.RestorePolicy != nil { + var restorePolicy RestorePolicyProperties + err := restorePolicy.Initialize_From_RestorePolicyProperties_STATUS(source.RestorePolicy) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_RestorePolicyProperties_STATUS() to populate field RestorePolicy") + } + service.RestorePolicy = &restorePolicy + } else { + service.RestorePolicy = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (service *StorageAccounts_BlobService_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +type StorageAccounts_BlobService_STATUS struct { + // AutomaticSnapshotPolicyEnabled: Deprecated in favor of isVersioningEnabled property. + AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` + + // ChangeFeed: The blob service properties for change feed events. + ChangeFeed *ChangeFeed_STATUS `json:"changeFeed,omitempty"` + + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // ContainerDeleteRetentionPolicy: The blob service properties for container soft delete. + ContainerDeleteRetentionPolicy *DeleteRetentionPolicy_STATUS `json:"containerDeleteRetentionPolicy,omitempty"` + + // Cors: Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // Blob service. + Cors *CorsRules_STATUS `json:"cors,omitempty"` + + // DefaultServiceVersion: DefaultServiceVersion indicates the default version to use for requests to the Blob service if an + // incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions. + DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"` + + // DeleteRetentionPolicy: The blob service properties for blob soft delete. + DeleteRetentionPolicy *DeleteRetentionPolicy_STATUS `json:"deleteRetentionPolicy,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // IsVersioningEnabled: Versioning is enabled if set to true. + IsVersioningEnabled *bool `json:"isVersioningEnabled,omitempty"` + + // LastAccessTimeTrackingPolicy: The blob service property to configure last access time based tracking policy. + LastAccessTimeTrackingPolicy *LastAccessTimeTrackingPolicy_STATUS `json:"lastAccessTimeTrackingPolicy,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // RestorePolicy: The blob service properties for blob restore policy. + RestorePolicy *RestorePolicyProperties_STATUS `json:"restorePolicy,omitempty"` + + // Sku: Sku name and tier. + Sku *Sku_STATUS `json:"sku,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_BlobService_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_BlobService_STATUS from the provided source +func (service *StorageAccounts_BlobService_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20230101s.StorageAccounts_BlobService_STATUS) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_BlobService_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_BlobService_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_BlobService_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_BlobService_STATUS +func (service *StorageAccounts_BlobService_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20230101s.StorageAccounts_BlobService_STATUS) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_BlobService_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_BlobService_STATUS{} + err := service.AssignProperties_To_StorageAccounts_BlobService_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &StorageAccounts_BlobService_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (service *StorageAccounts_BlobService_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_BlobService_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (service *StorageAccounts_BlobService_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_BlobService_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_BlobService_STATUS_ARM, got %T", armInput) + } + + // Set property "AutomaticSnapshotPolicyEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AutomaticSnapshotPolicyEnabled != nil { + automaticSnapshotPolicyEnabled := *typedInput.Properties.AutomaticSnapshotPolicyEnabled + service.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled + } + } + + // Set property "ChangeFeed": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ChangeFeed != nil { + var changeFeed1 ChangeFeed_STATUS + err := changeFeed1.PopulateFromARM(owner, *typedInput.Properties.ChangeFeed) + if err != nil { + return err + } + changeFeed := changeFeed1 + service.ChangeFeed = &changeFeed + } + } + + // no assignment for property "Conditions" + + // Set property "ContainerDeleteRetentionPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ContainerDeleteRetentionPolicy != nil { + var containerDeleteRetentionPolicy1 DeleteRetentionPolicy_STATUS + err := containerDeleteRetentionPolicy1.PopulateFromARM(owner, *typedInput.Properties.ContainerDeleteRetentionPolicy) + if err != nil { + return err + } + containerDeleteRetentionPolicy := containerDeleteRetentionPolicy1 + service.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy + } + } + + // Set property "Cors": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Cors != nil { + var cors1 CorsRules_STATUS + err := cors1.PopulateFromARM(owner, *typedInput.Properties.Cors) + if err != nil { + return err + } + cors := cors1 + service.Cors = &cors + } + } + + // Set property "DefaultServiceVersion": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DefaultServiceVersion != nil { + defaultServiceVersion := *typedInput.Properties.DefaultServiceVersion + service.DefaultServiceVersion = &defaultServiceVersion + } + } + + // Set property "DeleteRetentionPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DeleteRetentionPolicy != nil { + var deleteRetentionPolicy1 DeleteRetentionPolicy_STATUS + err := deleteRetentionPolicy1.PopulateFromARM(owner, *typedInput.Properties.DeleteRetentionPolicy) + if err != nil { + return err + } + deleteRetentionPolicy := deleteRetentionPolicy1 + service.DeleteRetentionPolicy = &deleteRetentionPolicy + } + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + service.Id = &id + } + + // Set property "IsVersioningEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsVersioningEnabled != nil { + isVersioningEnabled := *typedInput.Properties.IsVersioningEnabled + service.IsVersioningEnabled = &isVersioningEnabled + } + } + + // Set property "LastAccessTimeTrackingPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LastAccessTimeTrackingPolicy != nil { + var lastAccessTimeTrackingPolicy1 LastAccessTimeTrackingPolicy_STATUS + err := lastAccessTimeTrackingPolicy1.PopulateFromARM(owner, *typedInput.Properties.LastAccessTimeTrackingPolicy) + if err != nil { + return err + } + lastAccessTimeTrackingPolicy := lastAccessTimeTrackingPolicy1 + service.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy + } + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + service.Name = &name + } + + // Set property "RestorePolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.RestorePolicy != nil { + var restorePolicy1 RestorePolicyProperties_STATUS + err := restorePolicy1.PopulateFromARM(owner, *typedInput.Properties.RestorePolicy) + if err != nil { + return err + } + restorePolicy := restorePolicy1 + service.RestorePolicy = &restorePolicy + } + } + + // Set property "Sku": + if typedInput.Sku != nil { + var sku1 Sku_STATUS + err := sku1.PopulateFromARM(owner, *typedInput.Sku) + if err != nil { + return err + } + sku := sku1 + service.Sku = &sku + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + service.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccounts_BlobService_STATUS populates our StorageAccounts_BlobService_STATUS from the provided source StorageAccounts_BlobService_STATUS +func (service *StorageAccounts_BlobService_STATUS) AssignProperties_From_StorageAccounts_BlobService_STATUS(source *v20230101s.StorageAccounts_BlobService_STATUS) error { + + // AutomaticSnapshotPolicyEnabled + if source.AutomaticSnapshotPolicyEnabled != nil { + automaticSnapshotPolicyEnabled := *source.AutomaticSnapshotPolicyEnabled + service.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled + } else { + service.AutomaticSnapshotPolicyEnabled = nil + } + + // ChangeFeed + if source.ChangeFeed != nil { + var changeFeed ChangeFeed_STATUS + err := changeFeed.AssignProperties_From_ChangeFeed_STATUS(source.ChangeFeed) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ChangeFeed_STATUS() to populate field ChangeFeed") + } + service.ChangeFeed = &changeFeed + } else { + service.ChangeFeed = nil + } + + // Conditions + service.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // ContainerDeleteRetentionPolicy + if source.ContainerDeleteRetentionPolicy != nil { + var containerDeleteRetentionPolicy DeleteRetentionPolicy_STATUS + err := containerDeleteRetentionPolicy.AssignProperties_From_DeleteRetentionPolicy_STATUS(source.ContainerDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DeleteRetentionPolicy_STATUS() to populate field ContainerDeleteRetentionPolicy") + } + service.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy + } else { + service.ContainerDeleteRetentionPolicy = nil + } + + // Cors + if source.Cors != nil { + var cor CorsRules_STATUS + err := cor.AssignProperties_From_CorsRules_STATUS(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules_STATUS() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // DefaultServiceVersion + service.DefaultServiceVersion = genruntime.ClonePointerToString(source.DefaultServiceVersion) + + // DeleteRetentionPolicy + if source.DeleteRetentionPolicy != nil { + var deleteRetentionPolicy DeleteRetentionPolicy_STATUS + err := deleteRetentionPolicy.AssignProperties_From_DeleteRetentionPolicy_STATUS(source.DeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DeleteRetentionPolicy_STATUS() to populate field DeleteRetentionPolicy") + } + service.DeleteRetentionPolicy = &deleteRetentionPolicy + } else { + service.DeleteRetentionPolicy = nil + } + + // Id + service.Id = genruntime.ClonePointerToString(source.Id) + + // IsVersioningEnabled + if source.IsVersioningEnabled != nil { + isVersioningEnabled := *source.IsVersioningEnabled + service.IsVersioningEnabled = &isVersioningEnabled + } else { + service.IsVersioningEnabled = nil + } + + // LastAccessTimeTrackingPolicy + if source.LastAccessTimeTrackingPolicy != nil { + var lastAccessTimeTrackingPolicy LastAccessTimeTrackingPolicy_STATUS + err := lastAccessTimeTrackingPolicy.AssignProperties_From_LastAccessTimeTrackingPolicy_STATUS(source.LastAccessTimeTrackingPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_LastAccessTimeTrackingPolicy_STATUS() to populate field LastAccessTimeTrackingPolicy") + } + service.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy + } else { + service.LastAccessTimeTrackingPolicy = nil + } + + // Name + service.Name = genruntime.ClonePointerToString(source.Name) + + // RestorePolicy + if source.RestorePolicy != nil { + var restorePolicy RestorePolicyProperties_STATUS + err := restorePolicy.AssignProperties_From_RestorePolicyProperties_STATUS(source.RestorePolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_RestorePolicyProperties_STATUS() to populate field RestorePolicy") + } + service.RestorePolicy = &restorePolicy + } else { + service.RestorePolicy = nil + } + + // Sku + if source.Sku != nil { + var sku Sku_STATUS + err := sku.AssignProperties_From_Sku_STATUS(source.Sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Sku_STATUS() to populate field Sku") + } + service.Sku = &sku + } else { + service.Sku = nil + } + + // Type + service.Type = genruntime.ClonePointerToString(source.Type) + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_BlobService_STATUS populates the provided destination StorageAccounts_BlobService_STATUS from our StorageAccounts_BlobService_STATUS +func (service *StorageAccounts_BlobService_STATUS) AssignProperties_To_StorageAccounts_BlobService_STATUS(destination *v20230101s.StorageAccounts_BlobService_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AutomaticSnapshotPolicyEnabled + if service.AutomaticSnapshotPolicyEnabled != nil { + automaticSnapshotPolicyEnabled := *service.AutomaticSnapshotPolicyEnabled + destination.AutomaticSnapshotPolicyEnabled = &automaticSnapshotPolicyEnabled + } else { + destination.AutomaticSnapshotPolicyEnabled = nil + } + + // ChangeFeed + if service.ChangeFeed != nil { + var changeFeed v20230101s.ChangeFeed_STATUS + err := service.ChangeFeed.AssignProperties_To_ChangeFeed_STATUS(&changeFeed) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ChangeFeed_STATUS() to populate field ChangeFeed") + } + destination.ChangeFeed = &changeFeed + } else { + destination.ChangeFeed = nil + } + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(service.Conditions) + + // ContainerDeleteRetentionPolicy + if service.ContainerDeleteRetentionPolicy != nil { + var containerDeleteRetentionPolicy v20230101s.DeleteRetentionPolicy_STATUS + err := service.ContainerDeleteRetentionPolicy.AssignProperties_To_DeleteRetentionPolicy_STATUS(&containerDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DeleteRetentionPolicy_STATUS() to populate field ContainerDeleteRetentionPolicy") + } + destination.ContainerDeleteRetentionPolicy = &containerDeleteRetentionPolicy + } else { + destination.ContainerDeleteRetentionPolicy = nil + } + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules_STATUS + err := service.Cors.AssignProperties_To_CorsRules_STATUS(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules_STATUS() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // DefaultServiceVersion + destination.DefaultServiceVersion = genruntime.ClonePointerToString(service.DefaultServiceVersion) + + // DeleteRetentionPolicy + if service.DeleteRetentionPolicy != nil { + var deleteRetentionPolicy v20230101s.DeleteRetentionPolicy_STATUS + err := service.DeleteRetentionPolicy.AssignProperties_To_DeleteRetentionPolicy_STATUS(&deleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DeleteRetentionPolicy_STATUS() to populate field DeleteRetentionPolicy") + } + destination.DeleteRetentionPolicy = &deleteRetentionPolicy + } else { + destination.DeleteRetentionPolicy = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(service.Id) + + // IsVersioningEnabled + if service.IsVersioningEnabled != nil { + isVersioningEnabled := *service.IsVersioningEnabled + destination.IsVersioningEnabled = &isVersioningEnabled + } else { + destination.IsVersioningEnabled = nil + } + + // LastAccessTimeTrackingPolicy + if service.LastAccessTimeTrackingPolicy != nil { + var lastAccessTimeTrackingPolicy v20230101s.LastAccessTimeTrackingPolicy_STATUS + err := service.LastAccessTimeTrackingPolicy.AssignProperties_To_LastAccessTimeTrackingPolicy_STATUS(&lastAccessTimeTrackingPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_LastAccessTimeTrackingPolicy_STATUS() to populate field LastAccessTimeTrackingPolicy") + } + destination.LastAccessTimeTrackingPolicy = &lastAccessTimeTrackingPolicy + } else { + destination.LastAccessTimeTrackingPolicy = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(service.Name) + + // RestorePolicy + if service.RestorePolicy != nil { + var restorePolicy v20230101s.RestorePolicyProperties_STATUS + err := service.RestorePolicy.AssignProperties_To_RestorePolicyProperties_STATUS(&restorePolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_RestorePolicyProperties_STATUS() to populate field RestorePolicy") + } + destination.RestorePolicy = &restorePolicy + } else { + destination.RestorePolicy = nil + } + + // Sku + if service.Sku != nil { + var sku v20230101s.Sku_STATUS + err := service.Sku.AssignProperties_To_Sku_STATUS(&sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Sku_STATUS() to populate field Sku") + } + destination.Sku = &sku + } else { + destination.Sku = nil + } + + // Type + destination.Type = genruntime.ClonePointerToString(service.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The blob service properties for change feed events. +type ChangeFeed struct { + // Enabled: Indicates whether change feed event logging is enabled for the Blob service. + Enabled *bool `json:"enabled,omitempty"` + + // +kubebuilder:validation:Maximum=146000 + // +kubebuilder:validation:Minimum=1 + // RetentionInDays: Indicates the duration of changeFeed retention in days. Minimum value is 1 day and maximum value is + // 146000 days (400 years). A null value indicates an infinite retention of the change feed. + RetentionInDays *int `json:"retentionInDays,omitempty"` +} + +var _ genruntime.ARMTransformer = &ChangeFeed{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (feed *ChangeFeed) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if feed == nil { + return nil, nil + } + result := &ChangeFeed_ARM{} + + // Set property "Enabled": + if feed.Enabled != nil { + enabled := *feed.Enabled + result.Enabled = &enabled + } + + // Set property "RetentionInDays": + if feed.RetentionInDays != nil { + retentionInDays := *feed.RetentionInDays + result.RetentionInDays = &retentionInDays + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (feed *ChangeFeed) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ChangeFeed_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (feed *ChangeFeed) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ChangeFeed_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ChangeFeed_ARM, got %T", armInput) + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + feed.Enabled = &enabled + } + + // Set property "RetentionInDays": + if typedInput.RetentionInDays != nil { + retentionInDays := *typedInput.RetentionInDays + feed.RetentionInDays = &retentionInDays + } + + // No error + return nil +} + +// AssignProperties_From_ChangeFeed populates our ChangeFeed from the provided source ChangeFeed +func (feed *ChangeFeed) AssignProperties_From_ChangeFeed(source *v20230101s.ChangeFeed) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + feed.Enabled = &enabled + } else { + feed.Enabled = nil + } + + // RetentionInDays + if source.RetentionInDays != nil { + retentionInDay := *source.RetentionInDays + feed.RetentionInDays = &retentionInDay + } else { + feed.RetentionInDays = nil + } + + // No error + return nil +} + +// AssignProperties_To_ChangeFeed populates the provided destination ChangeFeed from our ChangeFeed +func (feed *ChangeFeed) AssignProperties_To_ChangeFeed(destination *v20230101s.ChangeFeed) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Enabled + if feed.Enabled != nil { + enabled := *feed.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // RetentionInDays + if feed.RetentionInDays != nil { + retentionInDay := *feed.RetentionInDays + destination.RetentionInDays = &retentionInDay + } else { + destination.RetentionInDays = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ChangeFeed_STATUS populates our ChangeFeed from the provided source ChangeFeed_STATUS +func (feed *ChangeFeed) Initialize_From_ChangeFeed_STATUS(source *ChangeFeed_STATUS) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + feed.Enabled = &enabled + } else { + feed.Enabled = nil + } + + // RetentionInDays + if source.RetentionInDays != nil { + retentionInDay := *source.RetentionInDays + feed.RetentionInDays = &retentionInDay + } else { + feed.RetentionInDays = nil + } + + // No error + return nil +} + +// The blob service properties for change feed events. +type ChangeFeed_STATUS struct { + // Enabled: Indicates whether change feed event logging is enabled for the Blob service. + Enabled *bool `json:"enabled,omitempty"` + + // RetentionInDays: Indicates the duration of changeFeed retention in days. Minimum value is 1 day and maximum value is + // 146000 days (400 years). A null value indicates an infinite retention of the change feed. + RetentionInDays *int `json:"retentionInDays,omitempty"` +} + +var _ genruntime.FromARMConverter = &ChangeFeed_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (feed *ChangeFeed_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ChangeFeed_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (feed *ChangeFeed_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ChangeFeed_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ChangeFeed_STATUS_ARM, got %T", armInput) + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + feed.Enabled = &enabled + } + + // Set property "RetentionInDays": + if typedInput.RetentionInDays != nil { + retentionInDays := *typedInput.RetentionInDays + feed.RetentionInDays = &retentionInDays + } + + // No error + return nil +} + +// AssignProperties_From_ChangeFeed_STATUS populates our ChangeFeed_STATUS from the provided source ChangeFeed_STATUS +func (feed *ChangeFeed_STATUS) AssignProperties_From_ChangeFeed_STATUS(source *v20230101s.ChangeFeed_STATUS) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + feed.Enabled = &enabled + } else { + feed.Enabled = nil + } + + // RetentionInDays + feed.RetentionInDays = genruntime.ClonePointerToInt(source.RetentionInDays) + + // No error + return nil +} + +// AssignProperties_To_ChangeFeed_STATUS populates the provided destination ChangeFeed_STATUS from our ChangeFeed_STATUS +func (feed *ChangeFeed_STATUS) AssignProperties_To_ChangeFeed_STATUS(destination *v20230101s.ChangeFeed_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Enabled + if feed.Enabled != nil { + enabled := *feed.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // RetentionInDays + destination.RetentionInDays = genruntime.ClonePointerToInt(feed.RetentionInDays) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Sets the CORS rules. You can include up to five CorsRule elements in the request. +type CorsRules struct { + // CorsRules: The List of CORS rules. You can include up to five CorsRule elements in the request. + CorsRules []CorsRule `json:"corsRules,omitempty"` +} + +var _ genruntime.ARMTransformer = &CorsRules{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (rules *CorsRules) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if rules == nil { + return nil, nil + } + result := &CorsRules_ARM{} + + // Set property "CorsRules": + for _, item := range rules.CorsRules { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.CorsRules = append(result.CorsRules, *item_ARM.(*CorsRule_ARM)) + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rules *CorsRules) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &CorsRules_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rules *CorsRules) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(CorsRules_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected CorsRules_ARM, got %T", armInput) + } + + // Set property "CorsRules": + for _, item := range typedInput.CorsRules { + var item1 CorsRule + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + rules.CorsRules = append(rules.CorsRules, item1) + } + + // No error + return nil +} + +// AssignProperties_From_CorsRules populates our CorsRules from the provided source CorsRules +func (rules *CorsRules) AssignProperties_From_CorsRules(source *v20230101s.CorsRules) error { + + // CorsRules + if source.CorsRules != nil { + corsRuleList := make([]CorsRule, len(source.CorsRules)) + for corsRuleIndex, corsRuleItem := range source.CorsRules { + // Shadow the loop variable to avoid aliasing + corsRuleItem := corsRuleItem + var corsRule CorsRule + err := corsRule.AssignProperties_From_CorsRule(&corsRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRule() to populate field CorsRules") + } + corsRuleList[corsRuleIndex] = corsRule + } + rules.CorsRules = corsRuleList + } else { + rules.CorsRules = nil + } + + // No error + return nil +} + +// AssignProperties_To_CorsRules populates the provided destination CorsRules from our CorsRules +func (rules *CorsRules) AssignProperties_To_CorsRules(destination *v20230101s.CorsRules) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // CorsRules + if rules.CorsRules != nil { + corsRuleList := make([]v20230101s.CorsRule, len(rules.CorsRules)) + for corsRuleIndex, corsRuleItem := range rules.CorsRules { + // Shadow the loop variable to avoid aliasing + corsRuleItem := corsRuleItem + var corsRule v20230101s.CorsRule + err := corsRuleItem.AssignProperties_To_CorsRule(&corsRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRule() to populate field CorsRules") + } + corsRuleList[corsRuleIndex] = corsRule + } + destination.CorsRules = corsRuleList + } else { + destination.CorsRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_CorsRules_STATUS populates our CorsRules from the provided source CorsRules_STATUS +func (rules *CorsRules) Initialize_From_CorsRules_STATUS(source *CorsRules_STATUS) error { + + // CorsRules + if source.CorsRules != nil { + corsRuleList := make([]CorsRule, len(source.CorsRules)) + for corsRuleIndex, corsRuleItem := range source.CorsRules { + // Shadow the loop variable to avoid aliasing + corsRuleItem := corsRuleItem + var corsRule CorsRule + err := corsRule.Initialize_From_CorsRule_STATUS(&corsRuleItem) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_CorsRule_STATUS() to populate field CorsRules") + } + corsRuleList[corsRuleIndex] = corsRule + } + rules.CorsRules = corsRuleList + } else { + rules.CorsRules = nil + } + + // No error + return nil +} + +// Sets the CORS rules. You can include up to five CorsRule elements in the request. +type CorsRules_STATUS struct { + // CorsRules: The List of CORS rules. You can include up to five CorsRule elements in the request. + CorsRules []CorsRule_STATUS `json:"corsRules,omitempty"` +} + +var _ genruntime.FromARMConverter = &CorsRules_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rules *CorsRules_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &CorsRules_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rules *CorsRules_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(CorsRules_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected CorsRules_STATUS_ARM, got %T", armInput) + } + + // Set property "CorsRules": + for _, item := range typedInput.CorsRules { + var item1 CorsRule_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + rules.CorsRules = append(rules.CorsRules, item1) + } + + // No error + return nil +} + +// AssignProperties_From_CorsRules_STATUS populates our CorsRules_STATUS from the provided source CorsRules_STATUS +func (rules *CorsRules_STATUS) AssignProperties_From_CorsRules_STATUS(source *v20230101s.CorsRules_STATUS) error { + + // CorsRules + if source.CorsRules != nil { + corsRuleList := make([]CorsRule_STATUS, len(source.CorsRules)) + for corsRuleIndex, corsRuleItem := range source.CorsRules { + // Shadow the loop variable to avoid aliasing + corsRuleItem := corsRuleItem + var corsRule CorsRule_STATUS + err := corsRule.AssignProperties_From_CorsRule_STATUS(&corsRuleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRule_STATUS() to populate field CorsRules") + } + corsRuleList[corsRuleIndex] = corsRule + } + rules.CorsRules = corsRuleList + } else { + rules.CorsRules = nil + } + + // No error + return nil +} + +// AssignProperties_To_CorsRules_STATUS populates the provided destination CorsRules_STATUS from our CorsRules_STATUS +func (rules *CorsRules_STATUS) AssignProperties_To_CorsRules_STATUS(destination *v20230101s.CorsRules_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // CorsRules + if rules.CorsRules != nil { + corsRuleList := make([]v20230101s.CorsRule_STATUS, len(rules.CorsRules)) + for corsRuleIndex, corsRuleItem := range rules.CorsRules { + // Shadow the loop variable to avoid aliasing + corsRuleItem := corsRuleItem + var corsRule v20230101s.CorsRule_STATUS + err := corsRuleItem.AssignProperties_To_CorsRule_STATUS(&corsRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRule_STATUS() to populate field CorsRules") + } + corsRuleList[corsRuleIndex] = corsRule + } + destination.CorsRules = corsRuleList + } else { + destination.CorsRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The service properties for soft delete. +type DeleteRetentionPolicy struct { + // AllowPermanentDelete: This property when set to true allows deletion of the soft deleted blob versions and snapshots. + // This property cannot be used blob restore policy. This property only applies to blob service and does not apply to + // containers or file share. + AllowPermanentDelete *bool `json:"allowPermanentDelete,omitempty"` + + // +kubebuilder:validation:Maximum=365 + // +kubebuilder:validation:Minimum=1 + // Days: Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and + // the maximum value can be 365. + Days *int `json:"days,omitempty"` + + // Enabled: Indicates whether DeleteRetentionPolicy is enabled. + Enabled *bool `json:"enabled,omitempty"` +} + +var _ genruntime.ARMTransformer = &DeleteRetentionPolicy{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (policy *DeleteRetentionPolicy) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if policy == nil { + return nil, nil + } + result := &DeleteRetentionPolicy_ARM{} + + // Set property "AllowPermanentDelete": + if policy.AllowPermanentDelete != nil { + allowPermanentDelete := *policy.AllowPermanentDelete + result.AllowPermanentDelete = &allowPermanentDelete + } + + // Set property "Days": + if policy.Days != nil { + days := *policy.Days + result.Days = &days + } + + // Set property "Enabled": + if policy.Enabled != nil { + enabled := *policy.Enabled + result.Enabled = &enabled + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *DeleteRetentionPolicy) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &DeleteRetentionPolicy_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *DeleteRetentionPolicy) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(DeleteRetentionPolicy_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected DeleteRetentionPolicy_ARM, got %T", armInput) + } + + // Set property "AllowPermanentDelete": + if typedInput.AllowPermanentDelete != nil { + allowPermanentDelete := *typedInput.AllowPermanentDelete + policy.AllowPermanentDelete = &allowPermanentDelete + } + + // Set property "Days": + if typedInput.Days != nil { + days := *typedInput.Days + policy.Days = &days + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + policy.Enabled = &enabled + } + + // No error + return nil +} + +// AssignProperties_From_DeleteRetentionPolicy populates our DeleteRetentionPolicy from the provided source DeleteRetentionPolicy +func (policy *DeleteRetentionPolicy) AssignProperties_From_DeleteRetentionPolicy(source *v20230101s.DeleteRetentionPolicy) error { + + // AllowPermanentDelete + if source.AllowPermanentDelete != nil { + allowPermanentDelete := *source.AllowPermanentDelete + policy.AllowPermanentDelete = &allowPermanentDelete + } else { + policy.AllowPermanentDelete = nil + } + + // Days + if source.Days != nil { + day := *source.Days + policy.Days = &day + } else { + policy.Days = nil + } + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + policy.Enabled = &enabled + } else { + policy.Enabled = nil + } + + // No error + return nil +} + +// AssignProperties_To_DeleteRetentionPolicy populates the provided destination DeleteRetentionPolicy from our DeleteRetentionPolicy +func (policy *DeleteRetentionPolicy) AssignProperties_To_DeleteRetentionPolicy(destination *v20230101s.DeleteRetentionPolicy) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AllowPermanentDelete + if policy.AllowPermanentDelete != nil { + allowPermanentDelete := *policy.AllowPermanentDelete + destination.AllowPermanentDelete = &allowPermanentDelete + } else { + destination.AllowPermanentDelete = nil + } + + // Days + if policy.Days != nil { + day := *policy.Days + destination.Days = &day + } else { + destination.Days = nil + } + + // Enabled + if policy.Enabled != nil { + enabled := *policy.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_DeleteRetentionPolicy_STATUS populates our DeleteRetentionPolicy from the provided source DeleteRetentionPolicy_STATUS +func (policy *DeleteRetentionPolicy) Initialize_From_DeleteRetentionPolicy_STATUS(source *DeleteRetentionPolicy_STATUS) error { + + // AllowPermanentDelete + if source.AllowPermanentDelete != nil { + allowPermanentDelete := *source.AllowPermanentDelete + policy.AllowPermanentDelete = &allowPermanentDelete + } else { + policy.AllowPermanentDelete = nil + } + + // Days + if source.Days != nil { + day := *source.Days + policy.Days = &day + } else { + policy.Days = nil + } + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + policy.Enabled = &enabled + } else { + policy.Enabled = nil + } + + // No error + return nil +} + +// The service properties for soft delete. +type DeleteRetentionPolicy_STATUS struct { + // AllowPermanentDelete: This property when set to true allows deletion of the soft deleted blob versions and snapshots. + // This property cannot be used blob restore policy. This property only applies to blob service and does not apply to + // containers or file share. + AllowPermanentDelete *bool `json:"allowPermanentDelete,omitempty"` + + // Days: Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and + // the maximum value can be 365. + Days *int `json:"days,omitempty"` + + // Enabled: Indicates whether DeleteRetentionPolicy is enabled. + Enabled *bool `json:"enabled,omitempty"` +} + +var _ genruntime.FromARMConverter = &DeleteRetentionPolicy_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *DeleteRetentionPolicy_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &DeleteRetentionPolicy_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *DeleteRetentionPolicy_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(DeleteRetentionPolicy_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected DeleteRetentionPolicy_STATUS_ARM, got %T", armInput) + } + + // Set property "AllowPermanentDelete": + if typedInput.AllowPermanentDelete != nil { + allowPermanentDelete := *typedInput.AllowPermanentDelete + policy.AllowPermanentDelete = &allowPermanentDelete + } + + // Set property "Days": + if typedInput.Days != nil { + days := *typedInput.Days + policy.Days = &days + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + policy.Enabled = &enabled + } + + // No error + return nil +} + +// AssignProperties_From_DeleteRetentionPolicy_STATUS populates our DeleteRetentionPolicy_STATUS from the provided source DeleteRetentionPolicy_STATUS +func (policy *DeleteRetentionPolicy_STATUS) AssignProperties_From_DeleteRetentionPolicy_STATUS(source *v20230101s.DeleteRetentionPolicy_STATUS) error { + + // AllowPermanentDelete + if source.AllowPermanentDelete != nil { + allowPermanentDelete := *source.AllowPermanentDelete + policy.AllowPermanentDelete = &allowPermanentDelete + } else { + policy.AllowPermanentDelete = nil + } + + // Days + policy.Days = genruntime.ClonePointerToInt(source.Days) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + policy.Enabled = &enabled + } else { + policy.Enabled = nil + } + + // No error + return nil +} + +// AssignProperties_To_DeleteRetentionPolicy_STATUS populates the provided destination DeleteRetentionPolicy_STATUS from our DeleteRetentionPolicy_STATUS +func (policy *DeleteRetentionPolicy_STATUS) AssignProperties_To_DeleteRetentionPolicy_STATUS(destination *v20230101s.DeleteRetentionPolicy_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AllowPermanentDelete + if policy.AllowPermanentDelete != nil { + allowPermanentDelete := *policy.AllowPermanentDelete + destination.AllowPermanentDelete = &allowPermanentDelete + } else { + destination.AllowPermanentDelete = nil + } + + // Days + destination.Days = genruntime.ClonePointerToInt(policy.Days) + + // Enabled + if policy.Enabled != nil { + enabled := *policy.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The blob service properties for Last access time based tracking policy. +type LastAccessTimeTrackingPolicy struct { + // BlobType: An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently + // read only + BlobType []string `json:"blobType,omitempty"` + + // +kubebuilder:validation:Required + // Enable: When set to true last access time based tracking is enabled. + Enable *bool `json:"enable,omitempty"` + + // Name: Name of the policy. The valid value is AccessTimeTracking. This field is currently read only + Name *LastAccessTimeTrackingPolicy_Name `json:"name,omitempty"` + + // TrackingGranularityInDays: The field specifies blob object tracking granularity in days, typically how often the blob + // object should be tracked.This field is currently read only with value as 1 + TrackingGranularityInDays *int `json:"trackingGranularityInDays,omitempty"` +} + +var _ genruntime.ARMTransformer = &LastAccessTimeTrackingPolicy{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (policy *LastAccessTimeTrackingPolicy) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if policy == nil { + return nil, nil + } + result := &LastAccessTimeTrackingPolicy_ARM{} + + // Set property "BlobType": + for _, item := range policy.BlobType { + result.BlobType = append(result.BlobType, item) + } + + // Set property "Enable": + if policy.Enable != nil { + enable := *policy.Enable + result.Enable = &enable + } + + // Set property "Name": + if policy.Name != nil { + name := *policy.Name + result.Name = &name + } + + // Set property "TrackingGranularityInDays": + if policy.TrackingGranularityInDays != nil { + trackingGranularityInDays := *policy.TrackingGranularityInDays + result.TrackingGranularityInDays = &trackingGranularityInDays + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *LastAccessTimeTrackingPolicy) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &LastAccessTimeTrackingPolicy_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *LastAccessTimeTrackingPolicy) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(LastAccessTimeTrackingPolicy_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected LastAccessTimeTrackingPolicy_ARM, got %T", armInput) + } + + // Set property "BlobType": + for _, item := range typedInput.BlobType { + policy.BlobType = append(policy.BlobType, item) + } + + // Set property "Enable": + if typedInput.Enable != nil { + enable := *typedInput.Enable + policy.Enable = &enable + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + policy.Name = &name + } + + // Set property "TrackingGranularityInDays": + if typedInput.TrackingGranularityInDays != nil { + trackingGranularityInDays := *typedInput.TrackingGranularityInDays + policy.TrackingGranularityInDays = &trackingGranularityInDays + } + + // No error + return nil +} + +// AssignProperties_From_LastAccessTimeTrackingPolicy populates our LastAccessTimeTrackingPolicy from the provided source LastAccessTimeTrackingPolicy +func (policy *LastAccessTimeTrackingPolicy) AssignProperties_From_LastAccessTimeTrackingPolicy(source *v20230101s.LastAccessTimeTrackingPolicy) error { + + // BlobType + policy.BlobType = genruntime.CloneSliceOfString(source.BlobType) + + // Enable + if source.Enable != nil { + enable := *source.Enable + policy.Enable = &enable + } else { + policy.Enable = nil + } + + // Name + if source.Name != nil { + name := LastAccessTimeTrackingPolicy_Name(*source.Name) + policy.Name = &name + } else { + policy.Name = nil + } + + // TrackingGranularityInDays + policy.TrackingGranularityInDays = genruntime.ClonePointerToInt(source.TrackingGranularityInDays) + + // No error + return nil +} + +// AssignProperties_To_LastAccessTimeTrackingPolicy populates the provided destination LastAccessTimeTrackingPolicy from our LastAccessTimeTrackingPolicy +func (policy *LastAccessTimeTrackingPolicy) AssignProperties_To_LastAccessTimeTrackingPolicy(destination *v20230101s.LastAccessTimeTrackingPolicy) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // BlobType + destination.BlobType = genruntime.CloneSliceOfString(policy.BlobType) + + // Enable + if policy.Enable != nil { + enable := *policy.Enable + destination.Enable = &enable + } else { + destination.Enable = nil + } + + // Name + if policy.Name != nil { + name := string(*policy.Name) + destination.Name = &name + } else { + destination.Name = nil + } + + // TrackingGranularityInDays + destination.TrackingGranularityInDays = genruntime.ClonePointerToInt(policy.TrackingGranularityInDays) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_LastAccessTimeTrackingPolicy_STATUS populates our LastAccessTimeTrackingPolicy from the provided source LastAccessTimeTrackingPolicy_STATUS +func (policy *LastAccessTimeTrackingPolicy) Initialize_From_LastAccessTimeTrackingPolicy_STATUS(source *LastAccessTimeTrackingPolicy_STATUS) error { + + // BlobType + policy.BlobType = genruntime.CloneSliceOfString(source.BlobType) + + // Enable + if source.Enable != nil { + enable := *source.Enable + policy.Enable = &enable + } else { + policy.Enable = nil + } + + // Name + if source.Name != nil { + name := LastAccessTimeTrackingPolicy_Name(*source.Name) + policy.Name = &name + } else { + policy.Name = nil + } + + // TrackingGranularityInDays + policy.TrackingGranularityInDays = genruntime.ClonePointerToInt(source.TrackingGranularityInDays) + + // No error + return nil +} + +// The blob service properties for Last access time based tracking policy. +type LastAccessTimeTrackingPolicy_STATUS struct { + // BlobType: An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently + // read only + BlobType []string `json:"blobType,omitempty"` + + // Enable: When set to true last access time based tracking is enabled. + Enable *bool `json:"enable,omitempty"` + + // Name: Name of the policy. The valid value is AccessTimeTracking. This field is currently read only + Name *LastAccessTimeTrackingPolicy_Name_STATUS `json:"name,omitempty"` + + // TrackingGranularityInDays: The field specifies blob object tracking granularity in days, typically how often the blob + // object should be tracked.This field is currently read only with value as 1 + TrackingGranularityInDays *int `json:"trackingGranularityInDays,omitempty"` +} + +var _ genruntime.FromARMConverter = &LastAccessTimeTrackingPolicy_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *LastAccessTimeTrackingPolicy_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &LastAccessTimeTrackingPolicy_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *LastAccessTimeTrackingPolicy_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(LastAccessTimeTrackingPolicy_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected LastAccessTimeTrackingPolicy_STATUS_ARM, got %T", armInput) + } + + // Set property "BlobType": + for _, item := range typedInput.BlobType { + policy.BlobType = append(policy.BlobType, item) + } + + // Set property "Enable": + if typedInput.Enable != nil { + enable := *typedInput.Enable + policy.Enable = &enable + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + policy.Name = &name + } + + // Set property "TrackingGranularityInDays": + if typedInput.TrackingGranularityInDays != nil { + trackingGranularityInDays := *typedInput.TrackingGranularityInDays + policy.TrackingGranularityInDays = &trackingGranularityInDays + } + + // No error + return nil +} + +// AssignProperties_From_LastAccessTimeTrackingPolicy_STATUS populates our LastAccessTimeTrackingPolicy_STATUS from the provided source LastAccessTimeTrackingPolicy_STATUS +func (policy *LastAccessTimeTrackingPolicy_STATUS) AssignProperties_From_LastAccessTimeTrackingPolicy_STATUS(source *v20230101s.LastAccessTimeTrackingPolicy_STATUS) error { + + // BlobType + policy.BlobType = genruntime.CloneSliceOfString(source.BlobType) + + // Enable + if source.Enable != nil { + enable := *source.Enable + policy.Enable = &enable + } else { + policy.Enable = nil + } + + // Name + if source.Name != nil { + name := LastAccessTimeTrackingPolicy_Name_STATUS(*source.Name) + policy.Name = &name + } else { + policy.Name = nil + } + + // TrackingGranularityInDays + policy.TrackingGranularityInDays = genruntime.ClonePointerToInt(source.TrackingGranularityInDays) + + // No error + return nil +} + +// AssignProperties_To_LastAccessTimeTrackingPolicy_STATUS populates the provided destination LastAccessTimeTrackingPolicy_STATUS from our LastAccessTimeTrackingPolicy_STATUS +func (policy *LastAccessTimeTrackingPolicy_STATUS) AssignProperties_To_LastAccessTimeTrackingPolicy_STATUS(destination *v20230101s.LastAccessTimeTrackingPolicy_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // BlobType + destination.BlobType = genruntime.CloneSliceOfString(policy.BlobType) + + // Enable + if policy.Enable != nil { + enable := *policy.Enable + destination.Enable = &enable + } else { + destination.Enable = nil + } + + // Name + if policy.Name != nil { + name := string(*policy.Name) + destination.Name = &name + } else { + destination.Name = nil + } + + // TrackingGranularityInDays + destination.TrackingGranularityInDays = genruntime.ClonePointerToInt(policy.TrackingGranularityInDays) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The blob service properties for blob restore policy +type RestorePolicyProperties struct { + // +kubebuilder:validation:Maximum=365 + // +kubebuilder:validation:Minimum=1 + // Days: how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. + Days *int `json:"days,omitempty"` + + // +kubebuilder:validation:Required + // Enabled: Blob restore is enabled if set to true. + Enabled *bool `json:"enabled,omitempty"` +} + +var _ genruntime.ARMTransformer = &RestorePolicyProperties{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (properties *RestorePolicyProperties) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if properties == nil { + return nil, nil + } + result := &RestorePolicyProperties_ARM{} + + // Set property "Days": + if properties.Days != nil { + days := *properties.Days + result.Days = &days + } + + // Set property "Enabled": + if properties.Enabled != nil { + enabled := *properties.Enabled + result.Enabled = &enabled + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *RestorePolicyProperties) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &RestorePolicyProperties_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *RestorePolicyProperties) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(RestorePolicyProperties_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected RestorePolicyProperties_ARM, got %T", armInput) + } + + // Set property "Days": + if typedInput.Days != nil { + days := *typedInput.Days + properties.Days = &days + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + properties.Enabled = &enabled + } + + // No error + return nil +} + +// AssignProperties_From_RestorePolicyProperties populates our RestorePolicyProperties from the provided source RestorePolicyProperties +func (properties *RestorePolicyProperties) AssignProperties_From_RestorePolicyProperties(source *v20230101s.RestorePolicyProperties) error { + + // Days + if source.Days != nil { + day := *source.Days + properties.Days = &day + } else { + properties.Days = nil + } + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + properties.Enabled = &enabled + } else { + properties.Enabled = nil + } + + // No error + return nil +} + +// AssignProperties_To_RestorePolicyProperties populates the provided destination RestorePolicyProperties from our RestorePolicyProperties +func (properties *RestorePolicyProperties) AssignProperties_To_RestorePolicyProperties(destination *v20230101s.RestorePolicyProperties) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Days + if properties.Days != nil { + day := *properties.Days + destination.Days = &day + } else { + destination.Days = nil + } + + // Enabled + if properties.Enabled != nil { + enabled := *properties.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_RestorePolicyProperties_STATUS populates our RestorePolicyProperties from the provided source RestorePolicyProperties_STATUS +func (properties *RestorePolicyProperties) Initialize_From_RestorePolicyProperties_STATUS(source *RestorePolicyProperties_STATUS) error { + + // Days + if source.Days != nil { + day := *source.Days + properties.Days = &day + } else { + properties.Days = nil + } + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + properties.Enabled = &enabled + } else { + properties.Enabled = nil + } + + // No error + return nil +} + +// The blob service properties for blob restore policy +type RestorePolicyProperties_STATUS struct { + // Days: how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. + Days *int `json:"days,omitempty"` + + // Enabled: Blob restore is enabled if set to true. + Enabled *bool `json:"enabled,omitempty"` + + // LastEnabledTime: Deprecated in favor of minRestoreTime property. + LastEnabledTime *string `json:"lastEnabledTime,omitempty"` + + // MinRestoreTime: Returns the minimum date and time that the restore can be started. + MinRestoreTime *string `json:"minRestoreTime,omitempty"` +} + +var _ genruntime.FromARMConverter = &RestorePolicyProperties_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *RestorePolicyProperties_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &RestorePolicyProperties_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *RestorePolicyProperties_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(RestorePolicyProperties_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected RestorePolicyProperties_STATUS_ARM, got %T", armInput) + } + + // Set property "Days": + if typedInput.Days != nil { + days := *typedInput.Days + properties.Days = &days + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + properties.Enabled = &enabled + } + + // Set property "LastEnabledTime": + if typedInput.LastEnabledTime != nil { + lastEnabledTime := *typedInput.LastEnabledTime + properties.LastEnabledTime = &lastEnabledTime + } + + // Set property "MinRestoreTime": + if typedInput.MinRestoreTime != nil { + minRestoreTime := *typedInput.MinRestoreTime + properties.MinRestoreTime = &minRestoreTime + } + + // No error + return nil +} + +// AssignProperties_From_RestorePolicyProperties_STATUS populates our RestorePolicyProperties_STATUS from the provided source RestorePolicyProperties_STATUS +func (properties *RestorePolicyProperties_STATUS) AssignProperties_From_RestorePolicyProperties_STATUS(source *v20230101s.RestorePolicyProperties_STATUS) error { + + // Days + properties.Days = genruntime.ClonePointerToInt(source.Days) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + properties.Enabled = &enabled + } else { + properties.Enabled = nil + } + + // LastEnabledTime + properties.LastEnabledTime = genruntime.ClonePointerToString(source.LastEnabledTime) + + // MinRestoreTime + properties.MinRestoreTime = genruntime.ClonePointerToString(source.MinRestoreTime) + + // No error + return nil +} + +// AssignProperties_To_RestorePolicyProperties_STATUS populates the provided destination RestorePolicyProperties_STATUS from our RestorePolicyProperties_STATUS +func (properties *RestorePolicyProperties_STATUS) AssignProperties_To_RestorePolicyProperties_STATUS(destination *v20230101s.RestorePolicyProperties_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Days + destination.Days = genruntime.ClonePointerToInt(properties.Days) + + // Enabled + if properties.Enabled != nil { + enabled := *properties.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // LastEnabledTime + destination.LastEnabledTime = genruntime.ClonePointerToString(properties.LastEnabledTime) + + // MinRestoreTime + destination.MinRestoreTime = genruntime.ClonePointerToString(properties.MinRestoreTime) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Specifies a CORS rule for the Blob service. +type CorsRule struct { + // +kubebuilder:validation:Required + // AllowedHeaders: Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin + // request. + AllowedHeaders []string `json:"allowedHeaders,omitempty"` + + // +kubebuilder:validation:Required + // AllowedMethods: Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the + // origin. + AllowedMethods []CorsRule_AllowedMethods `json:"allowedMethods,omitempty"` + + // +kubebuilder:validation:Required + // AllowedOrigins: Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" + // to allow all domains + AllowedOrigins []string `json:"allowedOrigins,omitempty"` + + // +kubebuilder:validation:Required + // ExposedHeaders: Required if CorsRule element is present. A list of response headers to expose to CORS clients. + ExposedHeaders []string `json:"exposedHeaders,omitempty"` + + // +kubebuilder:validation:Required + // MaxAgeInSeconds: Required if CorsRule element is present. The number of seconds that the client/browser should cache a + // preflight response. + MaxAgeInSeconds *int `json:"maxAgeInSeconds,omitempty"` +} + +var _ genruntime.ARMTransformer = &CorsRule{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (rule *CorsRule) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if rule == nil { + return nil, nil + } + result := &CorsRule_ARM{} + + // Set property "AllowedHeaders": + for _, item := range rule.AllowedHeaders { + result.AllowedHeaders = append(result.AllowedHeaders, item) + } + + // Set property "AllowedMethods": + for _, item := range rule.AllowedMethods { + result.AllowedMethods = append(result.AllowedMethods, item) + } + + // Set property "AllowedOrigins": + for _, item := range rule.AllowedOrigins { + result.AllowedOrigins = append(result.AllowedOrigins, item) + } + + // Set property "ExposedHeaders": + for _, item := range rule.ExposedHeaders { + result.ExposedHeaders = append(result.ExposedHeaders, item) + } + + // Set property "MaxAgeInSeconds": + if rule.MaxAgeInSeconds != nil { + maxAgeInSeconds := *rule.MaxAgeInSeconds + result.MaxAgeInSeconds = &maxAgeInSeconds + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rule *CorsRule) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &CorsRule_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rule *CorsRule) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(CorsRule_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected CorsRule_ARM, got %T", armInput) + } + + // Set property "AllowedHeaders": + for _, item := range typedInput.AllowedHeaders { + rule.AllowedHeaders = append(rule.AllowedHeaders, item) + } + + // Set property "AllowedMethods": + for _, item := range typedInput.AllowedMethods { + rule.AllowedMethods = append(rule.AllowedMethods, item) + } + + // Set property "AllowedOrigins": + for _, item := range typedInput.AllowedOrigins { + rule.AllowedOrigins = append(rule.AllowedOrigins, item) + } + + // Set property "ExposedHeaders": + for _, item := range typedInput.ExposedHeaders { + rule.ExposedHeaders = append(rule.ExposedHeaders, item) + } + + // Set property "MaxAgeInSeconds": + if typedInput.MaxAgeInSeconds != nil { + maxAgeInSeconds := *typedInput.MaxAgeInSeconds + rule.MaxAgeInSeconds = &maxAgeInSeconds + } + + // No error + return nil +} + +// AssignProperties_From_CorsRule populates our CorsRule from the provided source CorsRule +func (rule *CorsRule) AssignProperties_From_CorsRule(source *v20230101s.CorsRule) error { + + // AllowedHeaders + rule.AllowedHeaders = genruntime.CloneSliceOfString(source.AllowedHeaders) + + // AllowedMethods + if source.AllowedMethods != nil { + allowedMethodList := make([]CorsRule_AllowedMethods, len(source.AllowedMethods)) + for allowedMethodIndex, allowedMethodItem := range source.AllowedMethods { + // Shadow the loop variable to avoid aliasing + allowedMethodItem := allowedMethodItem + allowedMethodList[allowedMethodIndex] = CorsRule_AllowedMethods(allowedMethodItem) + } + rule.AllowedMethods = allowedMethodList + } else { + rule.AllowedMethods = nil + } + + // AllowedOrigins + rule.AllowedOrigins = genruntime.CloneSliceOfString(source.AllowedOrigins) + + // ExposedHeaders + rule.ExposedHeaders = genruntime.CloneSliceOfString(source.ExposedHeaders) + + // MaxAgeInSeconds + rule.MaxAgeInSeconds = genruntime.ClonePointerToInt(source.MaxAgeInSeconds) + + // No error + return nil +} + +// AssignProperties_To_CorsRule populates the provided destination CorsRule from our CorsRule +func (rule *CorsRule) AssignProperties_To_CorsRule(destination *v20230101s.CorsRule) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AllowedHeaders + destination.AllowedHeaders = genruntime.CloneSliceOfString(rule.AllowedHeaders) + + // AllowedMethods + if rule.AllowedMethods != nil { + allowedMethodList := make([]string, len(rule.AllowedMethods)) + for allowedMethodIndex, allowedMethodItem := range rule.AllowedMethods { + // Shadow the loop variable to avoid aliasing + allowedMethodItem := allowedMethodItem + allowedMethodList[allowedMethodIndex] = string(allowedMethodItem) + } + destination.AllowedMethods = allowedMethodList + } else { + destination.AllowedMethods = nil + } + + // AllowedOrigins + destination.AllowedOrigins = genruntime.CloneSliceOfString(rule.AllowedOrigins) + + // ExposedHeaders + destination.ExposedHeaders = genruntime.CloneSliceOfString(rule.ExposedHeaders) + + // MaxAgeInSeconds + destination.MaxAgeInSeconds = genruntime.ClonePointerToInt(rule.MaxAgeInSeconds) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_CorsRule_STATUS populates our CorsRule from the provided source CorsRule_STATUS +func (rule *CorsRule) Initialize_From_CorsRule_STATUS(source *CorsRule_STATUS) error { + + // AllowedHeaders + rule.AllowedHeaders = genruntime.CloneSliceOfString(source.AllowedHeaders) + + // AllowedMethods + if source.AllowedMethods != nil { + allowedMethodList := make([]CorsRule_AllowedMethods, len(source.AllowedMethods)) + for allowedMethodIndex, allowedMethodItem := range source.AllowedMethods { + // Shadow the loop variable to avoid aliasing + allowedMethodItem := allowedMethodItem + allowedMethod := CorsRule_AllowedMethods(allowedMethodItem) + allowedMethodList[allowedMethodIndex] = allowedMethod + } + rule.AllowedMethods = allowedMethodList + } else { + rule.AllowedMethods = nil + } + + // AllowedOrigins + rule.AllowedOrigins = genruntime.CloneSliceOfString(source.AllowedOrigins) + + // ExposedHeaders + rule.ExposedHeaders = genruntime.CloneSliceOfString(source.ExposedHeaders) + + // MaxAgeInSeconds + rule.MaxAgeInSeconds = genruntime.ClonePointerToInt(source.MaxAgeInSeconds) + + // No error + return nil +} + +// Specifies a CORS rule for the Blob service. +type CorsRule_STATUS struct { + // AllowedHeaders: Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin + // request. + AllowedHeaders []string `json:"allowedHeaders,omitempty"` + + // AllowedMethods: Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the + // origin. + AllowedMethods []CorsRule_AllowedMethods_STATUS `json:"allowedMethods,omitempty"` + + // AllowedOrigins: Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" + // to allow all domains + AllowedOrigins []string `json:"allowedOrigins,omitempty"` + + // ExposedHeaders: Required if CorsRule element is present. A list of response headers to expose to CORS clients. + ExposedHeaders []string `json:"exposedHeaders,omitempty"` + + // MaxAgeInSeconds: Required if CorsRule element is present. The number of seconds that the client/browser should cache a + // preflight response. + MaxAgeInSeconds *int `json:"maxAgeInSeconds,omitempty"` +} + +var _ genruntime.FromARMConverter = &CorsRule_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rule *CorsRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &CorsRule_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rule *CorsRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(CorsRule_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected CorsRule_STATUS_ARM, got %T", armInput) + } + + // Set property "AllowedHeaders": + for _, item := range typedInput.AllowedHeaders { + rule.AllowedHeaders = append(rule.AllowedHeaders, item) + } + + // Set property "AllowedMethods": + for _, item := range typedInput.AllowedMethods { + rule.AllowedMethods = append(rule.AllowedMethods, item) + } + + // Set property "AllowedOrigins": + for _, item := range typedInput.AllowedOrigins { + rule.AllowedOrigins = append(rule.AllowedOrigins, item) + } + + // Set property "ExposedHeaders": + for _, item := range typedInput.ExposedHeaders { + rule.ExposedHeaders = append(rule.ExposedHeaders, item) + } + + // Set property "MaxAgeInSeconds": + if typedInput.MaxAgeInSeconds != nil { + maxAgeInSeconds := *typedInput.MaxAgeInSeconds + rule.MaxAgeInSeconds = &maxAgeInSeconds + } + + // No error + return nil +} + +// AssignProperties_From_CorsRule_STATUS populates our CorsRule_STATUS from the provided source CorsRule_STATUS +func (rule *CorsRule_STATUS) AssignProperties_From_CorsRule_STATUS(source *v20230101s.CorsRule_STATUS) error { + + // AllowedHeaders + rule.AllowedHeaders = genruntime.CloneSliceOfString(source.AllowedHeaders) + + // AllowedMethods + if source.AllowedMethods != nil { + allowedMethodList := make([]CorsRule_AllowedMethods_STATUS, len(source.AllowedMethods)) + for allowedMethodIndex, allowedMethodItem := range source.AllowedMethods { + // Shadow the loop variable to avoid aliasing + allowedMethodItem := allowedMethodItem + allowedMethodList[allowedMethodIndex] = CorsRule_AllowedMethods_STATUS(allowedMethodItem) + } + rule.AllowedMethods = allowedMethodList + } else { + rule.AllowedMethods = nil + } + + // AllowedOrigins + rule.AllowedOrigins = genruntime.CloneSliceOfString(source.AllowedOrigins) + + // ExposedHeaders + rule.ExposedHeaders = genruntime.CloneSliceOfString(source.ExposedHeaders) + + // MaxAgeInSeconds + rule.MaxAgeInSeconds = genruntime.ClonePointerToInt(source.MaxAgeInSeconds) + + // No error + return nil +} + +// AssignProperties_To_CorsRule_STATUS populates the provided destination CorsRule_STATUS from our CorsRule_STATUS +func (rule *CorsRule_STATUS) AssignProperties_To_CorsRule_STATUS(destination *v20230101s.CorsRule_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AllowedHeaders + destination.AllowedHeaders = genruntime.CloneSliceOfString(rule.AllowedHeaders) + + // AllowedMethods + if rule.AllowedMethods != nil { + allowedMethodList := make([]string, len(rule.AllowedMethods)) + for allowedMethodIndex, allowedMethodItem := range rule.AllowedMethods { + // Shadow the loop variable to avoid aliasing + allowedMethodItem := allowedMethodItem + allowedMethodList[allowedMethodIndex] = string(allowedMethodItem) + } + destination.AllowedMethods = allowedMethodList + } else { + destination.AllowedMethods = nil + } + + // AllowedOrigins + destination.AllowedOrigins = genruntime.CloneSliceOfString(rule.AllowedOrigins) + + // ExposedHeaders + destination.ExposedHeaders = genruntime.CloneSliceOfString(rule.ExposedHeaders) + + // MaxAgeInSeconds + destination.MaxAgeInSeconds = genruntime.ClonePointerToInt(rule.MaxAgeInSeconds) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"AccessTimeTracking"} +type LastAccessTimeTrackingPolicy_Name string + +const LastAccessTimeTrackingPolicy_Name_AccessTimeTracking = LastAccessTimeTrackingPolicy_Name("AccessTimeTracking") + +type LastAccessTimeTrackingPolicy_Name_STATUS string + +const LastAccessTimeTrackingPolicy_Name_STATUS_AccessTimeTracking = LastAccessTimeTrackingPolicy_Name_STATUS("AccessTimeTracking") + +// +kubebuilder:validation:Enum={"CONNECT","DELETE","GET","HEAD","MERGE","OPTIONS","PATCH","POST","PUT","TRACE"} +type CorsRule_AllowedMethods string + +const ( + CorsRule_AllowedMethods_CONNECT = CorsRule_AllowedMethods("CONNECT") + CorsRule_AllowedMethods_DELETE = CorsRule_AllowedMethods("DELETE") + CorsRule_AllowedMethods_GET = CorsRule_AllowedMethods("GET") + CorsRule_AllowedMethods_HEAD = CorsRule_AllowedMethods("HEAD") + CorsRule_AllowedMethods_MERGE = CorsRule_AllowedMethods("MERGE") + CorsRule_AllowedMethods_OPTIONS = CorsRule_AllowedMethods("OPTIONS") + CorsRule_AllowedMethods_PATCH = CorsRule_AllowedMethods("PATCH") + CorsRule_AllowedMethods_POST = CorsRule_AllowedMethods("POST") + CorsRule_AllowedMethods_PUT = CorsRule_AllowedMethods("PUT") + CorsRule_AllowedMethods_TRACE = CorsRule_AllowedMethods("TRACE") +) + +type CorsRule_AllowedMethods_STATUS string + +const ( + CorsRule_AllowedMethods_STATUS_CONNECT = CorsRule_AllowedMethods_STATUS("CONNECT") + CorsRule_AllowedMethods_STATUS_DELETE = CorsRule_AllowedMethods_STATUS("DELETE") + CorsRule_AllowedMethods_STATUS_GET = CorsRule_AllowedMethods_STATUS("GET") + CorsRule_AllowedMethods_STATUS_HEAD = CorsRule_AllowedMethods_STATUS("HEAD") + CorsRule_AllowedMethods_STATUS_MERGE = CorsRule_AllowedMethods_STATUS("MERGE") + CorsRule_AllowedMethods_STATUS_OPTIONS = CorsRule_AllowedMethods_STATUS("OPTIONS") + CorsRule_AllowedMethods_STATUS_PATCH = CorsRule_AllowedMethods_STATUS("PATCH") + CorsRule_AllowedMethods_STATUS_POST = CorsRule_AllowedMethods_STATUS("POST") + CorsRule_AllowedMethods_STATUS_PUT = CorsRule_AllowedMethods_STATUS("PUT") + CorsRule_AllowedMethods_STATUS_TRACE = CorsRule_AllowedMethods_STATUS("TRACE") +) + +func init() { + SchemeBuilder.Register(&StorageAccountsBlobService{}, &StorageAccountsBlobServiceList{}) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_service_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_blob_service_types_gen_test.go new file mode 100644 index 00000000000..e3bfa3ea656 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_service_types_gen_test.go @@ -0,0 +1,1692 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsBlobService_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsBlobService to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsBlobService, StorageAccountsBlobServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsBlobService tests if a specific instance of StorageAccountsBlobService round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsBlobService(subject StorageAccountsBlobService) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsBlobService + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsBlobService + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsBlobService_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsBlobService to StorageAccountsBlobService via AssignProperties_To_StorageAccountsBlobService & AssignProperties_From_StorageAccountsBlobService returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsBlobService, StorageAccountsBlobServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsBlobService tests if a specific instance of StorageAccountsBlobService can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsBlobService(subject StorageAccountsBlobService) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsBlobService + err := copied.AssignProperties_To_StorageAccountsBlobService(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsBlobService + err = actual.AssignProperties_From_StorageAccountsBlobService(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsBlobService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsBlobService via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsBlobService, StorageAccountsBlobServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsBlobService runs a test to see if a specific instance of StorageAccountsBlobService round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsBlobService(subject StorageAccountsBlobService) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsBlobService + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsBlobService instances for property testing - lazily instantiated by +// StorageAccountsBlobServiceGenerator() +var storageAccountsBlobServiceGenerator gopter.Gen + +// StorageAccountsBlobServiceGenerator returns a generator of StorageAccountsBlobService instances for property testing. +func StorageAccountsBlobServiceGenerator() gopter.Gen { + if storageAccountsBlobServiceGenerator != nil { + return storageAccountsBlobServiceGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsBlobService(generators) + storageAccountsBlobServiceGenerator = gen.Struct(reflect.TypeOf(StorageAccountsBlobService{}), generators) + + return storageAccountsBlobServiceGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsBlobService is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsBlobService(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_BlobService_SpecGenerator() + gens["Status"] = StorageAccounts_BlobService_STATUSGenerator() +} + +func Test_StorageAccounts_BlobService_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_BlobService_Spec to StorageAccounts_BlobService_Spec via AssignProperties_To_StorageAccounts_BlobService_Spec & AssignProperties_From_StorageAccounts_BlobService_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_BlobService_Spec, StorageAccounts_BlobService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_BlobService_Spec tests if a specific instance of StorageAccounts_BlobService_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_BlobService_Spec(subject StorageAccounts_BlobService_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_BlobService_Spec + err := copied.AssignProperties_To_StorageAccounts_BlobService_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_BlobService_Spec + err = actual.AssignProperties_From_StorageAccounts_BlobService_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_BlobService_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobService_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobService_Spec, StorageAccounts_BlobService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobService_Spec runs a test to see if a specific instance of StorageAccounts_BlobService_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobService_Spec(subject StorageAccounts_BlobService_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobService_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobService_Spec instances for property testing - lazily instantiated by +// StorageAccounts_BlobService_SpecGenerator() +var storageAccounts_BlobService_SpecGenerator gopter.Gen + +// StorageAccounts_BlobService_SpecGenerator returns a generator of StorageAccounts_BlobService_Spec instances for property testing. +// We first initialize storageAccounts_BlobService_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobService_SpecGenerator() gopter.Gen { + if storageAccounts_BlobService_SpecGenerator != nil { + return storageAccounts_BlobService_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Spec(generators) + storageAccounts_BlobService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Spec(generators) + storageAccounts_BlobService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_Spec{}), generators) + + return storageAccounts_BlobService_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_Spec(gens map[string]gopter.Gen) { + gens["AutomaticSnapshotPolicyEnabled"] = gen.PtrOf(gen.Bool()) + gens["DefaultServiceVersion"] = gen.PtrOf(gen.AlphaString()) + gens["IsVersioningEnabled"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_Spec(gens map[string]gopter.Gen) { + gens["ChangeFeed"] = gen.PtrOf(ChangeFeedGenerator()) + gens["ContainerDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicyGenerator()) + gens["Cors"] = gen.PtrOf(CorsRulesGenerator()) + gens["DeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicyGenerator()) + gens["LastAccessTimeTrackingPolicy"] = gen.PtrOf(LastAccessTimeTrackingPolicyGenerator()) + gens["RestorePolicy"] = gen.PtrOf(RestorePolicyPropertiesGenerator()) +} + +func Test_StorageAccounts_BlobService_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_BlobService_STATUS to StorageAccounts_BlobService_STATUS via AssignProperties_To_StorageAccounts_BlobService_STATUS & AssignProperties_From_StorageAccounts_BlobService_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_BlobService_STATUS, StorageAccounts_BlobService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_BlobService_STATUS tests if a specific instance of StorageAccounts_BlobService_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_BlobService_STATUS(subject StorageAccounts_BlobService_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_BlobService_STATUS + err := copied.AssignProperties_To_StorageAccounts_BlobService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_BlobService_STATUS + err = actual.AssignProperties_From_StorageAccounts_BlobService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_BlobService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobService_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobService_STATUS, StorageAccounts_BlobService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobService_STATUS runs a test to see if a specific instance of StorageAccounts_BlobService_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobService_STATUS(subject StorageAccounts_BlobService_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobService_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobService_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_BlobService_STATUSGenerator() +var storageAccounts_BlobService_STATUSGenerator gopter.Gen + +// StorageAccounts_BlobService_STATUSGenerator returns a generator of StorageAccounts_BlobService_STATUS instances for property testing. +// We first initialize storageAccounts_BlobService_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobService_STATUSGenerator() gopter.Gen { + if storageAccounts_BlobService_STATUSGenerator != nil { + return storageAccounts_BlobService_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_STATUS(generators) + storageAccounts_BlobService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_STATUS(generators) + storageAccounts_BlobService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobService_STATUS{}), generators) + + return storageAccounts_BlobService_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobService_STATUS(gens map[string]gopter.Gen) { + gens["AutomaticSnapshotPolicyEnabled"] = gen.PtrOf(gen.Bool()) + gens["DefaultServiceVersion"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["IsVersioningEnabled"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobService_STATUS(gens map[string]gopter.Gen) { + gens["ChangeFeed"] = gen.PtrOf(ChangeFeed_STATUSGenerator()) + gens["ContainerDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicy_STATUSGenerator()) + gens["Cors"] = gen.PtrOf(CorsRules_STATUSGenerator()) + gens["DeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicy_STATUSGenerator()) + gens["LastAccessTimeTrackingPolicy"] = gen.PtrOf(LastAccessTimeTrackingPolicy_STATUSGenerator()) + gens["RestorePolicy"] = gen.PtrOf(RestorePolicyProperties_STATUSGenerator()) + gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator()) +} + +func Test_ChangeFeed_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ChangeFeed to ChangeFeed via AssignProperties_To_ChangeFeed & AssignProperties_From_ChangeFeed returns original", + prop.ForAll(RunPropertyAssignmentTestForChangeFeed, ChangeFeedGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForChangeFeed tests if a specific instance of ChangeFeed can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForChangeFeed(subject ChangeFeed) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ChangeFeed + err := copied.AssignProperties_To_ChangeFeed(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ChangeFeed + err = actual.AssignProperties_From_ChangeFeed(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ChangeFeed_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ChangeFeed via JSON returns original", + prop.ForAll(RunJSONSerializationTestForChangeFeed, ChangeFeedGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForChangeFeed runs a test to see if a specific instance of ChangeFeed round trips to JSON and back losslessly +func RunJSONSerializationTestForChangeFeed(subject ChangeFeed) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ChangeFeed + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ChangeFeed instances for property testing - lazily instantiated by ChangeFeedGenerator() +var changeFeedGenerator gopter.Gen + +// ChangeFeedGenerator returns a generator of ChangeFeed instances for property testing. +func ChangeFeedGenerator() gopter.Gen { + if changeFeedGenerator != nil { + return changeFeedGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForChangeFeed(generators) + changeFeedGenerator = gen.Struct(reflect.TypeOf(ChangeFeed{}), generators) + + return changeFeedGenerator +} + +// AddIndependentPropertyGeneratorsForChangeFeed is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForChangeFeed(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["RetentionInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_ChangeFeed_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ChangeFeed_STATUS to ChangeFeed_STATUS via AssignProperties_To_ChangeFeed_STATUS & AssignProperties_From_ChangeFeed_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForChangeFeed_STATUS, ChangeFeed_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForChangeFeed_STATUS tests if a specific instance of ChangeFeed_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForChangeFeed_STATUS(subject ChangeFeed_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ChangeFeed_STATUS + err := copied.AssignProperties_To_ChangeFeed_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ChangeFeed_STATUS + err = actual.AssignProperties_From_ChangeFeed_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ChangeFeed_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ChangeFeed_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForChangeFeed_STATUS, ChangeFeed_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForChangeFeed_STATUS runs a test to see if a specific instance of ChangeFeed_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForChangeFeed_STATUS(subject ChangeFeed_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ChangeFeed_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ChangeFeed_STATUS instances for property testing - lazily instantiated by ChangeFeed_STATUSGenerator() +var changeFeed_STATUSGenerator gopter.Gen + +// ChangeFeed_STATUSGenerator returns a generator of ChangeFeed_STATUS instances for property testing. +func ChangeFeed_STATUSGenerator() gopter.Gen { + if changeFeed_STATUSGenerator != nil { + return changeFeed_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForChangeFeed_STATUS(generators) + changeFeed_STATUSGenerator = gen.Struct(reflect.TypeOf(ChangeFeed_STATUS{}), generators) + + return changeFeed_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForChangeFeed_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForChangeFeed_STATUS(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["RetentionInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_CorsRules_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from CorsRules to CorsRules via AssignProperties_To_CorsRules & AssignProperties_From_CorsRules returns original", + prop.ForAll(RunPropertyAssignmentTestForCorsRules, CorsRulesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCorsRules tests if a specific instance of CorsRules can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCorsRules(subject CorsRules) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.CorsRules + err := copied.AssignProperties_To_CorsRules(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual CorsRules + err = actual.AssignProperties_From_CorsRules(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_CorsRules_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CorsRules via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCorsRules, CorsRulesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCorsRules runs a test to see if a specific instance of CorsRules round trips to JSON and back losslessly +func RunJSONSerializationTestForCorsRules(subject CorsRules) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CorsRules + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CorsRules instances for property testing - lazily instantiated by CorsRulesGenerator() +var corsRulesGenerator gopter.Gen + +// CorsRulesGenerator returns a generator of CorsRules instances for property testing. +func CorsRulesGenerator() gopter.Gen { + if corsRulesGenerator != nil { + return corsRulesGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForCorsRules(generators) + corsRulesGenerator = gen.Struct(reflect.TypeOf(CorsRules{}), generators) + + return corsRulesGenerator +} + +// AddRelatedPropertyGeneratorsForCorsRules is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForCorsRules(gens map[string]gopter.Gen) { + gens["CorsRules"] = gen.SliceOf(CorsRuleGenerator()) +} + +func Test_CorsRules_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from CorsRules_STATUS to CorsRules_STATUS via AssignProperties_To_CorsRules_STATUS & AssignProperties_From_CorsRules_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForCorsRules_STATUS, CorsRules_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCorsRules_STATUS tests if a specific instance of CorsRules_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCorsRules_STATUS(subject CorsRules_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.CorsRules_STATUS + err := copied.AssignProperties_To_CorsRules_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual CorsRules_STATUS + err = actual.AssignProperties_From_CorsRules_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_CorsRules_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CorsRules_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCorsRules_STATUS, CorsRules_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCorsRules_STATUS runs a test to see if a specific instance of CorsRules_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForCorsRules_STATUS(subject CorsRules_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CorsRules_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CorsRules_STATUS instances for property testing - lazily instantiated by CorsRules_STATUSGenerator() +var corsRules_STATUSGenerator gopter.Gen + +// CorsRules_STATUSGenerator returns a generator of CorsRules_STATUS instances for property testing. +func CorsRules_STATUSGenerator() gopter.Gen { + if corsRules_STATUSGenerator != nil { + return corsRules_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForCorsRules_STATUS(generators) + corsRules_STATUSGenerator = gen.Struct(reflect.TypeOf(CorsRules_STATUS{}), generators) + + return corsRules_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForCorsRules_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForCorsRules_STATUS(gens map[string]gopter.Gen) { + gens["CorsRules"] = gen.SliceOf(CorsRule_STATUSGenerator()) +} + +func Test_DeleteRetentionPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DeleteRetentionPolicy to DeleteRetentionPolicy via AssignProperties_To_DeleteRetentionPolicy & AssignProperties_From_DeleteRetentionPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForDeleteRetentionPolicy, DeleteRetentionPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDeleteRetentionPolicy tests if a specific instance of DeleteRetentionPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDeleteRetentionPolicy(subject DeleteRetentionPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.DeleteRetentionPolicy + err := copied.AssignProperties_To_DeleteRetentionPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DeleteRetentionPolicy + err = actual.AssignProperties_From_DeleteRetentionPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_DeleteRetentionPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DeleteRetentionPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDeleteRetentionPolicy, DeleteRetentionPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDeleteRetentionPolicy runs a test to see if a specific instance of DeleteRetentionPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForDeleteRetentionPolicy(subject DeleteRetentionPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DeleteRetentionPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DeleteRetentionPolicy instances for property testing - lazily instantiated by +// DeleteRetentionPolicyGenerator() +var deleteRetentionPolicyGenerator gopter.Gen + +// DeleteRetentionPolicyGenerator returns a generator of DeleteRetentionPolicy instances for property testing. +func DeleteRetentionPolicyGenerator() gopter.Gen { + if deleteRetentionPolicyGenerator != nil { + return deleteRetentionPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDeleteRetentionPolicy(generators) + deleteRetentionPolicyGenerator = gen.Struct(reflect.TypeOf(DeleteRetentionPolicy{}), generators) + + return deleteRetentionPolicyGenerator +} + +// AddIndependentPropertyGeneratorsForDeleteRetentionPolicy is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDeleteRetentionPolicy(gens map[string]gopter.Gen) { + gens["AllowPermanentDelete"] = gen.PtrOf(gen.Bool()) + gens["Days"] = gen.PtrOf(gen.Int()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_DeleteRetentionPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DeleteRetentionPolicy_STATUS to DeleteRetentionPolicy_STATUS via AssignProperties_To_DeleteRetentionPolicy_STATUS & AssignProperties_From_DeleteRetentionPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForDeleteRetentionPolicy_STATUS, DeleteRetentionPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDeleteRetentionPolicy_STATUS tests if a specific instance of DeleteRetentionPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDeleteRetentionPolicy_STATUS(subject DeleteRetentionPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.DeleteRetentionPolicy_STATUS + err := copied.AssignProperties_To_DeleteRetentionPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DeleteRetentionPolicy_STATUS + err = actual.AssignProperties_From_DeleteRetentionPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_DeleteRetentionPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DeleteRetentionPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDeleteRetentionPolicy_STATUS, DeleteRetentionPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDeleteRetentionPolicy_STATUS runs a test to see if a specific instance of DeleteRetentionPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForDeleteRetentionPolicy_STATUS(subject DeleteRetentionPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DeleteRetentionPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DeleteRetentionPolicy_STATUS instances for property testing - lazily instantiated by +// DeleteRetentionPolicy_STATUSGenerator() +var deleteRetentionPolicy_STATUSGenerator gopter.Gen + +// DeleteRetentionPolicy_STATUSGenerator returns a generator of DeleteRetentionPolicy_STATUS instances for property testing. +func DeleteRetentionPolicy_STATUSGenerator() gopter.Gen { + if deleteRetentionPolicy_STATUSGenerator != nil { + return deleteRetentionPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_STATUS(generators) + deleteRetentionPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(DeleteRetentionPolicy_STATUS{}), generators) + + return deleteRetentionPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDeleteRetentionPolicy_STATUS(gens map[string]gopter.Gen) { + gens["AllowPermanentDelete"] = gen.PtrOf(gen.Bool()) + gens["Days"] = gen.PtrOf(gen.Int()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_LastAccessTimeTrackingPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from LastAccessTimeTrackingPolicy to LastAccessTimeTrackingPolicy via AssignProperties_To_LastAccessTimeTrackingPolicy & AssignProperties_From_LastAccessTimeTrackingPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForLastAccessTimeTrackingPolicy, LastAccessTimeTrackingPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForLastAccessTimeTrackingPolicy tests if a specific instance of LastAccessTimeTrackingPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForLastAccessTimeTrackingPolicy(subject LastAccessTimeTrackingPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.LastAccessTimeTrackingPolicy + err := copied.AssignProperties_To_LastAccessTimeTrackingPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual LastAccessTimeTrackingPolicy + err = actual.AssignProperties_From_LastAccessTimeTrackingPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_LastAccessTimeTrackingPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of LastAccessTimeTrackingPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForLastAccessTimeTrackingPolicy, LastAccessTimeTrackingPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForLastAccessTimeTrackingPolicy runs a test to see if a specific instance of LastAccessTimeTrackingPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForLastAccessTimeTrackingPolicy(subject LastAccessTimeTrackingPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual LastAccessTimeTrackingPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of LastAccessTimeTrackingPolicy instances for property testing - lazily instantiated by +// LastAccessTimeTrackingPolicyGenerator() +var lastAccessTimeTrackingPolicyGenerator gopter.Gen + +// LastAccessTimeTrackingPolicyGenerator returns a generator of LastAccessTimeTrackingPolicy instances for property testing. +func LastAccessTimeTrackingPolicyGenerator() gopter.Gen { + if lastAccessTimeTrackingPolicyGenerator != nil { + return lastAccessTimeTrackingPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy(generators) + lastAccessTimeTrackingPolicyGenerator = gen.Struct(reflect.TypeOf(LastAccessTimeTrackingPolicy{}), generators) + + return lastAccessTimeTrackingPolicyGenerator +} + +// AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy(gens map[string]gopter.Gen) { + gens["BlobType"] = gen.SliceOf(gen.AlphaString()) + gens["Enable"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.OneConstOf(LastAccessTimeTrackingPolicy_Name_AccessTimeTracking)) + gens["TrackingGranularityInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_LastAccessTimeTrackingPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from LastAccessTimeTrackingPolicy_STATUS to LastAccessTimeTrackingPolicy_STATUS via AssignProperties_To_LastAccessTimeTrackingPolicy_STATUS & AssignProperties_From_LastAccessTimeTrackingPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForLastAccessTimeTrackingPolicy_STATUS, LastAccessTimeTrackingPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForLastAccessTimeTrackingPolicy_STATUS tests if a specific instance of LastAccessTimeTrackingPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForLastAccessTimeTrackingPolicy_STATUS(subject LastAccessTimeTrackingPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.LastAccessTimeTrackingPolicy_STATUS + err := copied.AssignProperties_To_LastAccessTimeTrackingPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual LastAccessTimeTrackingPolicy_STATUS + err = actual.AssignProperties_From_LastAccessTimeTrackingPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_LastAccessTimeTrackingPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of LastAccessTimeTrackingPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForLastAccessTimeTrackingPolicy_STATUS, LastAccessTimeTrackingPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForLastAccessTimeTrackingPolicy_STATUS runs a test to see if a specific instance of LastAccessTimeTrackingPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForLastAccessTimeTrackingPolicy_STATUS(subject LastAccessTimeTrackingPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual LastAccessTimeTrackingPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of LastAccessTimeTrackingPolicy_STATUS instances for property testing - lazily instantiated by +// LastAccessTimeTrackingPolicy_STATUSGenerator() +var lastAccessTimeTrackingPolicy_STATUSGenerator gopter.Gen + +// LastAccessTimeTrackingPolicy_STATUSGenerator returns a generator of LastAccessTimeTrackingPolicy_STATUS instances for property testing. +func LastAccessTimeTrackingPolicy_STATUSGenerator() gopter.Gen { + if lastAccessTimeTrackingPolicy_STATUSGenerator != nil { + return lastAccessTimeTrackingPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_STATUS(generators) + lastAccessTimeTrackingPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(LastAccessTimeTrackingPolicy_STATUS{}), generators) + + return lastAccessTimeTrackingPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForLastAccessTimeTrackingPolicy_STATUS(gens map[string]gopter.Gen) { + gens["BlobType"] = gen.SliceOf(gen.AlphaString()) + gens["Enable"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.OneConstOf(LastAccessTimeTrackingPolicy_Name_STATUS_AccessTimeTracking)) + gens["TrackingGranularityInDays"] = gen.PtrOf(gen.Int()) +} + +func Test_RestorePolicyProperties_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from RestorePolicyProperties to RestorePolicyProperties via AssignProperties_To_RestorePolicyProperties & AssignProperties_From_RestorePolicyProperties returns original", + prop.ForAll(RunPropertyAssignmentTestForRestorePolicyProperties, RestorePolicyPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForRestorePolicyProperties tests if a specific instance of RestorePolicyProperties can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForRestorePolicyProperties(subject RestorePolicyProperties) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.RestorePolicyProperties + err := copied.AssignProperties_To_RestorePolicyProperties(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual RestorePolicyProperties + err = actual.AssignProperties_From_RestorePolicyProperties(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_RestorePolicyProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RestorePolicyProperties via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRestorePolicyProperties, RestorePolicyPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRestorePolicyProperties runs a test to see if a specific instance of RestorePolicyProperties round trips to JSON and back losslessly +func RunJSONSerializationTestForRestorePolicyProperties(subject RestorePolicyProperties) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RestorePolicyProperties + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RestorePolicyProperties instances for property testing - lazily instantiated by +// RestorePolicyPropertiesGenerator() +var restorePolicyPropertiesGenerator gopter.Gen + +// RestorePolicyPropertiesGenerator returns a generator of RestorePolicyProperties instances for property testing. +func RestorePolicyPropertiesGenerator() gopter.Gen { + if restorePolicyPropertiesGenerator != nil { + return restorePolicyPropertiesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRestorePolicyProperties(generators) + restorePolicyPropertiesGenerator = gen.Struct(reflect.TypeOf(RestorePolicyProperties{}), generators) + + return restorePolicyPropertiesGenerator +} + +// AddIndependentPropertyGeneratorsForRestorePolicyProperties is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRestorePolicyProperties(gens map[string]gopter.Gen) { + gens["Days"] = gen.PtrOf(gen.Int()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_RestorePolicyProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from RestorePolicyProperties_STATUS to RestorePolicyProperties_STATUS via AssignProperties_To_RestorePolicyProperties_STATUS & AssignProperties_From_RestorePolicyProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForRestorePolicyProperties_STATUS, RestorePolicyProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForRestorePolicyProperties_STATUS tests if a specific instance of RestorePolicyProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForRestorePolicyProperties_STATUS(subject RestorePolicyProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.RestorePolicyProperties_STATUS + err := copied.AssignProperties_To_RestorePolicyProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual RestorePolicyProperties_STATUS + err = actual.AssignProperties_From_RestorePolicyProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_RestorePolicyProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RestorePolicyProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRestorePolicyProperties_STATUS, RestorePolicyProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRestorePolicyProperties_STATUS runs a test to see if a specific instance of RestorePolicyProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForRestorePolicyProperties_STATUS(subject RestorePolicyProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RestorePolicyProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RestorePolicyProperties_STATUS instances for property testing - lazily instantiated by +// RestorePolicyProperties_STATUSGenerator() +var restorePolicyProperties_STATUSGenerator gopter.Gen + +// RestorePolicyProperties_STATUSGenerator returns a generator of RestorePolicyProperties_STATUS instances for property testing. +func RestorePolicyProperties_STATUSGenerator() gopter.Gen { + if restorePolicyProperties_STATUSGenerator != nil { + return restorePolicyProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRestorePolicyProperties_STATUS(generators) + restorePolicyProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(RestorePolicyProperties_STATUS{}), generators) + + return restorePolicyProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForRestorePolicyProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRestorePolicyProperties_STATUS(gens map[string]gopter.Gen) { + gens["Days"] = gen.PtrOf(gen.Int()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["LastEnabledTime"] = gen.PtrOf(gen.AlphaString()) + gens["MinRestoreTime"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_CorsRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from CorsRule to CorsRule via AssignProperties_To_CorsRule & AssignProperties_From_CorsRule returns original", + prop.ForAll(RunPropertyAssignmentTestForCorsRule, CorsRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCorsRule tests if a specific instance of CorsRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCorsRule(subject CorsRule) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.CorsRule + err := copied.AssignProperties_To_CorsRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual CorsRule + err = actual.AssignProperties_From_CorsRule(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_CorsRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CorsRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCorsRule, CorsRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCorsRule runs a test to see if a specific instance of CorsRule round trips to JSON and back losslessly +func RunJSONSerializationTestForCorsRule(subject CorsRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CorsRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CorsRule instances for property testing - lazily instantiated by CorsRuleGenerator() +var corsRuleGenerator gopter.Gen + +// CorsRuleGenerator returns a generator of CorsRule instances for property testing. +func CorsRuleGenerator() gopter.Gen { + if corsRuleGenerator != nil { + return corsRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCorsRule(generators) + corsRuleGenerator = gen.Struct(reflect.TypeOf(CorsRule{}), generators) + + return corsRuleGenerator +} + +// AddIndependentPropertyGeneratorsForCorsRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCorsRule(gens map[string]gopter.Gen) { + gens["AllowedHeaders"] = gen.SliceOf(gen.AlphaString()) + gens["AllowedMethods"] = gen.SliceOf(gen.OneConstOf( + CorsRule_AllowedMethods_CONNECT, + CorsRule_AllowedMethods_DELETE, + CorsRule_AllowedMethods_GET, + CorsRule_AllowedMethods_HEAD, + CorsRule_AllowedMethods_MERGE, + CorsRule_AllowedMethods_OPTIONS, + CorsRule_AllowedMethods_PATCH, + CorsRule_AllowedMethods_POST, + CorsRule_AllowedMethods_PUT, + CorsRule_AllowedMethods_TRACE)) + gens["AllowedOrigins"] = gen.SliceOf(gen.AlphaString()) + gens["ExposedHeaders"] = gen.SliceOf(gen.AlphaString()) + gens["MaxAgeInSeconds"] = gen.PtrOf(gen.Int()) +} + +func Test_CorsRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from CorsRule_STATUS to CorsRule_STATUS via AssignProperties_To_CorsRule_STATUS & AssignProperties_From_CorsRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForCorsRule_STATUS, CorsRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCorsRule_STATUS tests if a specific instance of CorsRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCorsRule_STATUS(subject CorsRule_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.CorsRule_STATUS + err := copied.AssignProperties_To_CorsRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual CorsRule_STATUS + err = actual.AssignProperties_From_CorsRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_CorsRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of CorsRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCorsRule_STATUS, CorsRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCorsRule_STATUS runs a test to see if a specific instance of CorsRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForCorsRule_STATUS(subject CorsRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual CorsRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of CorsRule_STATUS instances for property testing - lazily instantiated by CorsRule_STATUSGenerator() +var corsRule_STATUSGenerator gopter.Gen + +// CorsRule_STATUSGenerator returns a generator of CorsRule_STATUS instances for property testing. +func CorsRule_STATUSGenerator() gopter.Gen { + if corsRule_STATUSGenerator != nil { + return corsRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCorsRule_STATUS(generators) + corsRule_STATUSGenerator = gen.Struct(reflect.TypeOf(CorsRule_STATUS{}), generators) + + return corsRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForCorsRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCorsRule_STATUS(gens map[string]gopter.Gen) { + gens["AllowedHeaders"] = gen.SliceOf(gen.AlphaString()) + gens["AllowedMethods"] = gen.SliceOf(gen.OneConstOf( + CorsRule_AllowedMethods_STATUS_CONNECT, + CorsRule_AllowedMethods_STATUS_DELETE, + CorsRule_AllowedMethods_STATUS_GET, + CorsRule_AllowedMethods_STATUS_HEAD, + CorsRule_AllowedMethods_STATUS_MERGE, + CorsRule_AllowedMethods_STATUS_OPTIONS, + CorsRule_AllowedMethods_STATUS_PATCH, + CorsRule_AllowedMethods_STATUS_POST, + CorsRule_AllowedMethods_STATUS_PUT, + CorsRule_AllowedMethods_STATUS_TRACE)) + gens["AllowedOrigins"] = gen.SliceOf(gen.AlphaString()) + gens["ExposedHeaders"] = gen.SliceOf(gen.AlphaString()) + gens["MaxAgeInSeconds"] = gen.PtrOf(gen.Int()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_spec_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_spec_arm_types_gen.go new file mode 100644 index 00000000000..488d0f3bb97 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_spec_arm_types_gen.go @@ -0,0 +1,61 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type StorageAccounts_BlobServices_Container_Spec_ARM struct { + Name string `json:"name,omitempty"` + + // Properties: Properties of the blob container. + Properties *ContainerProperties_ARM `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &StorageAccounts_BlobServices_Container_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (container StorageAccounts_BlobServices_Container_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (container *StorageAccounts_BlobServices_Container_Spec_ARM) GetName() string { + return container.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/blobServices/containers" +func (container *StorageAccounts_BlobServices_Container_Spec_ARM) GetType() string { + return "Microsoft.Storage/storageAccounts/blobServices/containers" +} + +// The properties of a container. +type ContainerProperties_ARM struct { + // DefaultEncryptionScope: Default the container to use specified encryption scope for all writes. + DefaultEncryptionScope *string `json:"defaultEncryptionScope,omitempty"` + + // DenyEncryptionScopeOverride: Block override of encryption scope from the container default. + DenyEncryptionScopeOverride *bool `json:"denyEncryptionScopeOverride,omitempty"` + + // EnableNfsV3AllSquash: Enable NFSv3 all squash on blob container. + EnableNfsV3AllSquash *bool `json:"enableNfsV3AllSquash,omitempty"` + + // EnableNfsV3RootSquash: Enable NFSv3 root squash on blob container. + EnableNfsV3RootSquash *bool `json:"enableNfsV3RootSquash,omitempty"` + + // ImmutableStorageWithVersioning: The object level immutability property of the container. The property is immutable and + // can only be set to true at the container creation time. Existing containers must undergo a migration process. + ImmutableStorageWithVersioning *ImmutableStorageWithVersioning_ARM `json:"immutableStorageWithVersioning,omitempty"` + + // Metadata: A name-value pair to associate with the container as metadata. + Metadata map[string]string `json:"metadata"` + + // PublicAccess: Specifies whether data in the container may be accessed publicly and the level of access. + PublicAccess *ContainerProperties_PublicAccess `json:"publicAccess,omitempty"` +} + +// Object level immutability properties of the container. +type ImmutableStorageWithVersioning_ARM struct { + // Enabled: This is an immutable property, when set to true it enables object level immutability at the container level. + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_spec_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_spec_arm_types_gen_test.go new file mode 100644 index 00000000000..543eb4c9b30 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_spec_arm_types_gen_test.go @@ -0,0 +1,234 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_BlobServices_Container_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobServices_Container_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobServices_Container_Spec_ARM, StorageAccounts_BlobServices_Container_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobServices_Container_Spec_ARM runs a test to see if a specific instance of StorageAccounts_BlobServices_Container_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobServices_Container_Spec_ARM(subject StorageAccounts_BlobServices_Container_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobServices_Container_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobServices_Container_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_BlobServices_Container_Spec_ARMGenerator() +var storageAccounts_BlobServices_Container_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_BlobServices_Container_Spec_ARMGenerator returns a generator of StorageAccounts_BlobServices_Container_Spec_ARM instances for property testing. +// We first initialize storageAccounts_BlobServices_Container_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobServices_Container_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_BlobServices_Container_Spec_ARMGenerator != nil { + return storageAccounts_BlobServices_Container_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec_ARM(generators) + storageAccounts_BlobServices_Container_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobServices_Container_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec_ARM(generators) + storageAccounts_BlobServices_Container_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobServices_Container_Spec_ARM{}), generators) + + return storageAccounts_BlobServices_Container_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(ContainerProperties_ARMGenerator()) +} + +func Test_ContainerProperties_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ContainerProperties_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForContainerProperties_ARM, ContainerProperties_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForContainerProperties_ARM runs a test to see if a specific instance of ContainerProperties_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForContainerProperties_ARM(subject ContainerProperties_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ContainerProperties_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ContainerProperties_ARM instances for property testing - lazily instantiated by +// ContainerProperties_ARMGenerator() +var containerProperties_ARMGenerator gopter.Gen + +// ContainerProperties_ARMGenerator returns a generator of ContainerProperties_ARM instances for property testing. +// We first initialize containerProperties_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ContainerProperties_ARMGenerator() gopter.Gen { + if containerProperties_ARMGenerator != nil { + return containerProperties_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForContainerProperties_ARM(generators) + containerProperties_ARMGenerator = gen.Struct(reflect.TypeOf(ContainerProperties_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForContainerProperties_ARM(generators) + AddRelatedPropertyGeneratorsForContainerProperties_ARM(generators) + containerProperties_ARMGenerator = gen.Struct(reflect.TypeOf(ContainerProperties_ARM{}), generators) + + return containerProperties_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForContainerProperties_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForContainerProperties_ARM(gens map[string]gopter.Gen) { + gens["DefaultEncryptionScope"] = gen.PtrOf(gen.AlphaString()) + gens["DenyEncryptionScopeOverride"] = gen.PtrOf(gen.Bool()) + gens["EnableNfsV3AllSquash"] = gen.PtrOf(gen.Bool()) + gens["EnableNfsV3RootSquash"] = gen.PtrOf(gen.Bool()) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["PublicAccess"] = gen.PtrOf(gen.OneConstOf(ContainerProperties_PublicAccess_Blob, ContainerProperties_PublicAccess_Container, ContainerProperties_PublicAccess_None)) +} + +// AddRelatedPropertyGeneratorsForContainerProperties_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForContainerProperties_ARM(gens map[string]gopter.Gen) { + gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageWithVersioning_ARMGenerator()) +} + +func Test_ImmutableStorageWithVersioning_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutableStorageWithVersioning_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutableStorageWithVersioning_ARM, ImmutableStorageWithVersioning_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutableStorageWithVersioning_ARM runs a test to see if a specific instance of ImmutableStorageWithVersioning_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutableStorageWithVersioning_ARM(subject ImmutableStorageWithVersioning_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutableStorageWithVersioning_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutableStorageWithVersioning_ARM instances for property testing - lazily instantiated by +// ImmutableStorageWithVersioning_ARMGenerator() +var immutableStorageWithVersioning_ARMGenerator gopter.Gen + +// ImmutableStorageWithVersioning_ARMGenerator returns a generator of ImmutableStorageWithVersioning_ARM instances for property testing. +func ImmutableStorageWithVersioning_ARMGenerator() gopter.Gen { + if immutableStorageWithVersioning_ARMGenerator != nil { + return immutableStorageWithVersioning_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_ARM(generators) + immutableStorageWithVersioning_ARMGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageWithVersioning_ARM{}), generators) + + return immutableStorageWithVersioning_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_ARM(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_status_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_status_arm_types_gen.go new file mode 100644 index 00000000000..fd13139af37 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_status_arm_types_gen.go @@ -0,0 +1,212 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +type StorageAccounts_BlobServices_Container_STATUS_ARM struct { + // Etag: Resource Etag. + Etag *string `json:"etag,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Properties: Properties of the blob container. + Properties *ContainerProperties_STATUS_ARM `json:"properties,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// The properties of a container. +type ContainerProperties_STATUS_ARM struct { + // DefaultEncryptionScope: Default the container to use specified encryption scope for all writes. + DefaultEncryptionScope *string `json:"defaultEncryptionScope,omitempty"` + + // Deleted: Indicates whether the blob container was deleted. + Deleted *bool `json:"deleted,omitempty"` + + // DeletedTime: Blob container deletion time. + DeletedTime *string `json:"deletedTime,omitempty"` + + // DenyEncryptionScopeOverride: Block override of encryption scope from the container default. + DenyEncryptionScopeOverride *bool `json:"denyEncryptionScopeOverride,omitempty"` + + // EnableNfsV3AllSquash: Enable NFSv3 all squash on blob container. + EnableNfsV3AllSquash *bool `json:"enableNfsV3AllSquash,omitempty"` + + // EnableNfsV3RootSquash: Enable NFSv3 root squash on blob container. + EnableNfsV3RootSquash *bool `json:"enableNfsV3RootSquash,omitempty"` + + // HasImmutabilityPolicy: The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been + // created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has + // not been created for this container. + HasImmutabilityPolicy *bool `json:"hasImmutabilityPolicy,omitempty"` + + // HasLegalHold: The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The + // hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a + // maximum of 1000 blob containers with hasLegalHold=true for a given account. + HasLegalHold *bool `json:"hasLegalHold,omitempty"` + + // ImmutabilityPolicy: The ImmutabilityPolicy property of the container. + ImmutabilityPolicy *ImmutabilityPolicyProperties_STATUS_ARM `json:"immutabilityPolicy,omitempty"` + + // ImmutableStorageWithVersioning: The object level immutability property of the container. The property is immutable and + // can only be set to true at the container creation time. Existing containers must undergo a migration process. + ImmutableStorageWithVersioning *ImmutableStorageWithVersioning_STATUS_ARM `json:"immutableStorageWithVersioning,omitempty"` + + // LastModifiedTime: Returns the date and time the container was last modified. + LastModifiedTime *string `json:"lastModifiedTime,omitempty"` + + // LeaseDuration: Specifies whether the lease on a container is of infinite or fixed duration, only when the container is + // leased. + LeaseDuration *ContainerProperties_LeaseDuration_STATUS `json:"leaseDuration,omitempty"` + + // LeaseState: Lease state of the container. + LeaseState *ContainerProperties_LeaseState_STATUS `json:"leaseState,omitempty"` + + // LeaseStatus: The lease status of the container. + LeaseStatus *ContainerProperties_LeaseStatus_STATUS `json:"leaseStatus,omitempty"` + + // LegalHold: The LegalHold property of the container. + LegalHold *LegalHoldProperties_STATUS_ARM `json:"legalHold,omitempty"` + + // Metadata: A name-value pair to associate with the container as metadata. + Metadata map[string]string `json:"metadata"` + + // PublicAccess: Specifies whether data in the container may be accessed publicly and the level of access. + PublicAccess *ContainerProperties_PublicAccess_STATUS `json:"publicAccess,omitempty"` + + // RemainingRetentionDays: Remaining retention days for soft deleted blob container. + RemainingRetentionDays *int `json:"remainingRetentionDays,omitempty"` + + // Version: The version of the deleted blob container. + Version *string `json:"version,omitempty"` +} + +// The properties of an ImmutabilityPolicy of a blob container. +type ImmutabilityPolicyProperties_STATUS_ARM struct { + // Etag: ImmutabilityPolicy Etag. + Etag *string `json:"etag,omitempty"` + + // Properties: The properties of an ImmutabilityPolicy of a blob container. + Properties *ImmutabilityPolicyProperty_STATUS_ARM `json:"properties,omitempty"` + + // UpdateHistory: The ImmutabilityPolicy update history of the blob container. + UpdateHistory []UpdateHistoryProperty_STATUS_ARM `json:"updateHistory"` +} + +// Object level immutability properties of the container. +type ImmutableStorageWithVersioning_STATUS_ARM struct { + // Enabled: This is an immutable property, when set to true it enables object level immutability at the container level. + Enabled *bool `json:"enabled,omitempty"` + + // MigrationState: This property denotes the container level immutability to object level immutability migration state. + MigrationState *ImmutableStorageWithVersioning_MigrationState_STATUS `json:"migrationState,omitempty"` + + // TimeStamp: Returns the date and time the object level immutability was enabled. + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// The LegalHold property of a blob container. +type LegalHoldProperties_STATUS_ARM struct { + // HasLegalHold: The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The + // hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a + // maximum of 1000 blob containers with hasLegalHold=true for a given account. + HasLegalHold *bool `json:"hasLegalHold,omitempty"` + + // ProtectedAppendWritesHistory: Protected append blob writes history. + ProtectedAppendWritesHistory *ProtectedAppendWritesHistory_STATUS_ARM `json:"protectedAppendWritesHistory,omitempty"` + + // Tags: The list of LegalHold tags of a blob container. + Tags []TagProperty_STATUS_ARM `json:"tags"` +} + +// The properties of an ImmutabilityPolicy of a blob container. +type ImmutabilityPolicyProperty_STATUS_ARM struct { + // AllowProtectedAppendWrites: This property can only be changed for unlocked time-based retention policies. When enabled, + // new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks + // can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with + // ExtendImmutabilityPolicy API. + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + + // AllowProtectedAppendWritesAll: This property can only be changed for unlocked time-based retention policies. When + // enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and + // compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be + // changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' + // properties are mutually exclusive. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + + // ImmutabilityPeriodSinceCreationInDays: The immutability period for the blobs in the container since the policy creation, + // in days. + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + + // State: The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. + State *ImmutabilityPolicyProperty_State_STATUS `json:"state,omitempty"` +} + +// Protected append writes history setting for the blob container with Legal holds. +type ProtectedAppendWritesHistory_STATUS_ARM struct { + // AllowProtectedAppendWritesAll: When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining + // legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + + // Timestamp: Returns the date and time the tag was added. + Timestamp *string `json:"timestamp,omitempty"` +} + +// A tag of the LegalHold of a blob container. +type TagProperty_STATUS_ARM struct { + // ObjectIdentifier: Returns the Object ID of the user who added the tag. + ObjectIdentifier *string `json:"objectIdentifier,omitempty"` + + // Tag: The tag value. + Tag *string `json:"tag,omitempty"` + + // TenantId: Returns the Tenant ID that issued the token for the user who added the tag. + TenantId *string `json:"tenantId,omitempty"` + + // Timestamp: Returns the date and time the tag was added. + Timestamp *string `json:"timestamp,omitempty"` + + // Upn: Returns the User Principal Name of the user who added the tag. + Upn *string `json:"upn,omitempty"` +} + +// An update history of the ImmutabilityPolicy of a blob container. +type UpdateHistoryProperty_STATUS_ARM struct { + // AllowProtectedAppendWrites: This property can only be changed for unlocked time-based retention policies. When enabled, + // new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks + // can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with + // ExtendImmutabilityPolicy API. + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + + // AllowProtectedAppendWritesAll: This property can only be changed for unlocked time-based retention policies. When + // enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and + // compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be + // changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' + // properties are mutually exclusive. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + + // ImmutabilityPeriodSinceCreationInDays: The immutability period for the blobs in the container since the policy creation, + // in days. + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + + // ObjectIdentifier: Returns the Object ID of the user who updated the ImmutabilityPolicy. + ObjectIdentifier *string `json:"objectIdentifier,omitempty"` + + // TenantId: Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy. + TenantId *string `json:"tenantId,omitempty"` + + // Timestamp: Returns the date and time the ImmutabilityPolicy was updated. + Timestamp *string `json:"timestamp,omitempty"` + + // Update: The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend. + Update *UpdateHistoryProperty_Update_STATUS `json:"update,omitempty"` + + // Upn: Returns the User Principal Name of the user who updated the ImmutabilityPolicy. + Upn *string `json:"upn,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_status_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_status_arm_types_gen_test.go new file mode 100644 index 00000000000..387843890ca --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_status_arm_types_gen_test.go @@ -0,0 +1,667 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_BlobServices_Container_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobServices_Container_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobServices_Container_STATUS_ARM, StorageAccounts_BlobServices_Container_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobServices_Container_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_BlobServices_Container_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobServices_Container_STATUS_ARM(subject StorageAccounts_BlobServices_Container_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobServices_Container_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobServices_Container_STATUS_ARM instances for property testing - lazily instantiated +// by StorageAccounts_BlobServices_Container_STATUS_ARMGenerator() +var storageAccounts_BlobServices_Container_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_BlobServices_Container_STATUS_ARMGenerator returns a generator of StorageAccounts_BlobServices_Container_STATUS_ARM instances for property testing. +// We first initialize storageAccounts_BlobServices_Container_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobServices_Container_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_BlobServices_Container_STATUS_ARMGenerator != nil { + return storageAccounts_BlobServices_Container_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS_ARM(generators) + storageAccounts_BlobServices_Container_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobServices_Container_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS_ARM(generators) + storageAccounts_BlobServices_Container_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobServices_Container_STATUS_ARM{}), generators) + + return storageAccounts_BlobServices_Container_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(ContainerProperties_STATUS_ARMGenerator()) +} + +func Test_ContainerProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ContainerProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForContainerProperties_STATUS_ARM, ContainerProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForContainerProperties_STATUS_ARM runs a test to see if a specific instance of ContainerProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForContainerProperties_STATUS_ARM(subject ContainerProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ContainerProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ContainerProperties_STATUS_ARM instances for property testing - lazily instantiated by +// ContainerProperties_STATUS_ARMGenerator() +var containerProperties_STATUS_ARMGenerator gopter.Gen + +// ContainerProperties_STATUS_ARMGenerator returns a generator of ContainerProperties_STATUS_ARM instances for property testing. +// We first initialize containerProperties_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ContainerProperties_STATUS_ARMGenerator() gopter.Gen { + if containerProperties_STATUS_ARMGenerator != nil { + return containerProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForContainerProperties_STATUS_ARM(generators) + containerProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ContainerProperties_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForContainerProperties_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForContainerProperties_STATUS_ARM(generators) + containerProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ContainerProperties_STATUS_ARM{}), generators) + + return containerProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForContainerProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForContainerProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["DefaultEncryptionScope"] = gen.PtrOf(gen.AlphaString()) + gens["Deleted"] = gen.PtrOf(gen.Bool()) + gens["DeletedTime"] = gen.PtrOf(gen.AlphaString()) + gens["DenyEncryptionScopeOverride"] = gen.PtrOf(gen.Bool()) + gens["EnableNfsV3AllSquash"] = gen.PtrOf(gen.Bool()) + gens["EnableNfsV3RootSquash"] = gen.PtrOf(gen.Bool()) + gens["HasImmutabilityPolicy"] = gen.PtrOf(gen.Bool()) + gens["HasLegalHold"] = gen.PtrOf(gen.Bool()) + gens["LastModifiedTime"] = gen.PtrOf(gen.AlphaString()) + gens["LeaseDuration"] = gen.PtrOf(gen.OneConstOf(ContainerProperties_LeaseDuration_STATUS_Fixed, ContainerProperties_LeaseDuration_STATUS_Infinite)) + gens["LeaseState"] = gen.PtrOf(gen.OneConstOf( + ContainerProperties_LeaseState_STATUS_Available, + ContainerProperties_LeaseState_STATUS_Breaking, + ContainerProperties_LeaseState_STATUS_Broken, + ContainerProperties_LeaseState_STATUS_Expired, + ContainerProperties_LeaseState_STATUS_Leased)) + gens["LeaseStatus"] = gen.PtrOf(gen.OneConstOf(ContainerProperties_LeaseStatus_STATUS_Locked, ContainerProperties_LeaseStatus_STATUS_Unlocked)) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["PublicAccess"] = gen.PtrOf(gen.OneConstOf(ContainerProperties_PublicAccess_STATUS_Blob, ContainerProperties_PublicAccess_STATUS_Container, ContainerProperties_PublicAccess_STATUS_None)) + gens["RemainingRetentionDays"] = gen.PtrOf(gen.Int()) + gens["Version"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForContainerProperties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForContainerProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ImmutabilityPolicy"] = gen.PtrOf(ImmutabilityPolicyProperties_STATUS_ARMGenerator()) + gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageWithVersioning_STATUS_ARMGenerator()) + gens["LegalHold"] = gen.PtrOf(LegalHoldProperties_STATUS_ARMGenerator()) +} + +func Test_ImmutabilityPolicyProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutabilityPolicyProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutabilityPolicyProperties_STATUS_ARM, ImmutabilityPolicyProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutabilityPolicyProperties_STATUS_ARM runs a test to see if a specific instance of ImmutabilityPolicyProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutabilityPolicyProperties_STATUS_ARM(subject ImmutabilityPolicyProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutabilityPolicyProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutabilityPolicyProperties_STATUS_ARM instances for property testing - lazily instantiated by +// ImmutabilityPolicyProperties_STATUS_ARMGenerator() +var immutabilityPolicyProperties_STATUS_ARMGenerator gopter.Gen + +// ImmutabilityPolicyProperties_STATUS_ARMGenerator returns a generator of ImmutabilityPolicyProperties_STATUS_ARM instances for property testing. +// We first initialize immutabilityPolicyProperties_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ImmutabilityPolicyProperties_STATUS_ARMGenerator() gopter.Gen { + if immutabilityPolicyProperties_STATUS_ARMGenerator != nil { + return immutabilityPolicyProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutabilityPolicyProperties_STATUS_ARM(generators) + immutabilityPolicyProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ImmutabilityPolicyProperties_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutabilityPolicyProperties_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForImmutabilityPolicyProperties_STATUS_ARM(generators) + immutabilityPolicyProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ImmutabilityPolicyProperties_STATUS_ARM{}), generators) + + return immutabilityPolicyProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForImmutabilityPolicyProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutabilityPolicyProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Etag"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForImmutabilityPolicyProperties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForImmutabilityPolicyProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(ImmutabilityPolicyProperty_STATUS_ARMGenerator()) + gens["UpdateHistory"] = gen.SliceOf(UpdateHistoryProperty_STATUS_ARMGenerator()) +} + +func Test_ImmutableStorageWithVersioning_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutableStorageWithVersioning_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutableStorageWithVersioning_STATUS_ARM, ImmutableStorageWithVersioning_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutableStorageWithVersioning_STATUS_ARM runs a test to see if a specific instance of ImmutableStorageWithVersioning_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutableStorageWithVersioning_STATUS_ARM(subject ImmutableStorageWithVersioning_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutableStorageWithVersioning_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutableStorageWithVersioning_STATUS_ARM instances for property testing - lazily instantiated by +// ImmutableStorageWithVersioning_STATUS_ARMGenerator() +var immutableStorageWithVersioning_STATUS_ARMGenerator gopter.Gen + +// ImmutableStorageWithVersioning_STATUS_ARMGenerator returns a generator of ImmutableStorageWithVersioning_STATUS_ARM instances for property testing. +func ImmutableStorageWithVersioning_STATUS_ARMGenerator() gopter.Gen { + if immutableStorageWithVersioning_STATUS_ARMGenerator != nil { + return immutableStorageWithVersioning_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_STATUS_ARM(generators) + immutableStorageWithVersioning_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageWithVersioning_STATUS_ARM{}), generators) + + return immutableStorageWithVersioning_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["MigrationState"] = gen.PtrOf(gen.OneConstOf(ImmutableStorageWithVersioning_MigrationState_STATUS_Completed, ImmutableStorageWithVersioning_MigrationState_STATUS_InProgress)) + gens["TimeStamp"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_LegalHoldProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of LegalHoldProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForLegalHoldProperties_STATUS_ARM, LegalHoldProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForLegalHoldProperties_STATUS_ARM runs a test to see if a specific instance of LegalHoldProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForLegalHoldProperties_STATUS_ARM(subject LegalHoldProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual LegalHoldProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of LegalHoldProperties_STATUS_ARM instances for property testing - lazily instantiated by +// LegalHoldProperties_STATUS_ARMGenerator() +var legalHoldProperties_STATUS_ARMGenerator gopter.Gen + +// LegalHoldProperties_STATUS_ARMGenerator returns a generator of LegalHoldProperties_STATUS_ARM instances for property testing. +// We first initialize legalHoldProperties_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func LegalHoldProperties_STATUS_ARMGenerator() gopter.Gen { + if legalHoldProperties_STATUS_ARMGenerator != nil { + return legalHoldProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForLegalHoldProperties_STATUS_ARM(generators) + legalHoldProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(LegalHoldProperties_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForLegalHoldProperties_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForLegalHoldProperties_STATUS_ARM(generators) + legalHoldProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(LegalHoldProperties_STATUS_ARM{}), generators) + + return legalHoldProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForLegalHoldProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForLegalHoldProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["HasLegalHold"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForLegalHoldProperties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForLegalHoldProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ProtectedAppendWritesHistory"] = gen.PtrOf(ProtectedAppendWritesHistory_STATUS_ARMGenerator()) + gens["Tags"] = gen.SliceOf(TagProperty_STATUS_ARMGenerator()) +} + +func Test_ImmutabilityPolicyProperty_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutabilityPolicyProperty_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutabilityPolicyProperty_STATUS_ARM, ImmutabilityPolicyProperty_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutabilityPolicyProperty_STATUS_ARM runs a test to see if a specific instance of ImmutabilityPolicyProperty_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutabilityPolicyProperty_STATUS_ARM(subject ImmutabilityPolicyProperty_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutabilityPolicyProperty_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutabilityPolicyProperty_STATUS_ARM instances for property testing - lazily instantiated by +// ImmutabilityPolicyProperty_STATUS_ARMGenerator() +var immutabilityPolicyProperty_STATUS_ARMGenerator gopter.Gen + +// ImmutabilityPolicyProperty_STATUS_ARMGenerator returns a generator of ImmutabilityPolicyProperty_STATUS_ARM instances for property testing. +func ImmutabilityPolicyProperty_STATUS_ARMGenerator() gopter.Gen { + if immutabilityPolicyProperty_STATUS_ARMGenerator != nil { + return immutabilityPolicyProperty_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutabilityPolicyProperty_STATUS_ARM(generators) + immutabilityPolicyProperty_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ImmutabilityPolicyProperty_STATUS_ARM{}), generators) + + return immutabilityPolicyProperty_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForImmutabilityPolicyProperty_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutabilityPolicyProperty_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWrites"] = gen.PtrOf(gen.Bool()) + gens["AllowProtectedAppendWritesAll"] = gen.PtrOf(gen.Bool()) + gens["ImmutabilityPeriodSinceCreationInDays"] = gen.PtrOf(gen.Int()) + gens["State"] = gen.PtrOf(gen.OneConstOf(ImmutabilityPolicyProperty_State_STATUS_Locked, ImmutabilityPolicyProperty_State_STATUS_Unlocked)) +} + +func Test_ProtectedAppendWritesHistory_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ProtectedAppendWritesHistory_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForProtectedAppendWritesHistory_STATUS_ARM, ProtectedAppendWritesHistory_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForProtectedAppendWritesHistory_STATUS_ARM runs a test to see if a specific instance of ProtectedAppendWritesHistory_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForProtectedAppendWritesHistory_STATUS_ARM(subject ProtectedAppendWritesHistory_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ProtectedAppendWritesHistory_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ProtectedAppendWritesHistory_STATUS_ARM instances for property testing - lazily instantiated by +// ProtectedAppendWritesHistory_STATUS_ARMGenerator() +var protectedAppendWritesHistory_STATUS_ARMGenerator gopter.Gen + +// ProtectedAppendWritesHistory_STATUS_ARMGenerator returns a generator of ProtectedAppendWritesHistory_STATUS_ARM instances for property testing. +func ProtectedAppendWritesHistory_STATUS_ARMGenerator() gopter.Gen { + if protectedAppendWritesHistory_STATUS_ARMGenerator != nil { + return protectedAppendWritesHistory_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForProtectedAppendWritesHistory_STATUS_ARM(generators) + protectedAppendWritesHistory_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ProtectedAppendWritesHistory_STATUS_ARM{}), generators) + + return protectedAppendWritesHistory_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForProtectedAppendWritesHistory_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForProtectedAppendWritesHistory_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWritesAll"] = gen.PtrOf(gen.Bool()) + gens["Timestamp"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_TagProperty_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TagProperty_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTagProperty_STATUS_ARM, TagProperty_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTagProperty_STATUS_ARM runs a test to see if a specific instance of TagProperty_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForTagProperty_STATUS_ARM(subject TagProperty_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TagProperty_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TagProperty_STATUS_ARM instances for property testing - lazily instantiated by +// TagProperty_STATUS_ARMGenerator() +var tagProperty_STATUS_ARMGenerator gopter.Gen + +// TagProperty_STATUS_ARMGenerator returns a generator of TagProperty_STATUS_ARM instances for property testing. +func TagProperty_STATUS_ARMGenerator() gopter.Gen { + if tagProperty_STATUS_ARMGenerator != nil { + return tagProperty_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTagProperty_STATUS_ARM(generators) + tagProperty_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(TagProperty_STATUS_ARM{}), generators) + + return tagProperty_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForTagProperty_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTagProperty_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ObjectIdentifier"] = gen.PtrOf(gen.AlphaString()) + gens["Tag"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Timestamp"] = gen.PtrOf(gen.AlphaString()) + gens["Upn"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_UpdateHistoryProperty_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of UpdateHistoryProperty_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUpdateHistoryProperty_STATUS_ARM, UpdateHistoryProperty_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUpdateHistoryProperty_STATUS_ARM runs a test to see if a specific instance of UpdateHistoryProperty_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForUpdateHistoryProperty_STATUS_ARM(subject UpdateHistoryProperty_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UpdateHistoryProperty_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of UpdateHistoryProperty_STATUS_ARM instances for property testing - lazily instantiated by +// UpdateHistoryProperty_STATUS_ARMGenerator() +var updateHistoryProperty_STATUS_ARMGenerator gopter.Gen + +// UpdateHistoryProperty_STATUS_ARMGenerator returns a generator of UpdateHistoryProperty_STATUS_ARM instances for property testing. +func UpdateHistoryProperty_STATUS_ARMGenerator() gopter.Gen { + if updateHistoryProperty_STATUS_ARMGenerator != nil { + return updateHistoryProperty_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForUpdateHistoryProperty_STATUS_ARM(generators) + updateHistoryProperty_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(UpdateHistoryProperty_STATUS_ARM{}), generators) + + return updateHistoryProperty_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForUpdateHistoryProperty_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForUpdateHistoryProperty_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWrites"] = gen.PtrOf(gen.Bool()) + gens["AllowProtectedAppendWritesAll"] = gen.PtrOf(gen.Bool()) + gens["ImmutabilityPeriodSinceCreationInDays"] = gen.PtrOf(gen.Int()) + gens["ObjectIdentifier"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Timestamp"] = gen.PtrOf(gen.AlphaString()) + gens["Update"] = gen.PtrOf(gen.OneConstOf(UpdateHistoryProperty_Update_STATUS_Extend, UpdateHistoryProperty_Update_STATUS_Lock, UpdateHistoryProperty_Update_STATUS_Put)) + gens["Upn"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_types_gen.go new file mode 100644 index 00000000000..480747156a3 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_types_gen.go @@ -0,0 +1,2521 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/blob.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName} +type StorageAccountsBlobServicesContainer struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_BlobServices_Container_Spec `json:"spec,omitempty"` + Status StorageAccounts_BlobServices_Container_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsBlobServicesContainer{} + +// GetConditions returns the conditions of the resource +func (container *StorageAccountsBlobServicesContainer) GetConditions() conditions.Conditions { + return container.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (container *StorageAccountsBlobServicesContainer) SetConditions(conditions conditions.Conditions) { + container.Status.Conditions = conditions +} + +var _ conversion.Convertible = &StorageAccountsBlobServicesContainer{} + +// ConvertFrom populates our StorageAccountsBlobServicesContainer from the provided hub StorageAccountsBlobServicesContainer +func (container *StorageAccountsBlobServicesContainer) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsBlobServicesContainer) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsBlobServicesContainer but received %T instead", hub) + } + + return container.AssignProperties_From_StorageAccountsBlobServicesContainer(source) +} + +// ConvertTo populates the provided hub StorageAccountsBlobServicesContainer from our StorageAccountsBlobServicesContainer +func (container *StorageAccountsBlobServicesContainer) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsBlobServicesContainer) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsBlobServicesContainer but received %T instead", hub) + } + + return container.AssignProperties_To_StorageAccountsBlobServicesContainer(destination) +} + +// +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20230101-storageaccountsblobservicescontainer,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsblobservicescontainers,verbs=create;update,versions=v1api20230101,name=default.v1api20230101.storageaccountsblobservicescontainers.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &StorageAccountsBlobServicesContainer{} + +// Default applies defaults to the StorageAccountsBlobServicesContainer resource +func (container *StorageAccountsBlobServicesContainer) Default() { + container.defaultImpl() + var temp any = container + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (container *StorageAccountsBlobServicesContainer) defaultAzureName() { + if container.Spec.AzureName == "" { + container.Spec.AzureName = container.Name + } +} + +// defaultImpl applies the code generated defaults to the StorageAccountsBlobServicesContainer resource +func (container *StorageAccountsBlobServicesContainer) defaultImpl() { container.defaultAzureName() } + +var _ genruntime.ImportableResource = &StorageAccountsBlobServicesContainer{} + +// InitializeSpec initializes the spec for this resource from the given status +func (container *StorageAccountsBlobServicesContainer) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*StorageAccounts_BlobServices_Container_STATUS); ok { + return container.Spec.Initialize_From_StorageAccounts_BlobServices_Container_STATUS(s) + } + + return fmt.Errorf("expected Status of type StorageAccounts_BlobServices_Container_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &StorageAccountsBlobServicesContainer{} + +// AzureName returns the Azure name of the resource +func (container *StorageAccountsBlobServicesContainer) AzureName() string { + return container.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (container StorageAccountsBlobServicesContainer) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (container *StorageAccountsBlobServicesContainer) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (container *StorageAccountsBlobServicesContainer) GetSpec() genruntime.ConvertibleSpec { + return &container.Spec +} + +// GetStatus returns the status of this resource +func (container *StorageAccountsBlobServicesContainer) GetStatus() genruntime.ConvertibleStatus { + return &container.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (container *StorageAccountsBlobServicesContainer) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/blobServices/containers" +func (container *StorageAccountsBlobServicesContainer) GetType() string { + return "Microsoft.Storage/storageAccounts/blobServices/containers" +} + +// NewEmptyStatus returns a new empty (blank) status +func (container *StorageAccountsBlobServicesContainer) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_BlobServices_Container_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (container *StorageAccountsBlobServicesContainer) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(container.Spec) + return container.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (container *StorageAccountsBlobServicesContainer) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_BlobServices_Container_STATUS); ok { + container.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_BlobServices_Container_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + container.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-storage-azure-com-v1api20230101-storageaccountsblobservicescontainer,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsblobservicescontainers,verbs=create;update,versions=v1api20230101,name=validate.v1api20230101.storageaccountsblobservicescontainers.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &StorageAccountsBlobServicesContainer{} + +// ValidateCreate validates the creation of the resource +func (container *StorageAccountsBlobServicesContainer) ValidateCreate() (admission.Warnings, error) { + validations := container.createValidations() + var temp any = container + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (container *StorageAccountsBlobServicesContainer) ValidateDelete() (admission.Warnings, error) { + validations := container.deleteValidations() + var temp any = container + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (container *StorageAccountsBlobServicesContainer) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := container.updateValidations() + var temp any = container + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (container *StorageAccountsBlobServicesContainer) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){container.validateResourceReferences, container.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (container *StorageAccountsBlobServicesContainer) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (container *StorageAccountsBlobServicesContainer) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return container.validateResourceReferences() + }, + container.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return container.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (container *StorageAccountsBlobServicesContainer) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(container) +} + +// validateResourceReferences validates all resource references +func (container *StorageAccountsBlobServicesContainer) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&container.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (container *StorageAccountsBlobServicesContainer) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*StorageAccountsBlobServicesContainer) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, container) +} + +// AssignProperties_From_StorageAccountsBlobServicesContainer populates our StorageAccountsBlobServicesContainer from the provided source StorageAccountsBlobServicesContainer +func (container *StorageAccountsBlobServicesContainer) AssignProperties_From_StorageAccountsBlobServicesContainer(source *v20230101s.StorageAccountsBlobServicesContainer) error { + + // ObjectMeta + container.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_BlobServices_Container_Spec + err := spec.AssignProperties_From_StorageAccounts_BlobServices_Container_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_BlobServices_Container_Spec() to populate field Spec") + } + container.Spec = spec + + // Status + var status StorageAccounts_BlobServices_Container_STATUS + err = status.AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS() to populate field Status") + } + container.Status = status + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsBlobServicesContainer populates the provided destination StorageAccountsBlobServicesContainer from our StorageAccountsBlobServicesContainer +func (container *StorageAccountsBlobServicesContainer) AssignProperties_To_StorageAccountsBlobServicesContainer(destination *v20230101s.StorageAccountsBlobServicesContainer) error { + + // ObjectMeta + destination.ObjectMeta = *container.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_BlobServices_Container_Spec + err := container.Spec.AssignProperties_To_StorageAccounts_BlobServices_Container_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_BlobServices_Container_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_BlobServices_Container_STATUS + err = container.Status.AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (container *StorageAccountsBlobServicesContainer) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: container.Spec.OriginalVersion(), + Kind: "StorageAccountsBlobServicesContainer", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/blob.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName} +type StorageAccountsBlobServicesContainerList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsBlobServicesContainer `json:"items"` +} + +type StorageAccounts_BlobServices_Container_Spec struct { + // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:MinLength=3 + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // DefaultEncryptionScope: Default the container to use specified encryption scope for all writes. + DefaultEncryptionScope *string `json:"defaultEncryptionScope,omitempty"` + + // DenyEncryptionScopeOverride: Block override of encryption scope from the container default. + DenyEncryptionScopeOverride *bool `json:"denyEncryptionScopeOverride,omitempty"` + + // EnableNfsV3AllSquash: Enable NFSv3 all squash on blob container. + EnableNfsV3AllSquash *bool `json:"enableNfsV3AllSquash,omitempty"` + + // EnableNfsV3RootSquash: Enable NFSv3 root squash on blob container. + EnableNfsV3RootSquash *bool `json:"enableNfsV3RootSquash,omitempty"` + + // ImmutableStorageWithVersioning: The object level immutability property of the container. The property is immutable and + // can only be set to true at the container creation time. Existing containers must undergo a migration process. + ImmutableStorageWithVersioning *ImmutableStorageWithVersioning `json:"immutableStorageWithVersioning,omitempty"` + + // Metadata: A name-value pair to associate with the container as metadata. + Metadata map[string]string `json:"metadata,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccountsBlobService resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccountsBlobService"` + + // PublicAccess: Specifies whether data in the container may be accessed publicly and the level of access. + PublicAccess *ContainerProperties_PublicAccess `json:"publicAccess,omitempty"` +} + +var _ genruntime.ARMTransformer = &StorageAccounts_BlobServices_Container_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (container *StorageAccounts_BlobServices_Container_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if container == nil { + return nil, nil + } + result := &StorageAccounts_BlobServices_Container_Spec_ARM{} + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if container.DefaultEncryptionScope != nil || + container.DenyEncryptionScopeOverride != nil || + container.EnableNfsV3AllSquash != nil || + container.EnableNfsV3RootSquash != nil || + container.ImmutableStorageWithVersioning != nil || + container.Metadata != nil || + container.PublicAccess != nil { + result.Properties = &ContainerProperties_ARM{} + } + if container.DefaultEncryptionScope != nil { + defaultEncryptionScope := *container.DefaultEncryptionScope + result.Properties.DefaultEncryptionScope = &defaultEncryptionScope + } + if container.DenyEncryptionScopeOverride != nil { + denyEncryptionScopeOverride := *container.DenyEncryptionScopeOverride + result.Properties.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride + } + if container.EnableNfsV3AllSquash != nil { + enableNfsV3AllSquash := *container.EnableNfsV3AllSquash + result.Properties.EnableNfsV3AllSquash = &enableNfsV3AllSquash + } + if container.EnableNfsV3RootSquash != nil { + enableNfsV3RootSquash := *container.EnableNfsV3RootSquash + result.Properties.EnableNfsV3RootSquash = &enableNfsV3RootSquash + } + if container.ImmutableStorageWithVersioning != nil { + immutableStorageWithVersioning_ARM, err := (*container.ImmutableStorageWithVersioning).ConvertToARM(resolved) + if err != nil { + return nil, err + } + immutableStorageWithVersioning := *immutableStorageWithVersioning_ARM.(*ImmutableStorageWithVersioning_ARM) + result.Properties.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } + if container.Metadata != nil { + result.Properties.Metadata = make(map[string]string, len(container.Metadata)) + for key, value := range container.Metadata { + result.Properties.Metadata[key] = value + } + } + if container.PublicAccess != nil { + publicAccess := *container.PublicAccess + result.Properties.PublicAccess = &publicAccess + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (container *StorageAccounts_BlobServices_Container_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_BlobServices_Container_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (container *StorageAccounts_BlobServices_Container_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_BlobServices_Container_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_BlobServices_Container_Spec_ARM, got %T", armInput) + } + + // Set property "AzureName": + container.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "DefaultEncryptionScope": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DefaultEncryptionScope != nil { + defaultEncryptionScope := *typedInput.Properties.DefaultEncryptionScope + container.DefaultEncryptionScope = &defaultEncryptionScope + } + } + + // Set property "DenyEncryptionScopeOverride": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DenyEncryptionScopeOverride != nil { + denyEncryptionScopeOverride := *typedInput.Properties.DenyEncryptionScopeOverride + container.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride + } + } + + // Set property "EnableNfsV3AllSquash": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.EnableNfsV3AllSquash != nil { + enableNfsV3AllSquash := *typedInput.Properties.EnableNfsV3AllSquash + container.EnableNfsV3AllSquash = &enableNfsV3AllSquash + } + } + + // Set property "EnableNfsV3RootSquash": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.EnableNfsV3RootSquash != nil { + enableNfsV3RootSquash := *typedInput.Properties.EnableNfsV3RootSquash + container.EnableNfsV3RootSquash = &enableNfsV3RootSquash + } + } + + // Set property "ImmutableStorageWithVersioning": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning1 ImmutableStorageWithVersioning + err := immutableStorageWithVersioning1.PopulateFromARM(owner, *typedInput.Properties.ImmutableStorageWithVersioning) + if err != nil { + return err + } + immutableStorageWithVersioning := immutableStorageWithVersioning1 + container.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } + } + + // Set property "Metadata": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Metadata != nil { + container.Metadata = make(map[string]string, len(typedInput.Properties.Metadata)) + for key, value := range typedInput.Properties.Metadata { + container.Metadata[key] = value + } + } + } + + // Set property "Owner": + container.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "PublicAccess": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.PublicAccess != nil { + publicAccess := *typedInput.Properties.PublicAccess + container.PublicAccess = &publicAccess + } + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_BlobServices_Container_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_BlobServices_Container_Spec from the provided source +func (container *StorageAccounts_BlobServices_Container_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20230101s.StorageAccounts_BlobServices_Container_Spec) + if ok { + // Populate our instance from source + return container.AssignProperties_From_StorageAccounts_BlobServices_Container_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_BlobServices_Container_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = container.AssignProperties_From_StorageAccounts_BlobServices_Container_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_BlobServices_Container_Spec +func (container *StorageAccounts_BlobServices_Container_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20230101s.StorageAccounts_BlobServices_Container_Spec) + if ok { + // Populate destination from our instance + return container.AssignProperties_To_StorageAccounts_BlobServices_Container_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_BlobServices_Container_Spec{} + err := container.AssignProperties_To_StorageAccounts_BlobServices_Container_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_BlobServices_Container_Spec populates our StorageAccounts_BlobServices_Container_Spec from the provided source StorageAccounts_BlobServices_Container_Spec +func (container *StorageAccounts_BlobServices_Container_Spec) AssignProperties_From_StorageAccounts_BlobServices_Container_Spec(source *v20230101s.StorageAccounts_BlobServices_Container_Spec) error { + + // AzureName + container.AzureName = source.AzureName + + // DefaultEncryptionScope + container.DefaultEncryptionScope = genruntime.ClonePointerToString(source.DefaultEncryptionScope) + + // DenyEncryptionScopeOverride + if source.DenyEncryptionScopeOverride != nil { + denyEncryptionScopeOverride := *source.DenyEncryptionScopeOverride + container.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride + } else { + container.DenyEncryptionScopeOverride = nil + } + + // EnableNfsV3AllSquash + if source.EnableNfsV3AllSquash != nil { + enableNfsV3AllSquash := *source.EnableNfsV3AllSquash + container.EnableNfsV3AllSquash = &enableNfsV3AllSquash + } else { + container.EnableNfsV3AllSquash = nil + } + + // EnableNfsV3RootSquash + if source.EnableNfsV3RootSquash != nil { + enableNfsV3RootSquash := *source.EnableNfsV3RootSquash + container.EnableNfsV3RootSquash = &enableNfsV3RootSquash + } else { + container.EnableNfsV3RootSquash = nil + } + + // ImmutableStorageWithVersioning + if source.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning ImmutableStorageWithVersioning + err := immutableStorageWithVersioning.AssignProperties_From_ImmutableStorageWithVersioning(source.ImmutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ImmutableStorageWithVersioning() to populate field ImmutableStorageWithVersioning") + } + container.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + container.ImmutableStorageWithVersioning = nil + } + + // Metadata + container.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + container.Owner = &owner + } else { + container.Owner = nil + } + + // PublicAccess + if source.PublicAccess != nil { + publicAccess := ContainerProperties_PublicAccess(*source.PublicAccess) + container.PublicAccess = &publicAccess + } else { + container.PublicAccess = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_BlobServices_Container_Spec populates the provided destination StorageAccounts_BlobServices_Container_Spec from our StorageAccounts_BlobServices_Container_Spec +func (container *StorageAccounts_BlobServices_Container_Spec) AssignProperties_To_StorageAccounts_BlobServices_Container_Spec(destination *v20230101s.StorageAccounts_BlobServices_Container_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AzureName + destination.AzureName = container.AzureName + + // DefaultEncryptionScope + destination.DefaultEncryptionScope = genruntime.ClonePointerToString(container.DefaultEncryptionScope) + + // DenyEncryptionScopeOverride + if container.DenyEncryptionScopeOverride != nil { + denyEncryptionScopeOverride := *container.DenyEncryptionScopeOverride + destination.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride + } else { + destination.DenyEncryptionScopeOverride = nil + } + + // EnableNfsV3AllSquash + if container.EnableNfsV3AllSquash != nil { + enableNfsV3AllSquash := *container.EnableNfsV3AllSquash + destination.EnableNfsV3AllSquash = &enableNfsV3AllSquash + } else { + destination.EnableNfsV3AllSquash = nil + } + + // EnableNfsV3RootSquash + if container.EnableNfsV3RootSquash != nil { + enableNfsV3RootSquash := *container.EnableNfsV3RootSquash + destination.EnableNfsV3RootSquash = &enableNfsV3RootSquash + } else { + destination.EnableNfsV3RootSquash = nil + } + + // ImmutableStorageWithVersioning + if container.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning v20230101s.ImmutableStorageWithVersioning + err := container.ImmutableStorageWithVersioning.AssignProperties_To_ImmutableStorageWithVersioning(&immutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ImmutableStorageWithVersioning() to populate field ImmutableStorageWithVersioning") + } + destination.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + destination.ImmutableStorageWithVersioning = nil + } + + // Metadata + destination.Metadata = genruntime.CloneMapOfStringToString(container.Metadata) + + // OriginalVersion + destination.OriginalVersion = container.OriginalVersion() + + // Owner + if container.Owner != nil { + owner := container.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // PublicAccess + if container.PublicAccess != nil { + publicAccess := string(*container.PublicAccess) + destination.PublicAccess = &publicAccess + } else { + destination.PublicAccess = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_StorageAccounts_BlobServices_Container_STATUS populates our StorageAccounts_BlobServices_Container_Spec from the provided source StorageAccounts_BlobServices_Container_STATUS +func (container *StorageAccounts_BlobServices_Container_Spec) Initialize_From_StorageAccounts_BlobServices_Container_STATUS(source *StorageAccounts_BlobServices_Container_STATUS) error { + + // DefaultEncryptionScope + container.DefaultEncryptionScope = genruntime.ClonePointerToString(source.DefaultEncryptionScope) + + // DenyEncryptionScopeOverride + if source.DenyEncryptionScopeOverride != nil { + denyEncryptionScopeOverride := *source.DenyEncryptionScopeOverride + container.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride + } else { + container.DenyEncryptionScopeOverride = nil + } + + // EnableNfsV3AllSquash + if source.EnableNfsV3AllSquash != nil { + enableNfsV3AllSquash := *source.EnableNfsV3AllSquash + container.EnableNfsV3AllSquash = &enableNfsV3AllSquash + } else { + container.EnableNfsV3AllSquash = nil + } + + // EnableNfsV3RootSquash + if source.EnableNfsV3RootSquash != nil { + enableNfsV3RootSquash := *source.EnableNfsV3RootSquash + container.EnableNfsV3RootSquash = &enableNfsV3RootSquash + } else { + container.EnableNfsV3RootSquash = nil + } + + // ImmutableStorageWithVersioning + if source.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning ImmutableStorageWithVersioning + err := immutableStorageWithVersioning.Initialize_From_ImmutableStorageWithVersioning_STATUS(source.ImmutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ImmutableStorageWithVersioning_STATUS() to populate field ImmutableStorageWithVersioning") + } + container.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + container.ImmutableStorageWithVersioning = nil + } + + // Metadata + container.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // PublicAccess + if source.PublicAccess != nil { + publicAccess := ContainerProperties_PublicAccess(*source.PublicAccess) + container.PublicAccess = &publicAccess + } else { + container.PublicAccess = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (container *StorageAccounts_BlobServices_Container_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (container *StorageAccounts_BlobServices_Container_Spec) SetAzureName(azureName string) { + container.AzureName = azureName +} + +type StorageAccounts_BlobServices_Container_STATUS struct { + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // DefaultEncryptionScope: Default the container to use specified encryption scope for all writes. + DefaultEncryptionScope *string `json:"defaultEncryptionScope,omitempty"` + + // Deleted: Indicates whether the blob container was deleted. + Deleted *bool `json:"deleted,omitempty"` + + // DeletedTime: Blob container deletion time. + DeletedTime *string `json:"deletedTime,omitempty"` + + // DenyEncryptionScopeOverride: Block override of encryption scope from the container default. + DenyEncryptionScopeOverride *bool `json:"denyEncryptionScopeOverride,omitempty"` + + // EnableNfsV3AllSquash: Enable NFSv3 all squash on blob container. + EnableNfsV3AllSquash *bool `json:"enableNfsV3AllSquash,omitempty"` + + // EnableNfsV3RootSquash: Enable NFSv3 root squash on blob container. + EnableNfsV3RootSquash *bool `json:"enableNfsV3RootSquash,omitempty"` + + // Etag: Resource Etag. + Etag *string `json:"etag,omitempty"` + + // HasImmutabilityPolicy: The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been + // created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has + // not been created for this container. + HasImmutabilityPolicy *bool `json:"hasImmutabilityPolicy,omitempty"` + + // HasLegalHold: The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The + // hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a + // maximum of 1000 blob containers with hasLegalHold=true for a given account. + HasLegalHold *bool `json:"hasLegalHold,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // ImmutabilityPolicy: The ImmutabilityPolicy property of the container. + ImmutabilityPolicy *ImmutabilityPolicyProperties_STATUS `json:"immutabilityPolicy,omitempty"` + + // ImmutableStorageWithVersioning: The object level immutability property of the container. The property is immutable and + // can only be set to true at the container creation time. Existing containers must undergo a migration process. + ImmutableStorageWithVersioning *ImmutableStorageWithVersioning_STATUS `json:"immutableStorageWithVersioning,omitempty"` + + // LastModifiedTime: Returns the date and time the container was last modified. + LastModifiedTime *string `json:"lastModifiedTime,omitempty"` + + // LeaseDuration: Specifies whether the lease on a container is of infinite or fixed duration, only when the container is + // leased. + LeaseDuration *ContainerProperties_LeaseDuration_STATUS `json:"leaseDuration,omitempty"` + + // LeaseState: Lease state of the container. + LeaseState *ContainerProperties_LeaseState_STATUS `json:"leaseState,omitempty"` + + // LeaseStatus: The lease status of the container. + LeaseStatus *ContainerProperties_LeaseStatus_STATUS `json:"leaseStatus,omitempty"` + + // LegalHold: The LegalHold property of the container. + LegalHold *LegalHoldProperties_STATUS `json:"legalHold,omitempty"` + + // Metadata: A name-value pair to associate with the container as metadata. + Metadata map[string]string `json:"metadata,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // PublicAccess: Specifies whether data in the container may be accessed publicly and the level of access. + PublicAccess *ContainerProperties_PublicAccess_STATUS `json:"publicAccess,omitempty"` + + // RemainingRetentionDays: Remaining retention days for soft deleted blob container. + RemainingRetentionDays *int `json:"remainingRetentionDays,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` + + // Version: The version of the deleted blob container. + Version *string `json:"version,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_BlobServices_Container_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_BlobServices_Container_STATUS from the provided source +func (container *StorageAccounts_BlobServices_Container_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20230101s.StorageAccounts_BlobServices_Container_STATUS) + if ok { + // Populate our instance from source + return container.AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_BlobServices_Container_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = container.AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_BlobServices_Container_STATUS +func (container *StorageAccounts_BlobServices_Container_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20230101s.StorageAccounts_BlobServices_Container_STATUS) + if ok { + // Populate destination from our instance + return container.AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_BlobServices_Container_STATUS{} + err := container.AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &StorageAccounts_BlobServices_Container_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (container *StorageAccounts_BlobServices_Container_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_BlobServices_Container_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (container *StorageAccounts_BlobServices_Container_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_BlobServices_Container_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_BlobServices_Container_STATUS_ARM, got %T", armInput) + } + + // no assignment for property "Conditions" + + // Set property "DefaultEncryptionScope": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DefaultEncryptionScope != nil { + defaultEncryptionScope := *typedInput.Properties.DefaultEncryptionScope + container.DefaultEncryptionScope = &defaultEncryptionScope + } + } + + // Set property "Deleted": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Deleted != nil { + deleted := *typedInput.Properties.Deleted + container.Deleted = &deleted + } + } + + // Set property "DeletedTime": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DeletedTime != nil { + deletedTime := *typedInput.Properties.DeletedTime + container.DeletedTime = &deletedTime + } + } + + // Set property "DenyEncryptionScopeOverride": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DenyEncryptionScopeOverride != nil { + denyEncryptionScopeOverride := *typedInput.Properties.DenyEncryptionScopeOverride + container.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride + } + } + + // Set property "EnableNfsV3AllSquash": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.EnableNfsV3AllSquash != nil { + enableNfsV3AllSquash := *typedInput.Properties.EnableNfsV3AllSquash + container.EnableNfsV3AllSquash = &enableNfsV3AllSquash + } + } + + // Set property "EnableNfsV3RootSquash": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.EnableNfsV3RootSquash != nil { + enableNfsV3RootSquash := *typedInput.Properties.EnableNfsV3RootSquash + container.EnableNfsV3RootSquash = &enableNfsV3RootSquash + } + } + + // Set property "Etag": + if typedInput.Etag != nil { + etag := *typedInput.Etag + container.Etag = &etag + } + + // Set property "HasImmutabilityPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.HasImmutabilityPolicy != nil { + hasImmutabilityPolicy := *typedInput.Properties.HasImmutabilityPolicy + container.HasImmutabilityPolicy = &hasImmutabilityPolicy + } + } + + // Set property "HasLegalHold": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.HasLegalHold != nil { + hasLegalHold := *typedInput.Properties.HasLegalHold + container.HasLegalHold = &hasLegalHold + } + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + container.Id = &id + } + + // Set property "ImmutabilityPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ImmutabilityPolicy != nil { + var immutabilityPolicy1 ImmutabilityPolicyProperties_STATUS + err := immutabilityPolicy1.PopulateFromARM(owner, *typedInput.Properties.ImmutabilityPolicy) + if err != nil { + return err + } + immutabilityPolicy := immutabilityPolicy1 + container.ImmutabilityPolicy = &immutabilityPolicy + } + } + + // Set property "ImmutableStorageWithVersioning": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning1 ImmutableStorageWithVersioning_STATUS + err := immutableStorageWithVersioning1.PopulateFromARM(owner, *typedInput.Properties.ImmutableStorageWithVersioning) + if err != nil { + return err + } + immutableStorageWithVersioning := immutableStorageWithVersioning1 + container.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } + } + + // Set property "LastModifiedTime": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LastModifiedTime != nil { + lastModifiedTime := *typedInput.Properties.LastModifiedTime + container.LastModifiedTime = &lastModifiedTime + } + } + + // Set property "LeaseDuration": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LeaseDuration != nil { + leaseDuration := *typedInput.Properties.LeaseDuration + container.LeaseDuration = &leaseDuration + } + } + + // Set property "LeaseState": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LeaseState != nil { + leaseState := *typedInput.Properties.LeaseState + container.LeaseState = &leaseState + } + } + + // Set property "LeaseStatus": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LeaseStatus != nil { + leaseStatus := *typedInput.Properties.LeaseStatus + container.LeaseStatus = &leaseStatus + } + } + + // Set property "LegalHold": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LegalHold != nil { + var legalHold1 LegalHoldProperties_STATUS + err := legalHold1.PopulateFromARM(owner, *typedInput.Properties.LegalHold) + if err != nil { + return err + } + legalHold := legalHold1 + container.LegalHold = &legalHold + } + } + + // Set property "Metadata": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Metadata != nil { + container.Metadata = make(map[string]string, len(typedInput.Properties.Metadata)) + for key, value := range typedInput.Properties.Metadata { + container.Metadata[key] = value + } + } + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + container.Name = &name + } + + // Set property "PublicAccess": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.PublicAccess != nil { + publicAccess := *typedInput.Properties.PublicAccess + container.PublicAccess = &publicAccess + } + } + + // Set property "RemainingRetentionDays": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.RemainingRetentionDays != nil { + remainingRetentionDays := *typedInput.Properties.RemainingRetentionDays + container.RemainingRetentionDays = &remainingRetentionDays + } + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + container.Type = &typeVar + } + + // Set property "Version": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Version != nil { + version := *typedInput.Properties.Version + container.Version = &version + } + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS populates our StorageAccounts_BlobServices_Container_STATUS from the provided source StorageAccounts_BlobServices_Container_STATUS +func (container *StorageAccounts_BlobServices_Container_STATUS) AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS(source *v20230101s.StorageAccounts_BlobServices_Container_STATUS) error { + + // Conditions + container.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // DefaultEncryptionScope + container.DefaultEncryptionScope = genruntime.ClonePointerToString(source.DefaultEncryptionScope) + + // Deleted + if source.Deleted != nil { + deleted := *source.Deleted + container.Deleted = &deleted + } else { + container.Deleted = nil + } + + // DeletedTime + container.DeletedTime = genruntime.ClonePointerToString(source.DeletedTime) + + // DenyEncryptionScopeOverride + if source.DenyEncryptionScopeOverride != nil { + denyEncryptionScopeOverride := *source.DenyEncryptionScopeOverride + container.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride + } else { + container.DenyEncryptionScopeOverride = nil + } + + // EnableNfsV3AllSquash + if source.EnableNfsV3AllSquash != nil { + enableNfsV3AllSquash := *source.EnableNfsV3AllSquash + container.EnableNfsV3AllSquash = &enableNfsV3AllSquash + } else { + container.EnableNfsV3AllSquash = nil + } + + // EnableNfsV3RootSquash + if source.EnableNfsV3RootSquash != nil { + enableNfsV3RootSquash := *source.EnableNfsV3RootSquash + container.EnableNfsV3RootSquash = &enableNfsV3RootSquash + } else { + container.EnableNfsV3RootSquash = nil + } + + // Etag + container.Etag = genruntime.ClonePointerToString(source.Etag) + + // HasImmutabilityPolicy + if source.HasImmutabilityPolicy != nil { + hasImmutabilityPolicy := *source.HasImmutabilityPolicy + container.HasImmutabilityPolicy = &hasImmutabilityPolicy + } else { + container.HasImmutabilityPolicy = nil + } + + // HasLegalHold + if source.HasLegalHold != nil { + hasLegalHold := *source.HasLegalHold + container.HasLegalHold = &hasLegalHold + } else { + container.HasLegalHold = nil + } + + // Id + container.Id = genruntime.ClonePointerToString(source.Id) + + // ImmutabilityPolicy + if source.ImmutabilityPolicy != nil { + var immutabilityPolicy ImmutabilityPolicyProperties_STATUS + err := immutabilityPolicy.AssignProperties_From_ImmutabilityPolicyProperties_STATUS(source.ImmutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ImmutabilityPolicyProperties_STATUS() to populate field ImmutabilityPolicy") + } + container.ImmutabilityPolicy = &immutabilityPolicy + } else { + container.ImmutabilityPolicy = nil + } + + // ImmutableStorageWithVersioning + if source.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning ImmutableStorageWithVersioning_STATUS + err := immutableStorageWithVersioning.AssignProperties_From_ImmutableStorageWithVersioning_STATUS(source.ImmutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ImmutableStorageWithVersioning_STATUS() to populate field ImmutableStorageWithVersioning") + } + container.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + container.ImmutableStorageWithVersioning = nil + } + + // LastModifiedTime + container.LastModifiedTime = genruntime.ClonePointerToString(source.LastModifiedTime) + + // LeaseDuration + if source.LeaseDuration != nil { + leaseDuration := ContainerProperties_LeaseDuration_STATUS(*source.LeaseDuration) + container.LeaseDuration = &leaseDuration + } else { + container.LeaseDuration = nil + } + + // LeaseState + if source.LeaseState != nil { + leaseState := ContainerProperties_LeaseState_STATUS(*source.LeaseState) + container.LeaseState = &leaseState + } else { + container.LeaseState = nil + } + + // LeaseStatus + if source.LeaseStatus != nil { + leaseStatus := ContainerProperties_LeaseStatus_STATUS(*source.LeaseStatus) + container.LeaseStatus = &leaseStatus + } else { + container.LeaseStatus = nil + } + + // LegalHold + if source.LegalHold != nil { + var legalHold LegalHoldProperties_STATUS + err := legalHold.AssignProperties_From_LegalHoldProperties_STATUS(source.LegalHold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_LegalHoldProperties_STATUS() to populate field LegalHold") + } + container.LegalHold = &legalHold + } else { + container.LegalHold = nil + } + + // Metadata + container.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // Name + container.Name = genruntime.ClonePointerToString(source.Name) + + // PublicAccess + if source.PublicAccess != nil { + publicAccess := ContainerProperties_PublicAccess_STATUS(*source.PublicAccess) + container.PublicAccess = &publicAccess + } else { + container.PublicAccess = nil + } + + // RemainingRetentionDays + container.RemainingRetentionDays = genruntime.ClonePointerToInt(source.RemainingRetentionDays) + + // Type + container.Type = genruntime.ClonePointerToString(source.Type) + + // Version + container.Version = genruntime.ClonePointerToString(source.Version) + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS populates the provided destination StorageAccounts_BlobServices_Container_STATUS from our StorageAccounts_BlobServices_Container_STATUS +func (container *StorageAccounts_BlobServices_Container_STATUS) AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS(destination *v20230101s.StorageAccounts_BlobServices_Container_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(container.Conditions) + + // DefaultEncryptionScope + destination.DefaultEncryptionScope = genruntime.ClonePointerToString(container.DefaultEncryptionScope) + + // Deleted + if container.Deleted != nil { + deleted := *container.Deleted + destination.Deleted = &deleted + } else { + destination.Deleted = nil + } + + // DeletedTime + destination.DeletedTime = genruntime.ClonePointerToString(container.DeletedTime) + + // DenyEncryptionScopeOverride + if container.DenyEncryptionScopeOverride != nil { + denyEncryptionScopeOverride := *container.DenyEncryptionScopeOverride + destination.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride + } else { + destination.DenyEncryptionScopeOverride = nil + } + + // EnableNfsV3AllSquash + if container.EnableNfsV3AllSquash != nil { + enableNfsV3AllSquash := *container.EnableNfsV3AllSquash + destination.EnableNfsV3AllSquash = &enableNfsV3AllSquash + } else { + destination.EnableNfsV3AllSquash = nil + } + + // EnableNfsV3RootSquash + if container.EnableNfsV3RootSquash != nil { + enableNfsV3RootSquash := *container.EnableNfsV3RootSquash + destination.EnableNfsV3RootSquash = &enableNfsV3RootSquash + } else { + destination.EnableNfsV3RootSquash = nil + } + + // Etag + destination.Etag = genruntime.ClonePointerToString(container.Etag) + + // HasImmutabilityPolicy + if container.HasImmutabilityPolicy != nil { + hasImmutabilityPolicy := *container.HasImmutabilityPolicy + destination.HasImmutabilityPolicy = &hasImmutabilityPolicy + } else { + destination.HasImmutabilityPolicy = nil + } + + // HasLegalHold + if container.HasLegalHold != nil { + hasLegalHold := *container.HasLegalHold + destination.HasLegalHold = &hasLegalHold + } else { + destination.HasLegalHold = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(container.Id) + + // ImmutabilityPolicy + if container.ImmutabilityPolicy != nil { + var immutabilityPolicy v20230101s.ImmutabilityPolicyProperties_STATUS + err := container.ImmutabilityPolicy.AssignProperties_To_ImmutabilityPolicyProperties_STATUS(&immutabilityPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ImmutabilityPolicyProperties_STATUS() to populate field ImmutabilityPolicy") + } + destination.ImmutabilityPolicy = &immutabilityPolicy + } else { + destination.ImmutabilityPolicy = nil + } + + // ImmutableStorageWithVersioning + if container.ImmutableStorageWithVersioning != nil { + var immutableStorageWithVersioning v20230101s.ImmutableStorageWithVersioning_STATUS + err := container.ImmutableStorageWithVersioning.AssignProperties_To_ImmutableStorageWithVersioning_STATUS(&immutableStorageWithVersioning) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ImmutableStorageWithVersioning_STATUS() to populate field ImmutableStorageWithVersioning") + } + destination.ImmutableStorageWithVersioning = &immutableStorageWithVersioning + } else { + destination.ImmutableStorageWithVersioning = nil + } + + // LastModifiedTime + destination.LastModifiedTime = genruntime.ClonePointerToString(container.LastModifiedTime) + + // LeaseDuration + if container.LeaseDuration != nil { + leaseDuration := string(*container.LeaseDuration) + destination.LeaseDuration = &leaseDuration + } else { + destination.LeaseDuration = nil + } + + // LeaseState + if container.LeaseState != nil { + leaseState := string(*container.LeaseState) + destination.LeaseState = &leaseState + } else { + destination.LeaseState = nil + } + + // LeaseStatus + if container.LeaseStatus != nil { + leaseStatus := string(*container.LeaseStatus) + destination.LeaseStatus = &leaseStatus + } else { + destination.LeaseStatus = nil + } + + // LegalHold + if container.LegalHold != nil { + var legalHold v20230101s.LegalHoldProperties_STATUS + err := container.LegalHold.AssignProperties_To_LegalHoldProperties_STATUS(&legalHold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_LegalHoldProperties_STATUS() to populate field LegalHold") + } + destination.LegalHold = &legalHold + } else { + destination.LegalHold = nil + } + + // Metadata + destination.Metadata = genruntime.CloneMapOfStringToString(container.Metadata) + + // Name + destination.Name = genruntime.ClonePointerToString(container.Name) + + // PublicAccess + if container.PublicAccess != nil { + publicAccess := string(*container.PublicAccess) + destination.PublicAccess = &publicAccess + } else { + destination.PublicAccess = nil + } + + // RemainingRetentionDays + destination.RemainingRetentionDays = genruntime.ClonePointerToInt(container.RemainingRetentionDays) + + // Type + destination.Type = genruntime.ClonePointerToString(container.Type) + + // Version + destination.Version = genruntime.ClonePointerToString(container.Version) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type ContainerProperties_LeaseDuration_STATUS string + +const ( + ContainerProperties_LeaseDuration_STATUS_Fixed = ContainerProperties_LeaseDuration_STATUS("Fixed") + ContainerProperties_LeaseDuration_STATUS_Infinite = ContainerProperties_LeaseDuration_STATUS("Infinite") +) + +type ContainerProperties_LeaseState_STATUS string + +const ( + ContainerProperties_LeaseState_STATUS_Available = ContainerProperties_LeaseState_STATUS("Available") + ContainerProperties_LeaseState_STATUS_Breaking = ContainerProperties_LeaseState_STATUS("Breaking") + ContainerProperties_LeaseState_STATUS_Broken = ContainerProperties_LeaseState_STATUS("Broken") + ContainerProperties_LeaseState_STATUS_Expired = ContainerProperties_LeaseState_STATUS("Expired") + ContainerProperties_LeaseState_STATUS_Leased = ContainerProperties_LeaseState_STATUS("Leased") +) + +type ContainerProperties_LeaseStatus_STATUS string + +const ( + ContainerProperties_LeaseStatus_STATUS_Locked = ContainerProperties_LeaseStatus_STATUS("Locked") + ContainerProperties_LeaseStatus_STATUS_Unlocked = ContainerProperties_LeaseStatus_STATUS("Unlocked") +) + +// +kubebuilder:validation:Enum={"Blob","Container","None"} +type ContainerProperties_PublicAccess string + +const ( + ContainerProperties_PublicAccess_Blob = ContainerProperties_PublicAccess("Blob") + ContainerProperties_PublicAccess_Container = ContainerProperties_PublicAccess("Container") + ContainerProperties_PublicAccess_None = ContainerProperties_PublicAccess("None") +) + +type ContainerProperties_PublicAccess_STATUS string + +const ( + ContainerProperties_PublicAccess_STATUS_Blob = ContainerProperties_PublicAccess_STATUS("Blob") + ContainerProperties_PublicAccess_STATUS_Container = ContainerProperties_PublicAccess_STATUS("Container") + ContainerProperties_PublicAccess_STATUS_None = ContainerProperties_PublicAccess_STATUS("None") +) + +// The properties of an ImmutabilityPolicy of a blob container. +type ImmutabilityPolicyProperties_STATUS struct { + // AllowProtectedAppendWrites: This property can only be changed for unlocked time-based retention policies. When enabled, + // new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks + // can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with + // ExtendImmutabilityPolicy API. + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + + // AllowProtectedAppendWritesAll: This property can only be changed for unlocked time-based retention policies. When + // enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and + // compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be + // changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' + // properties are mutually exclusive. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + + // Etag: ImmutabilityPolicy Etag. + Etag *string `json:"etag,omitempty"` + + // ImmutabilityPeriodSinceCreationInDays: The immutability period for the blobs in the container since the policy creation, + // in days. + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + + // State: The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. + State *ImmutabilityPolicyProperty_State_STATUS `json:"state,omitempty"` + + // UpdateHistory: The ImmutabilityPolicy update history of the blob container. + UpdateHistory []UpdateHistoryProperty_STATUS `json:"updateHistory,omitempty"` +} + +var _ genruntime.FromARMConverter = &ImmutabilityPolicyProperties_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *ImmutabilityPolicyProperties_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ImmutabilityPolicyProperties_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *ImmutabilityPolicyProperties_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ImmutabilityPolicyProperties_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ImmutabilityPolicyProperties_STATUS_ARM, got %T", armInput) + } + + // Set property "AllowProtectedAppendWrites": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrites := *typedInput.Properties.AllowProtectedAppendWrites + properties.AllowProtectedAppendWrites = &allowProtectedAppendWrites + } + } + + // Set property "AllowProtectedAppendWritesAll": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *typedInput.Properties.AllowProtectedAppendWritesAll + properties.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } + } + + // Set property "Etag": + if typedInput.Etag != nil { + etag := *typedInput.Etag + properties.Etag = &etag + } + + // Set property "ImmutabilityPeriodSinceCreationInDays": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ImmutabilityPeriodSinceCreationInDays != nil { + immutabilityPeriodSinceCreationInDays := *typedInput.Properties.ImmutabilityPeriodSinceCreationInDays + properties.ImmutabilityPeriodSinceCreationInDays = &immutabilityPeriodSinceCreationInDays + } + } + + // Set property "State": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.State != nil { + state := *typedInput.Properties.State + properties.State = &state + } + } + + // Set property "UpdateHistory": + for _, item := range typedInput.UpdateHistory { + var item1 UpdateHistoryProperty_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + properties.UpdateHistory = append(properties.UpdateHistory, item1) + } + + // No error + return nil +} + +// AssignProperties_From_ImmutabilityPolicyProperties_STATUS populates our ImmutabilityPolicyProperties_STATUS from the provided source ImmutabilityPolicyProperties_STATUS +func (properties *ImmutabilityPolicyProperties_STATUS) AssignProperties_From_ImmutabilityPolicyProperties_STATUS(source *v20230101s.ImmutabilityPolicyProperties_STATUS) error { + + // AllowProtectedAppendWrites + if source.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *source.AllowProtectedAppendWrites + properties.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + properties.AllowProtectedAppendWrites = nil + } + + // AllowProtectedAppendWritesAll + if source.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *source.AllowProtectedAppendWritesAll + properties.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } else { + properties.AllowProtectedAppendWritesAll = nil + } + + // Etag + properties.Etag = genruntime.ClonePointerToString(source.Etag) + + // ImmutabilityPeriodSinceCreationInDays + properties.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(source.ImmutabilityPeriodSinceCreationInDays) + + // State + if source.State != nil { + state := ImmutabilityPolicyProperty_State_STATUS(*source.State) + properties.State = &state + } else { + properties.State = nil + } + + // UpdateHistory + if source.UpdateHistory != nil { + updateHistoryList := make([]UpdateHistoryProperty_STATUS, len(source.UpdateHistory)) + for updateHistoryIndex, updateHistoryItem := range source.UpdateHistory { + // Shadow the loop variable to avoid aliasing + updateHistoryItem := updateHistoryItem + var updateHistory UpdateHistoryProperty_STATUS + err := updateHistory.AssignProperties_From_UpdateHistoryProperty_STATUS(&updateHistoryItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_UpdateHistoryProperty_STATUS() to populate field UpdateHistory") + } + updateHistoryList[updateHistoryIndex] = updateHistory + } + properties.UpdateHistory = updateHistoryList + } else { + properties.UpdateHistory = nil + } + + // No error + return nil +} + +// AssignProperties_To_ImmutabilityPolicyProperties_STATUS populates the provided destination ImmutabilityPolicyProperties_STATUS from our ImmutabilityPolicyProperties_STATUS +func (properties *ImmutabilityPolicyProperties_STATUS) AssignProperties_To_ImmutabilityPolicyProperties_STATUS(destination *v20230101s.ImmutabilityPolicyProperties_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AllowProtectedAppendWrites + if properties.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *properties.AllowProtectedAppendWrites + destination.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + destination.AllowProtectedAppendWrites = nil + } + + // AllowProtectedAppendWritesAll + if properties.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *properties.AllowProtectedAppendWritesAll + destination.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } else { + destination.AllowProtectedAppendWritesAll = nil + } + + // Etag + destination.Etag = genruntime.ClonePointerToString(properties.Etag) + + // ImmutabilityPeriodSinceCreationInDays + destination.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(properties.ImmutabilityPeriodSinceCreationInDays) + + // State + if properties.State != nil { + state := string(*properties.State) + destination.State = &state + } else { + destination.State = nil + } + + // UpdateHistory + if properties.UpdateHistory != nil { + updateHistoryList := make([]v20230101s.UpdateHistoryProperty_STATUS, len(properties.UpdateHistory)) + for updateHistoryIndex, updateHistoryItem := range properties.UpdateHistory { + // Shadow the loop variable to avoid aliasing + updateHistoryItem := updateHistoryItem + var updateHistory v20230101s.UpdateHistoryProperty_STATUS + err := updateHistoryItem.AssignProperties_To_UpdateHistoryProperty_STATUS(&updateHistory) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_UpdateHistoryProperty_STATUS() to populate field UpdateHistory") + } + updateHistoryList[updateHistoryIndex] = updateHistory + } + destination.UpdateHistory = updateHistoryList + } else { + destination.UpdateHistory = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Object level immutability properties of the container. +type ImmutableStorageWithVersioning struct { + // Enabled: This is an immutable property, when set to true it enables object level immutability at the container level. + Enabled *bool `json:"enabled,omitempty"` +} + +var _ genruntime.ARMTransformer = &ImmutableStorageWithVersioning{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (versioning *ImmutableStorageWithVersioning) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if versioning == nil { + return nil, nil + } + result := &ImmutableStorageWithVersioning_ARM{} + + // Set property "Enabled": + if versioning.Enabled != nil { + enabled := *versioning.Enabled + result.Enabled = &enabled + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (versioning *ImmutableStorageWithVersioning) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ImmutableStorageWithVersioning_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (versioning *ImmutableStorageWithVersioning) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ImmutableStorageWithVersioning_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ImmutableStorageWithVersioning_ARM, got %T", armInput) + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + versioning.Enabled = &enabled + } + + // No error + return nil +} + +// AssignProperties_From_ImmutableStorageWithVersioning populates our ImmutableStorageWithVersioning from the provided source ImmutableStorageWithVersioning +func (versioning *ImmutableStorageWithVersioning) AssignProperties_From_ImmutableStorageWithVersioning(source *v20230101s.ImmutableStorageWithVersioning) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + versioning.Enabled = &enabled + } else { + versioning.Enabled = nil + } + + // No error + return nil +} + +// AssignProperties_To_ImmutableStorageWithVersioning populates the provided destination ImmutableStorageWithVersioning from our ImmutableStorageWithVersioning +func (versioning *ImmutableStorageWithVersioning) AssignProperties_To_ImmutableStorageWithVersioning(destination *v20230101s.ImmutableStorageWithVersioning) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Enabled + if versioning.Enabled != nil { + enabled := *versioning.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ImmutableStorageWithVersioning_STATUS populates our ImmutableStorageWithVersioning from the provided source ImmutableStorageWithVersioning_STATUS +func (versioning *ImmutableStorageWithVersioning) Initialize_From_ImmutableStorageWithVersioning_STATUS(source *ImmutableStorageWithVersioning_STATUS) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + versioning.Enabled = &enabled + } else { + versioning.Enabled = nil + } + + // No error + return nil +} + +// Object level immutability properties of the container. +type ImmutableStorageWithVersioning_STATUS struct { + // Enabled: This is an immutable property, when set to true it enables object level immutability at the container level. + Enabled *bool `json:"enabled,omitempty"` + + // MigrationState: This property denotes the container level immutability to object level immutability migration state. + MigrationState *ImmutableStorageWithVersioning_MigrationState_STATUS `json:"migrationState,omitempty"` + + // TimeStamp: Returns the date and time the object level immutability was enabled. + TimeStamp *string `json:"timeStamp,omitempty"` +} + +var _ genruntime.FromARMConverter = &ImmutableStorageWithVersioning_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (versioning *ImmutableStorageWithVersioning_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ImmutableStorageWithVersioning_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (versioning *ImmutableStorageWithVersioning_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ImmutableStorageWithVersioning_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ImmutableStorageWithVersioning_STATUS_ARM, got %T", armInput) + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + versioning.Enabled = &enabled + } + + // Set property "MigrationState": + if typedInput.MigrationState != nil { + migrationState := *typedInput.MigrationState + versioning.MigrationState = &migrationState + } + + // Set property "TimeStamp": + if typedInput.TimeStamp != nil { + timeStamp := *typedInput.TimeStamp + versioning.TimeStamp = &timeStamp + } + + // No error + return nil +} + +// AssignProperties_From_ImmutableStorageWithVersioning_STATUS populates our ImmutableStorageWithVersioning_STATUS from the provided source ImmutableStorageWithVersioning_STATUS +func (versioning *ImmutableStorageWithVersioning_STATUS) AssignProperties_From_ImmutableStorageWithVersioning_STATUS(source *v20230101s.ImmutableStorageWithVersioning_STATUS) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + versioning.Enabled = &enabled + } else { + versioning.Enabled = nil + } + + // MigrationState + if source.MigrationState != nil { + migrationState := ImmutableStorageWithVersioning_MigrationState_STATUS(*source.MigrationState) + versioning.MigrationState = &migrationState + } else { + versioning.MigrationState = nil + } + + // TimeStamp + versioning.TimeStamp = genruntime.ClonePointerToString(source.TimeStamp) + + // No error + return nil +} + +// AssignProperties_To_ImmutableStorageWithVersioning_STATUS populates the provided destination ImmutableStorageWithVersioning_STATUS from our ImmutableStorageWithVersioning_STATUS +func (versioning *ImmutableStorageWithVersioning_STATUS) AssignProperties_To_ImmutableStorageWithVersioning_STATUS(destination *v20230101s.ImmutableStorageWithVersioning_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Enabled + if versioning.Enabled != nil { + enabled := *versioning.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // MigrationState + if versioning.MigrationState != nil { + migrationState := string(*versioning.MigrationState) + destination.MigrationState = &migrationState + } else { + destination.MigrationState = nil + } + + // TimeStamp + destination.TimeStamp = genruntime.ClonePointerToString(versioning.TimeStamp) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The LegalHold property of a blob container. +type LegalHoldProperties_STATUS struct { + // HasLegalHold: The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The + // hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a + // maximum of 1000 blob containers with hasLegalHold=true for a given account. + HasLegalHold *bool `json:"hasLegalHold,omitempty"` + + // ProtectedAppendWritesHistory: Protected append blob writes history. + ProtectedAppendWritesHistory *ProtectedAppendWritesHistory_STATUS `json:"protectedAppendWritesHistory,omitempty"` + + // Tags: The list of LegalHold tags of a blob container. + Tags []TagProperty_STATUS `json:"tags,omitempty"` +} + +var _ genruntime.FromARMConverter = &LegalHoldProperties_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *LegalHoldProperties_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &LegalHoldProperties_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *LegalHoldProperties_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(LegalHoldProperties_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected LegalHoldProperties_STATUS_ARM, got %T", armInput) + } + + // Set property "HasLegalHold": + if typedInput.HasLegalHold != nil { + hasLegalHold := *typedInput.HasLegalHold + properties.HasLegalHold = &hasLegalHold + } + + // Set property "ProtectedAppendWritesHistory": + if typedInput.ProtectedAppendWritesHistory != nil { + var protectedAppendWritesHistory1 ProtectedAppendWritesHistory_STATUS + err := protectedAppendWritesHistory1.PopulateFromARM(owner, *typedInput.ProtectedAppendWritesHistory) + if err != nil { + return err + } + protectedAppendWritesHistory := protectedAppendWritesHistory1 + properties.ProtectedAppendWritesHistory = &protectedAppendWritesHistory + } + + // Set property "Tags": + for _, item := range typedInput.Tags { + var item1 TagProperty_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + properties.Tags = append(properties.Tags, item1) + } + + // No error + return nil +} + +// AssignProperties_From_LegalHoldProperties_STATUS populates our LegalHoldProperties_STATUS from the provided source LegalHoldProperties_STATUS +func (properties *LegalHoldProperties_STATUS) AssignProperties_From_LegalHoldProperties_STATUS(source *v20230101s.LegalHoldProperties_STATUS) error { + + // HasLegalHold + if source.HasLegalHold != nil { + hasLegalHold := *source.HasLegalHold + properties.HasLegalHold = &hasLegalHold + } else { + properties.HasLegalHold = nil + } + + // ProtectedAppendWritesHistory + if source.ProtectedAppendWritesHistory != nil { + var protectedAppendWritesHistory ProtectedAppendWritesHistory_STATUS + err := protectedAppendWritesHistory.AssignProperties_From_ProtectedAppendWritesHistory_STATUS(source.ProtectedAppendWritesHistory) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ProtectedAppendWritesHistory_STATUS() to populate field ProtectedAppendWritesHistory") + } + properties.ProtectedAppendWritesHistory = &protectedAppendWritesHistory + } else { + properties.ProtectedAppendWritesHistory = nil + } + + // Tags + if source.Tags != nil { + tagList := make([]TagProperty_STATUS, len(source.Tags)) + for tagIndex, tagItem := range source.Tags { + // Shadow the loop variable to avoid aliasing + tagItem := tagItem + var tag TagProperty_STATUS + err := tag.AssignProperties_From_TagProperty_STATUS(&tagItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TagProperty_STATUS() to populate field Tags") + } + tagList[tagIndex] = tag + } + properties.Tags = tagList + } else { + properties.Tags = nil + } + + // No error + return nil +} + +// AssignProperties_To_LegalHoldProperties_STATUS populates the provided destination LegalHoldProperties_STATUS from our LegalHoldProperties_STATUS +func (properties *LegalHoldProperties_STATUS) AssignProperties_To_LegalHoldProperties_STATUS(destination *v20230101s.LegalHoldProperties_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // HasLegalHold + if properties.HasLegalHold != nil { + hasLegalHold := *properties.HasLegalHold + destination.HasLegalHold = &hasLegalHold + } else { + destination.HasLegalHold = nil + } + + // ProtectedAppendWritesHistory + if properties.ProtectedAppendWritesHistory != nil { + var protectedAppendWritesHistory v20230101s.ProtectedAppendWritesHistory_STATUS + err := properties.ProtectedAppendWritesHistory.AssignProperties_To_ProtectedAppendWritesHistory_STATUS(&protectedAppendWritesHistory) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ProtectedAppendWritesHistory_STATUS() to populate field ProtectedAppendWritesHistory") + } + destination.ProtectedAppendWritesHistory = &protectedAppendWritesHistory + } else { + destination.ProtectedAppendWritesHistory = nil + } + + // Tags + if properties.Tags != nil { + tagList := make([]v20230101s.TagProperty_STATUS, len(properties.Tags)) + for tagIndex, tagItem := range properties.Tags { + // Shadow the loop variable to avoid aliasing + tagItem := tagItem + var tag v20230101s.TagProperty_STATUS + err := tagItem.AssignProperties_To_TagProperty_STATUS(&tag) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TagProperty_STATUS() to populate field Tags") + } + tagList[tagIndex] = tag + } + destination.Tags = tagList + } else { + destination.Tags = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type ImmutabilityPolicyProperty_State_STATUS string + +const ( + ImmutabilityPolicyProperty_State_STATUS_Locked = ImmutabilityPolicyProperty_State_STATUS("Locked") + ImmutabilityPolicyProperty_State_STATUS_Unlocked = ImmutabilityPolicyProperty_State_STATUS("Unlocked") +) + +type ImmutableStorageWithVersioning_MigrationState_STATUS string + +const ( + ImmutableStorageWithVersioning_MigrationState_STATUS_Completed = ImmutableStorageWithVersioning_MigrationState_STATUS("Completed") + ImmutableStorageWithVersioning_MigrationState_STATUS_InProgress = ImmutableStorageWithVersioning_MigrationState_STATUS("InProgress") +) + +// Protected append writes history setting for the blob container with Legal holds. +type ProtectedAppendWritesHistory_STATUS struct { + // AllowProtectedAppendWritesAll: When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining + // legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + + // Timestamp: Returns the date and time the tag was added. + Timestamp *string `json:"timestamp,omitempty"` +} + +var _ genruntime.FromARMConverter = &ProtectedAppendWritesHistory_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (history *ProtectedAppendWritesHistory_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ProtectedAppendWritesHistory_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (history *ProtectedAppendWritesHistory_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ProtectedAppendWritesHistory_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ProtectedAppendWritesHistory_STATUS_ARM, got %T", armInput) + } + + // Set property "AllowProtectedAppendWritesAll": + if typedInput.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *typedInput.AllowProtectedAppendWritesAll + history.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } + + // Set property "Timestamp": + if typedInput.Timestamp != nil { + timestamp := *typedInput.Timestamp + history.Timestamp = ×tamp + } + + // No error + return nil +} + +// AssignProperties_From_ProtectedAppendWritesHistory_STATUS populates our ProtectedAppendWritesHistory_STATUS from the provided source ProtectedAppendWritesHistory_STATUS +func (history *ProtectedAppendWritesHistory_STATUS) AssignProperties_From_ProtectedAppendWritesHistory_STATUS(source *v20230101s.ProtectedAppendWritesHistory_STATUS) error { + + // AllowProtectedAppendWritesAll + if source.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *source.AllowProtectedAppendWritesAll + history.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } else { + history.AllowProtectedAppendWritesAll = nil + } + + // Timestamp + history.Timestamp = genruntime.ClonePointerToString(source.Timestamp) + + // No error + return nil +} + +// AssignProperties_To_ProtectedAppendWritesHistory_STATUS populates the provided destination ProtectedAppendWritesHistory_STATUS from our ProtectedAppendWritesHistory_STATUS +func (history *ProtectedAppendWritesHistory_STATUS) AssignProperties_To_ProtectedAppendWritesHistory_STATUS(destination *v20230101s.ProtectedAppendWritesHistory_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AllowProtectedAppendWritesAll + if history.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *history.AllowProtectedAppendWritesAll + destination.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } else { + destination.AllowProtectedAppendWritesAll = nil + } + + // Timestamp + destination.Timestamp = genruntime.ClonePointerToString(history.Timestamp) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// A tag of the LegalHold of a blob container. +type TagProperty_STATUS struct { + // ObjectIdentifier: Returns the Object ID of the user who added the tag. + ObjectIdentifier *string `json:"objectIdentifier,omitempty"` + + // Tag: The tag value. + Tag *string `json:"tag,omitempty"` + + // TenantId: Returns the Tenant ID that issued the token for the user who added the tag. + TenantId *string `json:"tenantId,omitempty"` + + // Timestamp: Returns the date and time the tag was added. + Timestamp *string `json:"timestamp,omitempty"` + + // Upn: Returns the User Principal Name of the user who added the tag. + Upn *string `json:"upn,omitempty"` +} + +var _ genruntime.FromARMConverter = &TagProperty_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (property *TagProperty_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &TagProperty_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (property *TagProperty_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(TagProperty_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected TagProperty_STATUS_ARM, got %T", armInput) + } + + // Set property "ObjectIdentifier": + if typedInput.ObjectIdentifier != nil { + objectIdentifier := *typedInput.ObjectIdentifier + property.ObjectIdentifier = &objectIdentifier + } + + // Set property "Tag": + if typedInput.Tag != nil { + tag := *typedInput.Tag + property.Tag = &tag + } + + // Set property "TenantId": + if typedInput.TenantId != nil { + tenantId := *typedInput.TenantId + property.TenantId = &tenantId + } + + // Set property "Timestamp": + if typedInput.Timestamp != nil { + timestamp := *typedInput.Timestamp + property.Timestamp = ×tamp + } + + // Set property "Upn": + if typedInput.Upn != nil { + upn := *typedInput.Upn + property.Upn = &upn + } + + // No error + return nil +} + +// AssignProperties_From_TagProperty_STATUS populates our TagProperty_STATUS from the provided source TagProperty_STATUS +func (property *TagProperty_STATUS) AssignProperties_From_TagProperty_STATUS(source *v20230101s.TagProperty_STATUS) error { + + // ObjectIdentifier + property.ObjectIdentifier = genruntime.ClonePointerToString(source.ObjectIdentifier) + + // Tag + property.Tag = genruntime.ClonePointerToString(source.Tag) + + // TenantId + property.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // Timestamp + property.Timestamp = genruntime.ClonePointerToString(source.Timestamp) + + // Upn + property.Upn = genruntime.ClonePointerToString(source.Upn) + + // No error + return nil +} + +// AssignProperties_To_TagProperty_STATUS populates the provided destination TagProperty_STATUS from our TagProperty_STATUS +func (property *TagProperty_STATUS) AssignProperties_To_TagProperty_STATUS(destination *v20230101s.TagProperty_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ObjectIdentifier + destination.ObjectIdentifier = genruntime.ClonePointerToString(property.ObjectIdentifier) + + // Tag + destination.Tag = genruntime.ClonePointerToString(property.Tag) + + // TenantId + destination.TenantId = genruntime.ClonePointerToString(property.TenantId) + + // Timestamp + destination.Timestamp = genruntime.ClonePointerToString(property.Timestamp) + + // Upn + destination.Upn = genruntime.ClonePointerToString(property.Upn) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// An update history of the ImmutabilityPolicy of a blob container. +type UpdateHistoryProperty_STATUS struct { + // AllowProtectedAppendWrites: This property can only be changed for unlocked time-based retention policies. When enabled, + // new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks + // can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with + // ExtendImmutabilityPolicy API. + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + + // AllowProtectedAppendWritesAll: This property can only be changed for unlocked time-based retention policies. When + // enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and + // compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be + // changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' + // properties are mutually exclusive. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + + // ImmutabilityPeriodSinceCreationInDays: The immutability period for the blobs in the container since the policy creation, + // in days. + ImmutabilityPeriodSinceCreationInDays *int `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + + // ObjectIdentifier: Returns the Object ID of the user who updated the ImmutabilityPolicy. + ObjectIdentifier *string `json:"objectIdentifier,omitempty"` + + // TenantId: Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy. + TenantId *string `json:"tenantId,omitempty"` + + // Timestamp: Returns the date and time the ImmutabilityPolicy was updated. + Timestamp *string `json:"timestamp,omitempty"` + + // Update: The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend. + Update *UpdateHistoryProperty_Update_STATUS `json:"update,omitempty"` + + // Upn: Returns the User Principal Name of the user who updated the ImmutabilityPolicy. + Upn *string `json:"upn,omitempty"` +} + +var _ genruntime.FromARMConverter = &UpdateHistoryProperty_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (property *UpdateHistoryProperty_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &UpdateHistoryProperty_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (property *UpdateHistoryProperty_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(UpdateHistoryProperty_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected UpdateHistoryProperty_STATUS_ARM, got %T", armInput) + } + + // Set property "AllowProtectedAppendWrites": + if typedInput.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrites := *typedInput.AllowProtectedAppendWrites + property.AllowProtectedAppendWrites = &allowProtectedAppendWrites + } + + // Set property "AllowProtectedAppendWritesAll": + if typedInput.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *typedInput.AllowProtectedAppendWritesAll + property.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } + + // Set property "ImmutabilityPeriodSinceCreationInDays": + if typedInput.ImmutabilityPeriodSinceCreationInDays != nil { + immutabilityPeriodSinceCreationInDays := *typedInput.ImmutabilityPeriodSinceCreationInDays + property.ImmutabilityPeriodSinceCreationInDays = &immutabilityPeriodSinceCreationInDays + } + + // Set property "ObjectIdentifier": + if typedInput.ObjectIdentifier != nil { + objectIdentifier := *typedInput.ObjectIdentifier + property.ObjectIdentifier = &objectIdentifier + } + + // Set property "TenantId": + if typedInput.TenantId != nil { + tenantId := *typedInput.TenantId + property.TenantId = &tenantId + } + + // Set property "Timestamp": + if typedInput.Timestamp != nil { + timestamp := *typedInput.Timestamp + property.Timestamp = ×tamp + } + + // Set property "Update": + if typedInput.Update != nil { + update := *typedInput.Update + property.Update = &update + } + + // Set property "Upn": + if typedInput.Upn != nil { + upn := *typedInput.Upn + property.Upn = &upn + } + + // No error + return nil +} + +// AssignProperties_From_UpdateHistoryProperty_STATUS populates our UpdateHistoryProperty_STATUS from the provided source UpdateHistoryProperty_STATUS +func (property *UpdateHistoryProperty_STATUS) AssignProperties_From_UpdateHistoryProperty_STATUS(source *v20230101s.UpdateHistoryProperty_STATUS) error { + + // AllowProtectedAppendWrites + if source.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *source.AllowProtectedAppendWrites + property.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + property.AllowProtectedAppendWrites = nil + } + + // AllowProtectedAppendWritesAll + if source.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *source.AllowProtectedAppendWritesAll + property.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } else { + property.AllowProtectedAppendWritesAll = nil + } + + // ImmutabilityPeriodSinceCreationInDays + property.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(source.ImmutabilityPeriodSinceCreationInDays) + + // ObjectIdentifier + property.ObjectIdentifier = genruntime.ClonePointerToString(source.ObjectIdentifier) + + // TenantId + property.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // Timestamp + property.Timestamp = genruntime.ClonePointerToString(source.Timestamp) + + // Update + if source.Update != nil { + update := UpdateHistoryProperty_Update_STATUS(*source.Update) + property.Update = &update + } else { + property.Update = nil + } + + // Upn + property.Upn = genruntime.ClonePointerToString(source.Upn) + + // No error + return nil +} + +// AssignProperties_To_UpdateHistoryProperty_STATUS populates the provided destination UpdateHistoryProperty_STATUS from our UpdateHistoryProperty_STATUS +func (property *UpdateHistoryProperty_STATUS) AssignProperties_To_UpdateHistoryProperty_STATUS(destination *v20230101s.UpdateHistoryProperty_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AllowProtectedAppendWrites + if property.AllowProtectedAppendWrites != nil { + allowProtectedAppendWrite := *property.AllowProtectedAppendWrites + destination.AllowProtectedAppendWrites = &allowProtectedAppendWrite + } else { + destination.AllowProtectedAppendWrites = nil + } + + // AllowProtectedAppendWritesAll + if property.AllowProtectedAppendWritesAll != nil { + allowProtectedAppendWritesAll := *property.AllowProtectedAppendWritesAll + destination.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll + } else { + destination.AllowProtectedAppendWritesAll = nil + } + + // ImmutabilityPeriodSinceCreationInDays + destination.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(property.ImmutabilityPeriodSinceCreationInDays) + + // ObjectIdentifier + destination.ObjectIdentifier = genruntime.ClonePointerToString(property.ObjectIdentifier) + + // TenantId + destination.TenantId = genruntime.ClonePointerToString(property.TenantId) + + // Timestamp + destination.Timestamp = genruntime.ClonePointerToString(property.Timestamp) + + // Update + if property.Update != nil { + update := string(*property.Update) + destination.Update = &update + } else { + destination.Update = nil + } + + // Upn + destination.Upn = genruntime.ClonePointerToString(property.Upn) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type UpdateHistoryProperty_Update_STATUS string + +const ( + UpdateHistoryProperty_Update_STATUS_Extend = UpdateHistoryProperty_Update_STATUS("extend") + UpdateHistoryProperty_Update_STATUS_Lock = UpdateHistoryProperty_Update_STATUS("lock") + UpdateHistoryProperty_Update_STATUS_Put = UpdateHistoryProperty_Update_STATUS("put") +) + +func init() { + SchemeBuilder.Register(&StorageAccountsBlobServicesContainer{}, &StorageAccountsBlobServicesContainerList{}) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_types_gen_test.go new file mode 100644 index 00000000000..f409dcda16d --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_types_gen_test.go @@ -0,0 +1,1199 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsBlobServicesContainer_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsBlobServicesContainer to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsBlobServicesContainer, StorageAccountsBlobServicesContainerGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsBlobServicesContainer tests if a specific instance of StorageAccountsBlobServicesContainer round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsBlobServicesContainer(subject StorageAccountsBlobServicesContainer) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsBlobServicesContainer + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsBlobServicesContainer + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsBlobServicesContainer_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsBlobServicesContainer to StorageAccountsBlobServicesContainer via AssignProperties_To_StorageAccountsBlobServicesContainer & AssignProperties_From_StorageAccountsBlobServicesContainer returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsBlobServicesContainer, StorageAccountsBlobServicesContainerGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsBlobServicesContainer tests if a specific instance of StorageAccountsBlobServicesContainer can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsBlobServicesContainer(subject StorageAccountsBlobServicesContainer) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsBlobServicesContainer + err := copied.AssignProperties_To_StorageAccountsBlobServicesContainer(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsBlobServicesContainer + err = actual.AssignProperties_From_StorageAccountsBlobServicesContainer(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsBlobServicesContainer_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsBlobServicesContainer via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsBlobServicesContainer, StorageAccountsBlobServicesContainerGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsBlobServicesContainer runs a test to see if a specific instance of StorageAccountsBlobServicesContainer round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsBlobServicesContainer(subject StorageAccountsBlobServicesContainer) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsBlobServicesContainer + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsBlobServicesContainer instances for property testing - lazily instantiated by +// StorageAccountsBlobServicesContainerGenerator() +var storageAccountsBlobServicesContainerGenerator gopter.Gen + +// StorageAccountsBlobServicesContainerGenerator returns a generator of StorageAccountsBlobServicesContainer instances for property testing. +func StorageAccountsBlobServicesContainerGenerator() gopter.Gen { + if storageAccountsBlobServicesContainerGenerator != nil { + return storageAccountsBlobServicesContainerGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsBlobServicesContainer(generators) + storageAccountsBlobServicesContainerGenerator = gen.Struct(reflect.TypeOf(StorageAccountsBlobServicesContainer{}), generators) + + return storageAccountsBlobServicesContainerGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsBlobServicesContainer is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsBlobServicesContainer(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_BlobServices_Container_SpecGenerator() + gens["Status"] = StorageAccounts_BlobServices_Container_STATUSGenerator() +} + +func Test_StorageAccounts_BlobServices_Container_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_BlobServices_Container_Spec to StorageAccounts_BlobServices_Container_Spec via AssignProperties_To_StorageAccounts_BlobServices_Container_Spec & AssignProperties_From_StorageAccounts_BlobServices_Container_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_BlobServices_Container_Spec, StorageAccounts_BlobServices_Container_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_BlobServices_Container_Spec tests if a specific instance of StorageAccounts_BlobServices_Container_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_BlobServices_Container_Spec(subject StorageAccounts_BlobServices_Container_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_BlobServices_Container_Spec + err := copied.AssignProperties_To_StorageAccounts_BlobServices_Container_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_BlobServices_Container_Spec + err = actual.AssignProperties_From_StorageAccounts_BlobServices_Container_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_BlobServices_Container_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobServices_Container_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobServices_Container_Spec, StorageAccounts_BlobServices_Container_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobServices_Container_Spec runs a test to see if a specific instance of StorageAccounts_BlobServices_Container_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobServices_Container_Spec(subject StorageAccounts_BlobServices_Container_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobServices_Container_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobServices_Container_Spec instances for property testing - lazily instantiated by +// StorageAccounts_BlobServices_Container_SpecGenerator() +var storageAccounts_BlobServices_Container_SpecGenerator gopter.Gen + +// StorageAccounts_BlobServices_Container_SpecGenerator returns a generator of StorageAccounts_BlobServices_Container_Spec instances for property testing. +// We first initialize storageAccounts_BlobServices_Container_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobServices_Container_SpecGenerator() gopter.Gen { + if storageAccounts_BlobServices_Container_SpecGenerator != nil { + return storageAccounts_BlobServices_Container_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec(generators) + storageAccounts_BlobServices_Container_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobServices_Container_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec(generators) + storageAccounts_BlobServices_Container_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobServices_Container_Spec{}), generators) + + return storageAccounts_BlobServices_Container_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec(gens map[string]gopter.Gen) { + gens["AzureName"] = gen.AlphaString() + gens["DefaultEncryptionScope"] = gen.PtrOf(gen.AlphaString()) + gens["DenyEncryptionScopeOverride"] = gen.PtrOf(gen.Bool()) + gens["EnableNfsV3AllSquash"] = gen.PtrOf(gen.Bool()) + gens["EnableNfsV3RootSquash"] = gen.PtrOf(gen.Bool()) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["PublicAccess"] = gen.PtrOf(gen.OneConstOf(ContainerProperties_PublicAccess_Blob, ContainerProperties_PublicAccess_Container, ContainerProperties_PublicAccess_None)) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_Spec(gens map[string]gopter.Gen) { + gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageWithVersioningGenerator()) +} + +func Test_StorageAccounts_BlobServices_Container_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_BlobServices_Container_STATUS to StorageAccounts_BlobServices_Container_STATUS via AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS & AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_BlobServices_Container_STATUS, StorageAccounts_BlobServices_Container_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_BlobServices_Container_STATUS tests if a specific instance of StorageAccounts_BlobServices_Container_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_BlobServices_Container_STATUS(subject StorageAccounts_BlobServices_Container_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_BlobServices_Container_STATUS + err := copied.AssignProperties_To_StorageAccounts_BlobServices_Container_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_BlobServices_Container_STATUS + err = actual.AssignProperties_From_StorageAccounts_BlobServices_Container_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_BlobServices_Container_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_BlobServices_Container_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_BlobServices_Container_STATUS, StorageAccounts_BlobServices_Container_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_BlobServices_Container_STATUS runs a test to see if a specific instance of StorageAccounts_BlobServices_Container_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_BlobServices_Container_STATUS(subject StorageAccounts_BlobServices_Container_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_BlobServices_Container_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_BlobServices_Container_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_BlobServices_Container_STATUSGenerator() +var storageAccounts_BlobServices_Container_STATUSGenerator gopter.Gen + +// StorageAccounts_BlobServices_Container_STATUSGenerator returns a generator of StorageAccounts_BlobServices_Container_STATUS instances for property testing. +// We first initialize storageAccounts_BlobServices_Container_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_BlobServices_Container_STATUSGenerator() gopter.Gen { + if storageAccounts_BlobServices_Container_STATUSGenerator != nil { + return storageAccounts_BlobServices_Container_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS(generators) + storageAccounts_BlobServices_Container_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobServices_Container_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS(generators) + storageAccounts_BlobServices_Container_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_BlobServices_Container_STATUS{}), generators) + + return storageAccounts_BlobServices_Container_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS(gens map[string]gopter.Gen) { + gens["DefaultEncryptionScope"] = gen.PtrOf(gen.AlphaString()) + gens["Deleted"] = gen.PtrOf(gen.Bool()) + gens["DeletedTime"] = gen.PtrOf(gen.AlphaString()) + gens["DenyEncryptionScopeOverride"] = gen.PtrOf(gen.Bool()) + gens["EnableNfsV3AllSquash"] = gen.PtrOf(gen.Bool()) + gens["EnableNfsV3RootSquash"] = gen.PtrOf(gen.Bool()) + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["HasImmutabilityPolicy"] = gen.PtrOf(gen.Bool()) + gens["HasLegalHold"] = gen.PtrOf(gen.Bool()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedTime"] = gen.PtrOf(gen.AlphaString()) + gens["LeaseDuration"] = gen.PtrOf(gen.OneConstOf(ContainerProperties_LeaseDuration_STATUS_Fixed, ContainerProperties_LeaseDuration_STATUS_Infinite)) + gens["LeaseState"] = gen.PtrOf(gen.OneConstOf( + ContainerProperties_LeaseState_STATUS_Available, + ContainerProperties_LeaseState_STATUS_Breaking, + ContainerProperties_LeaseState_STATUS_Broken, + ContainerProperties_LeaseState_STATUS_Expired, + ContainerProperties_LeaseState_STATUS_Leased)) + gens["LeaseStatus"] = gen.PtrOf(gen.OneConstOf(ContainerProperties_LeaseStatus_STATUS_Locked, ContainerProperties_LeaseStatus_STATUS_Unlocked)) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["PublicAccess"] = gen.PtrOf(gen.OneConstOf(ContainerProperties_PublicAccess_STATUS_Blob, ContainerProperties_PublicAccess_STATUS_Container, ContainerProperties_PublicAccess_STATUS_None)) + gens["RemainingRetentionDays"] = gen.PtrOf(gen.Int()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) + gens["Version"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_BlobServices_Container_STATUS(gens map[string]gopter.Gen) { + gens["ImmutabilityPolicy"] = gen.PtrOf(ImmutabilityPolicyProperties_STATUSGenerator()) + gens["ImmutableStorageWithVersioning"] = gen.PtrOf(ImmutableStorageWithVersioning_STATUSGenerator()) + gens["LegalHold"] = gen.PtrOf(LegalHoldProperties_STATUSGenerator()) +} + +func Test_ImmutabilityPolicyProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ImmutabilityPolicyProperties_STATUS to ImmutabilityPolicyProperties_STATUS via AssignProperties_To_ImmutabilityPolicyProperties_STATUS & AssignProperties_From_ImmutabilityPolicyProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForImmutabilityPolicyProperties_STATUS, ImmutabilityPolicyProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForImmutabilityPolicyProperties_STATUS tests if a specific instance of ImmutabilityPolicyProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForImmutabilityPolicyProperties_STATUS(subject ImmutabilityPolicyProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ImmutabilityPolicyProperties_STATUS + err := copied.AssignProperties_To_ImmutabilityPolicyProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ImmutabilityPolicyProperties_STATUS + err = actual.AssignProperties_From_ImmutabilityPolicyProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ImmutabilityPolicyProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutabilityPolicyProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutabilityPolicyProperties_STATUS, ImmutabilityPolicyProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutabilityPolicyProperties_STATUS runs a test to see if a specific instance of ImmutabilityPolicyProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutabilityPolicyProperties_STATUS(subject ImmutabilityPolicyProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutabilityPolicyProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutabilityPolicyProperties_STATUS instances for property testing - lazily instantiated by +// ImmutabilityPolicyProperties_STATUSGenerator() +var immutabilityPolicyProperties_STATUSGenerator gopter.Gen + +// ImmutabilityPolicyProperties_STATUSGenerator returns a generator of ImmutabilityPolicyProperties_STATUS instances for property testing. +// We first initialize immutabilityPolicyProperties_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ImmutabilityPolicyProperties_STATUSGenerator() gopter.Gen { + if immutabilityPolicyProperties_STATUSGenerator != nil { + return immutabilityPolicyProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutabilityPolicyProperties_STATUS(generators) + immutabilityPolicyProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(ImmutabilityPolicyProperties_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutabilityPolicyProperties_STATUS(generators) + AddRelatedPropertyGeneratorsForImmutabilityPolicyProperties_STATUS(generators) + immutabilityPolicyProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(ImmutabilityPolicyProperties_STATUS{}), generators) + + return immutabilityPolicyProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForImmutabilityPolicyProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutabilityPolicyProperties_STATUS(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWrites"] = gen.PtrOf(gen.Bool()) + gens["AllowProtectedAppendWritesAll"] = gen.PtrOf(gen.Bool()) + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["ImmutabilityPeriodSinceCreationInDays"] = gen.PtrOf(gen.Int()) + gens["State"] = gen.PtrOf(gen.OneConstOf(ImmutabilityPolicyProperty_State_STATUS_Locked, ImmutabilityPolicyProperty_State_STATUS_Unlocked)) +} + +// AddRelatedPropertyGeneratorsForImmutabilityPolicyProperties_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForImmutabilityPolicyProperties_STATUS(gens map[string]gopter.Gen) { + gens["UpdateHistory"] = gen.SliceOf(UpdateHistoryProperty_STATUSGenerator()) +} + +func Test_ImmutableStorageWithVersioning_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ImmutableStorageWithVersioning to ImmutableStorageWithVersioning via AssignProperties_To_ImmutableStorageWithVersioning & AssignProperties_From_ImmutableStorageWithVersioning returns original", + prop.ForAll(RunPropertyAssignmentTestForImmutableStorageWithVersioning, ImmutableStorageWithVersioningGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForImmutableStorageWithVersioning tests if a specific instance of ImmutableStorageWithVersioning can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForImmutableStorageWithVersioning(subject ImmutableStorageWithVersioning) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ImmutableStorageWithVersioning + err := copied.AssignProperties_To_ImmutableStorageWithVersioning(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ImmutableStorageWithVersioning + err = actual.AssignProperties_From_ImmutableStorageWithVersioning(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ImmutableStorageWithVersioning_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutableStorageWithVersioning via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutableStorageWithVersioning, ImmutableStorageWithVersioningGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutableStorageWithVersioning runs a test to see if a specific instance of ImmutableStorageWithVersioning round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutableStorageWithVersioning(subject ImmutableStorageWithVersioning) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutableStorageWithVersioning + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutableStorageWithVersioning instances for property testing - lazily instantiated by +// ImmutableStorageWithVersioningGenerator() +var immutableStorageWithVersioningGenerator gopter.Gen + +// ImmutableStorageWithVersioningGenerator returns a generator of ImmutableStorageWithVersioning instances for property testing. +func ImmutableStorageWithVersioningGenerator() gopter.Gen { + if immutableStorageWithVersioningGenerator != nil { + return immutableStorageWithVersioningGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning(generators) + immutableStorageWithVersioningGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageWithVersioning{}), generators) + + return immutableStorageWithVersioningGenerator +} + +// AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_ImmutableStorageWithVersioning_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ImmutableStorageWithVersioning_STATUS to ImmutableStorageWithVersioning_STATUS via AssignProperties_To_ImmutableStorageWithVersioning_STATUS & AssignProperties_From_ImmutableStorageWithVersioning_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForImmutableStorageWithVersioning_STATUS, ImmutableStorageWithVersioning_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForImmutableStorageWithVersioning_STATUS tests if a specific instance of ImmutableStorageWithVersioning_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForImmutableStorageWithVersioning_STATUS(subject ImmutableStorageWithVersioning_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ImmutableStorageWithVersioning_STATUS + err := copied.AssignProperties_To_ImmutableStorageWithVersioning_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ImmutableStorageWithVersioning_STATUS + err = actual.AssignProperties_From_ImmutableStorageWithVersioning_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ImmutableStorageWithVersioning_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ImmutableStorageWithVersioning_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForImmutableStorageWithVersioning_STATUS, ImmutableStorageWithVersioning_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForImmutableStorageWithVersioning_STATUS runs a test to see if a specific instance of ImmutableStorageWithVersioning_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForImmutableStorageWithVersioning_STATUS(subject ImmutableStorageWithVersioning_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ImmutableStorageWithVersioning_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ImmutableStorageWithVersioning_STATUS instances for property testing - lazily instantiated by +// ImmutableStorageWithVersioning_STATUSGenerator() +var immutableStorageWithVersioning_STATUSGenerator gopter.Gen + +// ImmutableStorageWithVersioning_STATUSGenerator returns a generator of ImmutableStorageWithVersioning_STATUS instances for property testing. +func ImmutableStorageWithVersioning_STATUSGenerator() gopter.Gen { + if immutableStorageWithVersioning_STATUSGenerator != nil { + return immutableStorageWithVersioning_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_STATUS(generators) + immutableStorageWithVersioning_STATUSGenerator = gen.Struct(reflect.TypeOf(ImmutableStorageWithVersioning_STATUS{}), generators) + + return immutableStorageWithVersioning_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForImmutableStorageWithVersioning_STATUS(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["MigrationState"] = gen.PtrOf(gen.OneConstOf(ImmutableStorageWithVersioning_MigrationState_STATUS_Completed, ImmutableStorageWithVersioning_MigrationState_STATUS_InProgress)) + gens["TimeStamp"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_LegalHoldProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from LegalHoldProperties_STATUS to LegalHoldProperties_STATUS via AssignProperties_To_LegalHoldProperties_STATUS & AssignProperties_From_LegalHoldProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForLegalHoldProperties_STATUS, LegalHoldProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForLegalHoldProperties_STATUS tests if a specific instance of LegalHoldProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForLegalHoldProperties_STATUS(subject LegalHoldProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.LegalHoldProperties_STATUS + err := copied.AssignProperties_To_LegalHoldProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual LegalHoldProperties_STATUS + err = actual.AssignProperties_From_LegalHoldProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_LegalHoldProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of LegalHoldProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForLegalHoldProperties_STATUS, LegalHoldProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForLegalHoldProperties_STATUS runs a test to see if a specific instance of LegalHoldProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForLegalHoldProperties_STATUS(subject LegalHoldProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual LegalHoldProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of LegalHoldProperties_STATUS instances for property testing - lazily instantiated by +// LegalHoldProperties_STATUSGenerator() +var legalHoldProperties_STATUSGenerator gopter.Gen + +// LegalHoldProperties_STATUSGenerator returns a generator of LegalHoldProperties_STATUS instances for property testing. +// We first initialize legalHoldProperties_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func LegalHoldProperties_STATUSGenerator() gopter.Gen { + if legalHoldProperties_STATUSGenerator != nil { + return legalHoldProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForLegalHoldProperties_STATUS(generators) + legalHoldProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(LegalHoldProperties_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForLegalHoldProperties_STATUS(generators) + AddRelatedPropertyGeneratorsForLegalHoldProperties_STATUS(generators) + legalHoldProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(LegalHoldProperties_STATUS{}), generators) + + return legalHoldProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForLegalHoldProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForLegalHoldProperties_STATUS(gens map[string]gopter.Gen) { + gens["HasLegalHold"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForLegalHoldProperties_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForLegalHoldProperties_STATUS(gens map[string]gopter.Gen) { + gens["ProtectedAppendWritesHistory"] = gen.PtrOf(ProtectedAppendWritesHistory_STATUSGenerator()) + gens["Tags"] = gen.SliceOf(TagProperty_STATUSGenerator()) +} + +func Test_ProtectedAppendWritesHistory_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ProtectedAppendWritesHistory_STATUS to ProtectedAppendWritesHistory_STATUS via AssignProperties_To_ProtectedAppendWritesHistory_STATUS & AssignProperties_From_ProtectedAppendWritesHistory_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForProtectedAppendWritesHistory_STATUS, ProtectedAppendWritesHistory_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForProtectedAppendWritesHistory_STATUS tests if a specific instance of ProtectedAppendWritesHistory_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForProtectedAppendWritesHistory_STATUS(subject ProtectedAppendWritesHistory_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ProtectedAppendWritesHistory_STATUS + err := copied.AssignProperties_To_ProtectedAppendWritesHistory_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ProtectedAppendWritesHistory_STATUS + err = actual.AssignProperties_From_ProtectedAppendWritesHistory_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ProtectedAppendWritesHistory_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ProtectedAppendWritesHistory_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForProtectedAppendWritesHistory_STATUS, ProtectedAppendWritesHistory_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForProtectedAppendWritesHistory_STATUS runs a test to see if a specific instance of ProtectedAppendWritesHistory_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForProtectedAppendWritesHistory_STATUS(subject ProtectedAppendWritesHistory_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ProtectedAppendWritesHistory_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ProtectedAppendWritesHistory_STATUS instances for property testing - lazily instantiated by +// ProtectedAppendWritesHistory_STATUSGenerator() +var protectedAppendWritesHistory_STATUSGenerator gopter.Gen + +// ProtectedAppendWritesHistory_STATUSGenerator returns a generator of ProtectedAppendWritesHistory_STATUS instances for property testing. +func ProtectedAppendWritesHistory_STATUSGenerator() gopter.Gen { + if protectedAppendWritesHistory_STATUSGenerator != nil { + return protectedAppendWritesHistory_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForProtectedAppendWritesHistory_STATUS(generators) + protectedAppendWritesHistory_STATUSGenerator = gen.Struct(reflect.TypeOf(ProtectedAppendWritesHistory_STATUS{}), generators) + + return protectedAppendWritesHistory_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForProtectedAppendWritesHistory_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForProtectedAppendWritesHistory_STATUS(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWritesAll"] = gen.PtrOf(gen.Bool()) + gens["Timestamp"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_TagProperty_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TagProperty_STATUS to TagProperty_STATUS via AssignProperties_To_TagProperty_STATUS & AssignProperties_From_TagProperty_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForTagProperty_STATUS, TagProperty_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTagProperty_STATUS tests if a specific instance of TagProperty_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTagProperty_STATUS(subject TagProperty_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TagProperty_STATUS + err := copied.AssignProperties_To_TagProperty_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TagProperty_STATUS + err = actual.AssignProperties_From_TagProperty_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_TagProperty_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TagProperty_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTagProperty_STATUS, TagProperty_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTagProperty_STATUS runs a test to see if a specific instance of TagProperty_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForTagProperty_STATUS(subject TagProperty_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TagProperty_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TagProperty_STATUS instances for property testing - lazily instantiated by TagProperty_STATUSGenerator() +var tagProperty_STATUSGenerator gopter.Gen + +// TagProperty_STATUSGenerator returns a generator of TagProperty_STATUS instances for property testing. +func TagProperty_STATUSGenerator() gopter.Gen { + if tagProperty_STATUSGenerator != nil { + return tagProperty_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTagProperty_STATUS(generators) + tagProperty_STATUSGenerator = gen.Struct(reflect.TypeOf(TagProperty_STATUS{}), generators) + + return tagProperty_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForTagProperty_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTagProperty_STATUS(gens map[string]gopter.Gen) { + gens["ObjectIdentifier"] = gen.PtrOf(gen.AlphaString()) + gens["Tag"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Timestamp"] = gen.PtrOf(gen.AlphaString()) + gens["Upn"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_UpdateHistoryProperty_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from UpdateHistoryProperty_STATUS to UpdateHistoryProperty_STATUS via AssignProperties_To_UpdateHistoryProperty_STATUS & AssignProperties_From_UpdateHistoryProperty_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForUpdateHistoryProperty_STATUS, UpdateHistoryProperty_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForUpdateHistoryProperty_STATUS tests if a specific instance of UpdateHistoryProperty_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForUpdateHistoryProperty_STATUS(subject UpdateHistoryProperty_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.UpdateHistoryProperty_STATUS + err := copied.AssignProperties_To_UpdateHistoryProperty_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual UpdateHistoryProperty_STATUS + err = actual.AssignProperties_From_UpdateHistoryProperty_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_UpdateHistoryProperty_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of UpdateHistoryProperty_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUpdateHistoryProperty_STATUS, UpdateHistoryProperty_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUpdateHistoryProperty_STATUS runs a test to see if a specific instance of UpdateHistoryProperty_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForUpdateHistoryProperty_STATUS(subject UpdateHistoryProperty_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UpdateHistoryProperty_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of UpdateHistoryProperty_STATUS instances for property testing - lazily instantiated by +// UpdateHistoryProperty_STATUSGenerator() +var updateHistoryProperty_STATUSGenerator gopter.Gen + +// UpdateHistoryProperty_STATUSGenerator returns a generator of UpdateHistoryProperty_STATUS instances for property testing. +func UpdateHistoryProperty_STATUSGenerator() gopter.Gen { + if updateHistoryProperty_STATUSGenerator != nil { + return updateHistoryProperty_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForUpdateHistoryProperty_STATUS(generators) + updateHistoryProperty_STATUSGenerator = gen.Struct(reflect.TypeOf(UpdateHistoryProperty_STATUS{}), generators) + + return updateHistoryProperty_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForUpdateHistoryProperty_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForUpdateHistoryProperty_STATUS(gens map[string]gopter.Gen) { + gens["AllowProtectedAppendWrites"] = gen.PtrOf(gen.Bool()) + gens["AllowProtectedAppendWritesAll"] = gen.PtrOf(gen.Bool()) + gens["ImmutabilityPeriodSinceCreationInDays"] = gen.PtrOf(gen.Int()) + gens["ObjectIdentifier"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Timestamp"] = gen.PtrOf(gen.AlphaString()) + gens["Update"] = gen.PtrOf(gen.OneConstOf(UpdateHistoryProperty_Update_STATUS_Extend, UpdateHistoryProperty_Update_STATUS_Lock, UpdateHistoryProperty_Update_STATUS_Put)) + gens["Upn"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_service_spec_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_file_service_spec_arm_types_gen.go new file mode 100644 index 00000000000..92e3e7f848b --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_file_service_spec_arm_types_gen.go @@ -0,0 +1,77 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type StorageAccounts_FileService_Spec_ARM struct { + Name string `json:"name,omitempty"` + + // Properties: The properties of File services in storage account. + Properties *StorageAccounts_FileService_Properties_Spec_ARM `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &StorageAccounts_FileService_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (service StorageAccounts_FileService_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (service *StorageAccounts_FileService_Spec_ARM) GetName() string { + return service.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/fileServices" +func (service *StorageAccounts_FileService_Spec_ARM) GetType() string { + return "Microsoft.Storage/storageAccounts/fileServices" +} + +type StorageAccounts_FileService_Properties_Spec_ARM struct { + // Cors: Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // File service. + Cors *CorsRules_ARM `json:"cors,omitempty"` + + // ProtocolSettings: Protocol settings for file service + ProtocolSettings *ProtocolSettings_ARM `json:"protocolSettings,omitempty"` + + // ShareDeleteRetentionPolicy: The file service properties for share soft delete. + ShareDeleteRetentionPolicy *DeleteRetentionPolicy_ARM `json:"shareDeleteRetentionPolicy,omitempty"` +} + +// Protocol settings for file service +type ProtocolSettings_ARM struct { + // Smb: Setting for SMB protocol + Smb *SmbSetting_ARM `json:"smb,omitempty"` +} + +// Setting for SMB protocol +type SmbSetting_ARM struct { + // AuthenticationMethods: SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos. Should be + // passed as a string with delimiter ';'. + AuthenticationMethods *string `json:"authenticationMethods,omitempty"` + + // ChannelEncryption: SMB channel encryption supported by server. Valid values are AES-128-CCM, AES-128-GCM, AES-256-GCM. + // Should be passed as a string with delimiter ';'. + ChannelEncryption *string `json:"channelEncryption,omitempty"` + + // KerberosTicketEncryption: Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256. Should be + // passed as a string with delimiter ';' + KerberosTicketEncryption *string `json:"kerberosTicketEncryption,omitempty"` + + // Multichannel: Multichannel setting. Applies to Premium FileStorage only. + Multichannel *Multichannel_ARM `json:"multichannel,omitempty"` + + // Versions: SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0, SMB3.1.1. Should be passed as a + // string with delimiter ';'. + Versions *string `json:"versions,omitempty"` +} + +// Multichannel setting. Applies to Premium FileStorage only. +type Multichannel_ARM struct { + // Enabled: Indicates whether multichannel is enabled + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_service_spec_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_file_service_spec_arm_types_gen_test.go new file mode 100644 index 00000000000..6a46382ef17 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_file_service_spec_arm_types_gen_test.go @@ -0,0 +1,354 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_FileService_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileService_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileService_Spec_ARM, StorageAccounts_FileService_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileService_Spec_ARM runs a test to see if a specific instance of StorageAccounts_FileService_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileService_Spec_ARM(subject StorageAccounts_FileService_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileService_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileService_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_FileService_Spec_ARMGenerator() +var storageAccounts_FileService_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_FileService_Spec_ARMGenerator returns a generator of StorageAccounts_FileService_Spec_ARM instances for property testing. +// We first initialize storageAccounts_FileService_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_FileService_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_FileService_Spec_ARMGenerator != nil { + return storageAccounts_FileService_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileService_Spec_ARM(generators) + storageAccounts_FileService_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileService_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Spec_ARM(generators) + storageAccounts_FileService_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_Spec_ARM{}), generators) + + return storageAccounts_FileService_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_FileService_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_FileService_Spec_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Spec_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(StorageAccounts_FileService_Properties_Spec_ARMGenerator()) +} + +func Test_StorageAccounts_FileService_Properties_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileService_Properties_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileService_Properties_Spec_ARM, StorageAccounts_FileService_Properties_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileService_Properties_Spec_ARM runs a test to see if a specific instance of StorageAccounts_FileService_Properties_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileService_Properties_Spec_ARM(subject StorageAccounts_FileService_Properties_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileService_Properties_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileService_Properties_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_FileService_Properties_Spec_ARMGenerator() +var storageAccounts_FileService_Properties_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_FileService_Properties_Spec_ARMGenerator returns a generator of StorageAccounts_FileService_Properties_Spec_ARM instances for property testing. +func StorageAccounts_FileService_Properties_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_FileService_Properties_Spec_ARMGenerator != nil { + return storageAccounts_FileService_Properties_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Properties_Spec_ARM(generators) + storageAccounts_FileService_Properties_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_Properties_Spec_ARM{}), generators) + + return storageAccounts_FileService_Properties_Spec_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Properties_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Properties_Spec_ARM(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRules_ARMGenerator()) + gens["ProtocolSettings"] = gen.PtrOf(ProtocolSettings_ARMGenerator()) + gens["ShareDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicy_ARMGenerator()) +} + +func Test_ProtocolSettings_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ProtocolSettings_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForProtocolSettings_ARM, ProtocolSettings_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForProtocolSettings_ARM runs a test to see if a specific instance of ProtocolSettings_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForProtocolSettings_ARM(subject ProtocolSettings_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ProtocolSettings_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ProtocolSettings_ARM instances for property testing - lazily instantiated by +// ProtocolSettings_ARMGenerator() +var protocolSettings_ARMGenerator gopter.Gen + +// ProtocolSettings_ARMGenerator returns a generator of ProtocolSettings_ARM instances for property testing. +func ProtocolSettings_ARMGenerator() gopter.Gen { + if protocolSettings_ARMGenerator != nil { + return protocolSettings_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForProtocolSettings_ARM(generators) + protocolSettings_ARMGenerator = gen.Struct(reflect.TypeOf(ProtocolSettings_ARM{}), generators) + + return protocolSettings_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForProtocolSettings_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForProtocolSettings_ARM(gens map[string]gopter.Gen) { + gens["Smb"] = gen.PtrOf(SmbSetting_ARMGenerator()) +} + +func Test_SmbSetting_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SmbSetting_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSmbSetting_ARM, SmbSetting_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSmbSetting_ARM runs a test to see if a specific instance of SmbSetting_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForSmbSetting_ARM(subject SmbSetting_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SmbSetting_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SmbSetting_ARM instances for property testing - lazily instantiated by SmbSetting_ARMGenerator() +var smbSetting_ARMGenerator gopter.Gen + +// SmbSetting_ARMGenerator returns a generator of SmbSetting_ARM instances for property testing. +// We first initialize smbSetting_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func SmbSetting_ARMGenerator() gopter.Gen { + if smbSetting_ARMGenerator != nil { + return smbSetting_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSmbSetting_ARM(generators) + smbSetting_ARMGenerator = gen.Struct(reflect.TypeOf(SmbSetting_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSmbSetting_ARM(generators) + AddRelatedPropertyGeneratorsForSmbSetting_ARM(generators) + smbSetting_ARMGenerator = gen.Struct(reflect.TypeOf(SmbSetting_ARM{}), generators) + + return smbSetting_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForSmbSetting_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSmbSetting_ARM(gens map[string]gopter.Gen) { + gens["AuthenticationMethods"] = gen.PtrOf(gen.AlphaString()) + gens["ChannelEncryption"] = gen.PtrOf(gen.AlphaString()) + gens["KerberosTicketEncryption"] = gen.PtrOf(gen.AlphaString()) + gens["Versions"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForSmbSetting_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSmbSetting_ARM(gens map[string]gopter.Gen) { + gens["Multichannel"] = gen.PtrOf(Multichannel_ARMGenerator()) +} + +func Test_Multichannel_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Multichannel_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForMultichannel_ARM, Multichannel_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForMultichannel_ARM runs a test to see if a specific instance of Multichannel_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForMultichannel_ARM(subject Multichannel_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Multichannel_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Multichannel_ARM instances for property testing - lazily instantiated by Multichannel_ARMGenerator() +var multichannel_ARMGenerator gopter.Gen + +// Multichannel_ARMGenerator returns a generator of Multichannel_ARM instances for property testing. +func Multichannel_ARMGenerator() gopter.Gen { + if multichannel_ARMGenerator != nil { + return multichannel_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForMultichannel_ARM(generators) + multichannel_ARMGenerator = gen.Struct(reflect.TypeOf(Multichannel_ARM{}), generators) + + return multichannel_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForMultichannel_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForMultichannel_ARM(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_service_status_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_file_service_status_arm_types_gen.go new file mode 100644 index 00000000000..20f78acd742 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_file_service_status_arm_types_gen.go @@ -0,0 +1,69 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +type StorageAccounts_FileService_STATUS_ARM struct { + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Properties: The properties of File services in storage account. + Properties *StorageAccounts_FileService_Properties_STATUS_ARM `json:"properties,omitempty"` + + // Sku: Sku name and tier. + Sku *Sku_STATUS_ARM `json:"sku,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +type StorageAccounts_FileService_Properties_STATUS_ARM struct { + // Cors: Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // File service. + Cors *CorsRules_STATUS_ARM `json:"cors,omitempty"` + + // ProtocolSettings: Protocol settings for file service + ProtocolSettings *ProtocolSettings_STATUS_ARM `json:"protocolSettings,omitempty"` + + // ShareDeleteRetentionPolicy: The file service properties for share soft delete. + ShareDeleteRetentionPolicy *DeleteRetentionPolicy_STATUS_ARM `json:"shareDeleteRetentionPolicy,omitempty"` +} + +// Protocol settings for file service +type ProtocolSettings_STATUS_ARM struct { + // Smb: Setting for SMB protocol + Smb *SmbSetting_STATUS_ARM `json:"smb,omitempty"` +} + +// Setting for SMB protocol +type SmbSetting_STATUS_ARM struct { + // AuthenticationMethods: SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos. Should be + // passed as a string with delimiter ';'. + AuthenticationMethods *string `json:"authenticationMethods,omitempty"` + + // ChannelEncryption: SMB channel encryption supported by server. Valid values are AES-128-CCM, AES-128-GCM, AES-256-GCM. + // Should be passed as a string with delimiter ';'. + ChannelEncryption *string `json:"channelEncryption,omitempty"` + + // KerberosTicketEncryption: Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256. Should be + // passed as a string with delimiter ';' + KerberosTicketEncryption *string `json:"kerberosTicketEncryption,omitempty"` + + // Multichannel: Multichannel setting. Applies to Premium FileStorage only. + Multichannel *Multichannel_STATUS_ARM `json:"multichannel,omitempty"` + + // Versions: SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0, SMB3.1.1. Should be passed as a + // string with delimiter ';'. + Versions *string `json:"versions,omitempty"` +} + +// Multichannel setting. Applies to Premium FileStorage only. +type Multichannel_STATUS_ARM struct { + // Enabled: Indicates whether multichannel is enabled + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_service_status_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_file_service_status_arm_types_gen_test.go new file mode 100644 index 00000000000..74202ddeb0e --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_file_service_status_arm_types_gen_test.go @@ -0,0 +1,359 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_FileService_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileService_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileService_STATUS_ARM, StorageAccounts_FileService_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileService_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_FileService_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileService_STATUS_ARM(subject StorageAccounts_FileService_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileService_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileService_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccounts_FileService_STATUS_ARMGenerator() +var storageAccounts_FileService_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_FileService_STATUS_ARMGenerator returns a generator of StorageAccounts_FileService_STATUS_ARM instances for property testing. +// We first initialize storageAccounts_FileService_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_FileService_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_FileService_STATUS_ARMGenerator != nil { + return storageAccounts_FileService_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileService_STATUS_ARM(generators) + storageAccounts_FileService_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileService_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_FileService_STATUS_ARM(generators) + storageAccounts_FileService_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_STATUS_ARM{}), generators) + + return storageAccounts_FileService_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_FileService_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_FileService_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileService_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileService_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(StorageAccounts_FileService_Properties_STATUS_ARMGenerator()) + gens["Sku"] = gen.PtrOf(Sku_STATUS_ARMGenerator()) +} + +func Test_StorageAccounts_FileService_Properties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileService_Properties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileService_Properties_STATUS_ARM, StorageAccounts_FileService_Properties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileService_Properties_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_FileService_Properties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileService_Properties_STATUS_ARM(subject StorageAccounts_FileService_Properties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileService_Properties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileService_Properties_STATUS_ARM instances for property testing - lazily instantiated +// by StorageAccounts_FileService_Properties_STATUS_ARMGenerator() +var storageAccounts_FileService_Properties_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_FileService_Properties_STATUS_ARMGenerator returns a generator of StorageAccounts_FileService_Properties_STATUS_ARM instances for property testing. +func StorageAccounts_FileService_Properties_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_FileService_Properties_STATUS_ARMGenerator != nil { + return storageAccounts_FileService_Properties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Properties_STATUS_ARM(generators) + storageAccounts_FileService_Properties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_Properties_STATUS_ARM{}), generators) + + return storageAccounts_FileService_Properties_STATUS_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Properties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Properties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRules_STATUS_ARMGenerator()) + gens["ProtocolSettings"] = gen.PtrOf(ProtocolSettings_STATUS_ARMGenerator()) + gens["ShareDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicy_STATUS_ARMGenerator()) +} + +func Test_ProtocolSettings_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ProtocolSettings_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForProtocolSettings_STATUS_ARM, ProtocolSettings_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForProtocolSettings_STATUS_ARM runs a test to see if a specific instance of ProtocolSettings_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForProtocolSettings_STATUS_ARM(subject ProtocolSettings_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ProtocolSettings_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ProtocolSettings_STATUS_ARM instances for property testing - lazily instantiated by +// ProtocolSettings_STATUS_ARMGenerator() +var protocolSettings_STATUS_ARMGenerator gopter.Gen + +// ProtocolSettings_STATUS_ARMGenerator returns a generator of ProtocolSettings_STATUS_ARM instances for property testing. +func ProtocolSettings_STATUS_ARMGenerator() gopter.Gen { + if protocolSettings_STATUS_ARMGenerator != nil { + return protocolSettings_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForProtocolSettings_STATUS_ARM(generators) + protocolSettings_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ProtocolSettings_STATUS_ARM{}), generators) + + return protocolSettings_STATUS_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForProtocolSettings_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForProtocolSettings_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Smb"] = gen.PtrOf(SmbSetting_STATUS_ARMGenerator()) +} + +func Test_SmbSetting_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SmbSetting_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSmbSetting_STATUS_ARM, SmbSetting_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSmbSetting_STATUS_ARM runs a test to see if a specific instance of SmbSetting_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForSmbSetting_STATUS_ARM(subject SmbSetting_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SmbSetting_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SmbSetting_STATUS_ARM instances for property testing - lazily instantiated by +// SmbSetting_STATUS_ARMGenerator() +var smbSetting_STATUS_ARMGenerator gopter.Gen + +// SmbSetting_STATUS_ARMGenerator returns a generator of SmbSetting_STATUS_ARM instances for property testing. +// We first initialize smbSetting_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func SmbSetting_STATUS_ARMGenerator() gopter.Gen { + if smbSetting_STATUS_ARMGenerator != nil { + return smbSetting_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSmbSetting_STATUS_ARM(generators) + smbSetting_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(SmbSetting_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSmbSetting_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForSmbSetting_STATUS_ARM(generators) + smbSetting_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(SmbSetting_STATUS_ARM{}), generators) + + return smbSetting_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForSmbSetting_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSmbSetting_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AuthenticationMethods"] = gen.PtrOf(gen.AlphaString()) + gens["ChannelEncryption"] = gen.PtrOf(gen.AlphaString()) + gens["KerberosTicketEncryption"] = gen.PtrOf(gen.AlphaString()) + gens["Versions"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForSmbSetting_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSmbSetting_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Multichannel"] = gen.PtrOf(Multichannel_STATUS_ARMGenerator()) +} + +func Test_Multichannel_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Multichannel_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForMultichannel_STATUS_ARM, Multichannel_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForMultichannel_STATUS_ARM runs a test to see if a specific instance of Multichannel_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForMultichannel_STATUS_ARM(subject Multichannel_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Multichannel_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Multichannel_STATUS_ARM instances for property testing - lazily instantiated by +// Multichannel_STATUS_ARMGenerator() +var multichannel_STATUS_ARMGenerator gopter.Gen + +// Multichannel_STATUS_ARMGenerator returns a generator of Multichannel_STATUS_ARM instances for property testing. +func Multichannel_STATUS_ARMGenerator() gopter.Gen { + if multichannel_STATUS_ARMGenerator != nil { + return multichannel_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForMultichannel_STATUS_ARM(generators) + multichannel_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Multichannel_STATUS_ARM{}), generators) + + return multichannel_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForMultichannel_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForMultichannel_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_service_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_file_service_types_gen.go new file mode 100644 index 00000000000..62a311fd192 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_file_service_types_gen.go @@ -0,0 +1,1710 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/file.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default +type StorageAccountsFileService struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_FileService_Spec `json:"spec,omitempty"` + Status StorageAccounts_FileService_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsFileService{} + +// GetConditions returns the conditions of the resource +func (service *StorageAccountsFileService) GetConditions() conditions.Conditions { + return service.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (service *StorageAccountsFileService) SetConditions(conditions conditions.Conditions) { + service.Status.Conditions = conditions +} + +var _ conversion.Convertible = &StorageAccountsFileService{} + +// ConvertFrom populates our StorageAccountsFileService from the provided hub StorageAccountsFileService +func (service *StorageAccountsFileService) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsFileService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsFileService but received %T instead", hub) + } + + return service.AssignProperties_From_StorageAccountsFileService(source) +} + +// ConvertTo populates the provided hub StorageAccountsFileService from our StorageAccountsFileService +func (service *StorageAccountsFileService) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsFileService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsFileService but received %T instead", hub) + } + + return service.AssignProperties_To_StorageAccountsFileService(destination) +} + +// +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20230101-storageaccountsfileservice,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsfileservices,verbs=create;update,versions=v1api20230101,name=default.v1api20230101.storageaccountsfileservices.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &StorageAccountsFileService{} + +// Default applies defaults to the StorageAccountsFileService resource +func (service *StorageAccountsFileService) Default() { + service.defaultImpl() + var temp any = service + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultImpl applies the code generated defaults to the StorageAccountsFileService resource +func (service *StorageAccountsFileService) defaultImpl() {} + +var _ genruntime.ImportableResource = &StorageAccountsFileService{} + +// InitializeSpec initializes the spec for this resource from the given status +func (service *StorageAccountsFileService) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*StorageAccounts_FileService_STATUS); ok { + return service.Spec.Initialize_From_StorageAccounts_FileService_STATUS(s) + } + + return fmt.Errorf("expected Status of type StorageAccounts_FileService_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &StorageAccountsFileService{} + +// AzureName returns the Azure name of the resource (always "default") +func (service *StorageAccountsFileService) AzureName() string { + return "default" +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (service StorageAccountsFileService) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (service *StorageAccountsFileService) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (service *StorageAccountsFileService) GetSpec() genruntime.ConvertibleSpec { + return &service.Spec +} + +// GetStatus returns the status of this resource +func (service *StorageAccountsFileService) GetStatus() genruntime.ConvertibleStatus { + return &service.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (service *StorageAccountsFileService) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/fileServices" +func (service *StorageAccountsFileService) GetType() string { + return "Microsoft.Storage/storageAccounts/fileServices" +} + +// NewEmptyStatus returns a new empty (blank) status +func (service *StorageAccountsFileService) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_FileService_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (service *StorageAccountsFileService) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(service.Spec) + return service.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (service *StorageAccountsFileService) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_FileService_STATUS); ok { + service.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_FileService_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + service.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-storage-azure-com-v1api20230101-storageaccountsfileservice,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsfileservices,verbs=create;update,versions=v1api20230101,name=validate.v1api20230101.storageaccountsfileservices.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &StorageAccountsFileService{} + +// ValidateCreate validates the creation of the resource +func (service *StorageAccountsFileService) ValidateCreate() (admission.Warnings, error) { + validations := service.createValidations() + var temp any = service + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (service *StorageAccountsFileService) ValidateDelete() (admission.Warnings, error) { + validations := service.deleteValidations() + var temp any = service + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (service *StorageAccountsFileService) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := service.updateValidations() + var temp any = service + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (service *StorageAccountsFileService) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){service.validateResourceReferences, service.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (service *StorageAccountsFileService) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (service *StorageAccountsFileService) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return service.validateResourceReferences() + }, + service.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return service.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (service *StorageAccountsFileService) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(service) +} + +// validateResourceReferences validates all resource references +func (service *StorageAccountsFileService) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&service.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (service *StorageAccountsFileService) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*StorageAccountsFileService) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, service) +} + +// AssignProperties_From_StorageAccountsFileService populates our StorageAccountsFileService from the provided source StorageAccountsFileService +func (service *StorageAccountsFileService) AssignProperties_From_StorageAccountsFileService(source *v20230101s.StorageAccountsFileService) error { + + // ObjectMeta + service.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_FileService_Spec + err := spec.AssignProperties_From_StorageAccounts_FileService_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_FileService_Spec() to populate field Spec") + } + service.Spec = spec + + // Status + var status StorageAccounts_FileService_STATUS + err = status.AssignProperties_From_StorageAccounts_FileService_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_FileService_STATUS() to populate field Status") + } + service.Status = status + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsFileService populates the provided destination StorageAccountsFileService from our StorageAccountsFileService +func (service *StorageAccountsFileService) AssignProperties_To_StorageAccountsFileService(destination *v20230101s.StorageAccountsFileService) error { + + // ObjectMeta + destination.ObjectMeta = *service.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_FileService_Spec + err := service.Spec.AssignProperties_To_StorageAccounts_FileService_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_FileService_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_FileService_STATUS + err = service.Status.AssignProperties_To_StorageAccounts_FileService_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_FileService_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (service *StorageAccountsFileService) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: service.Spec.OriginalVersion(), + Kind: "StorageAccountsFileService", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/file.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default +type StorageAccountsFileServiceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsFileService `json:"items"` +} + +type StorageAccounts_FileService_Spec struct { + // Cors: Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // File service. + Cors *CorsRules `json:"cors,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccount resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccount"` + + // ProtocolSettings: Protocol settings for file service + ProtocolSettings *ProtocolSettings `json:"protocolSettings,omitempty"` + + // ShareDeleteRetentionPolicy: The file service properties for share soft delete. + ShareDeleteRetentionPolicy *DeleteRetentionPolicy `json:"shareDeleteRetentionPolicy,omitempty"` +} + +var _ genruntime.ARMTransformer = &StorageAccounts_FileService_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (service *StorageAccounts_FileService_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if service == nil { + return nil, nil + } + result := &StorageAccounts_FileService_Spec_ARM{} + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if service.Cors != nil || + service.ProtocolSettings != nil || + service.ShareDeleteRetentionPolicy != nil { + result.Properties = &StorageAccounts_FileService_Properties_Spec_ARM{} + } + if service.Cors != nil { + cors_ARM, err := (*service.Cors).ConvertToARM(resolved) + if err != nil { + return nil, err + } + cors := *cors_ARM.(*CorsRules_ARM) + result.Properties.Cors = &cors + } + if service.ProtocolSettings != nil { + protocolSettings_ARM, err := (*service.ProtocolSettings).ConvertToARM(resolved) + if err != nil { + return nil, err + } + protocolSettings := *protocolSettings_ARM.(*ProtocolSettings_ARM) + result.Properties.ProtocolSettings = &protocolSettings + } + if service.ShareDeleteRetentionPolicy != nil { + shareDeleteRetentionPolicy_ARM, err := (*service.ShareDeleteRetentionPolicy).ConvertToARM(resolved) + if err != nil { + return nil, err + } + shareDeleteRetentionPolicy := *shareDeleteRetentionPolicy_ARM.(*DeleteRetentionPolicy_ARM) + result.Properties.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (service *StorageAccounts_FileService_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_FileService_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (service *StorageAccounts_FileService_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_FileService_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_FileService_Spec_ARM, got %T", armInput) + } + + // Set property "Cors": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Cors != nil { + var cors1 CorsRules + err := cors1.PopulateFromARM(owner, *typedInput.Properties.Cors) + if err != nil { + return err + } + cors := cors1 + service.Cors = &cors + } + } + + // Set property "Owner": + service.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "ProtocolSettings": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ProtocolSettings != nil { + var protocolSettings1 ProtocolSettings + err := protocolSettings1.PopulateFromARM(owner, *typedInput.Properties.ProtocolSettings) + if err != nil { + return err + } + protocolSettings := protocolSettings1 + service.ProtocolSettings = &protocolSettings + } + } + + // Set property "ShareDeleteRetentionPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ShareDeleteRetentionPolicy != nil { + var shareDeleteRetentionPolicy1 DeleteRetentionPolicy + err := shareDeleteRetentionPolicy1.PopulateFromARM(owner, *typedInput.Properties.ShareDeleteRetentionPolicy) + if err != nil { + return err + } + shareDeleteRetentionPolicy := shareDeleteRetentionPolicy1 + service.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy + } + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_FileService_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_FileService_Spec from the provided source +func (service *StorageAccounts_FileService_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20230101s.StorageAccounts_FileService_Spec) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_FileService_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_FileService_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_FileService_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_FileService_Spec +func (service *StorageAccounts_FileService_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20230101s.StorageAccounts_FileService_Spec) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_FileService_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_FileService_Spec{} + err := service.AssignProperties_To_StorageAccounts_FileService_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_FileService_Spec populates our StorageAccounts_FileService_Spec from the provided source StorageAccounts_FileService_Spec +func (service *StorageAccounts_FileService_Spec) AssignProperties_From_StorageAccounts_FileService_Spec(source *v20230101s.StorageAccounts_FileService_Spec) error { + + // Cors + if source.Cors != nil { + var cor CorsRules + err := cor.AssignProperties_From_CorsRules(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + service.Owner = &owner + } else { + service.Owner = nil + } + + // ProtocolSettings + if source.ProtocolSettings != nil { + var protocolSetting ProtocolSettings + err := protocolSetting.AssignProperties_From_ProtocolSettings(source.ProtocolSettings) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ProtocolSettings() to populate field ProtocolSettings") + } + service.ProtocolSettings = &protocolSetting + } else { + service.ProtocolSettings = nil + } + + // ShareDeleteRetentionPolicy + if source.ShareDeleteRetentionPolicy != nil { + var shareDeleteRetentionPolicy DeleteRetentionPolicy + err := shareDeleteRetentionPolicy.AssignProperties_From_DeleteRetentionPolicy(source.ShareDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DeleteRetentionPolicy() to populate field ShareDeleteRetentionPolicy") + } + service.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy + } else { + service.ShareDeleteRetentionPolicy = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_FileService_Spec populates the provided destination StorageAccounts_FileService_Spec from our StorageAccounts_FileService_Spec +func (service *StorageAccounts_FileService_Spec) AssignProperties_To_StorageAccounts_FileService_Spec(destination *v20230101s.StorageAccounts_FileService_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules + err := service.Cors.AssignProperties_To_CorsRules(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // OriginalVersion + destination.OriginalVersion = service.OriginalVersion() + + // Owner + if service.Owner != nil { + owner := service.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // ProtocolSettings + if service.ProtocolSettings != nil { + var protocolSetting v20230101s.ProtocolSettings + err := service.ProtocolSettings.AssignProperties_To_ProtocolSettings(&protocolSetting) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ProtocolSettings() to populate field ProtocolSettings") + } + destination.ProtocolSettings = &protocolSetting + } else { + destination.ProtocolSettings = nil + } + + // ShareDeleteRetentionPolicy + if service.ShareDeleteRetentionPolicy != nil { + var shareDeleteRetentionPolicy v20230101s.DeleteRetentionPolicy + err := service.ShareDeleteRetentionPolicy.AssignProperties_To_DeleteRetentionPolicy(&shareDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DeleteRetentionPolicy() to populate field ShareDeleteRetentionPolicy") + } + destination.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy + } else { + destination.ShareDeleteRetentionPolicy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_StorageAccounts_FileService_STATUS populates our StorageAccounts_FileService_Spec from the provided source StorageAccounts_FileService_STATUS +func (service *StorageAccounts_FileService_Spec) Initialize_From_StorageAccounts_FileService_STATUS(source *StorageAccounts_FileService_STATUS) error { + + // Cors + if source.Cors != nil { + var cor CorsRules + err := cor.Initialize_From_CorsRules_STATUS(source.Cors) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_CorsRules_STATUS() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // ProtocolSettings + if source.ProtocolSettings != nil { + var protocolSetting ProtocolSettings + err := protocolSetting.Initialize_From_ProtocolSettings_STATUS(source.ProtocolSettings) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ProtocolSettings_STATUS() to populate field ProtocolSettings") + } + service.ProtocolSettings = &protocolSetting + } else { + service.ProtocolSettings = nil + } + + // ShareDeleteRetentionPolicy + if source.ShareDeleteRetentionPolicy != nil { + var shareDeleteRetentionPolicy DeleteRetentionPolicy + err := shareDeleteRetentionPolicy.Initialize_From_DeleteRetentionPolicy_STATUS(source.ShareDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DeleteRetentionPolicy_STATUS() to populate field ShareDeleteRetentionPolicy") + } + service.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy + } else { + service.ShareDeleteRetentionPolicy = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (service *StorageAccounts_FileService_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +type StorageAccounts_FileService_STATUS struct { + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // Cors: Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // File service. + Cors *CorsRules_STATUS `json:"cors,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // ProtocolSettings: Protocol settings for file service + ProtocolSettings *ProtocolSettings_STATUS `json:"protocolSettings,omitempty"` + + // ShareDeleteRetentionPolicy: The file service properties for share soft delete. + ShareDeleteRetentionPolicy *DeleteRetentionPolicy_STATUS `json:"shareDeleteRetentionPolicy,omitempty"` + + // Sku: Sku name and tier. + Sku *Sku_STATUS `json:"sku,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_FileService_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_FileService_STATUS from the provided source +func (service *StorageAccounts_FileService_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20230101s.StorageAccounts_FileService_STATUS) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_FileService_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_FileService_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_FileService_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_FileService_STATUS +func (service *StorageAccounts_FileService_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20230101s.StorageAccounts_FileService_STATUS) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_FileService_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_FileService_STATUS{} + err := service.AssignProperties_To_StorageAccounts_FileService_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &StorageAccounts_FileService_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (service *StorageAccounts_FileService_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_FileService_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (service *StorageAccounts_FileService_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_FileService_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_FileService_STATUS_ARM, got %T", armInput) + } + + // no assignment for property "Conditions" + + // Set property "Cors": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Cors != nil { + var cors1 CorsRules_STATUS + err := cors1.PopulateFromARM(owner, *typedInput.Properties.Cors) + if err != nil { + return err + } + cors := cors1 + service.Cors = &cors + } + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + service.Id = &id + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + service.Name = &name + } + + // Set property "ProtocolSettings": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ProtocolSettings != nil { + var protocolSettings1 ProtocolSettings_STATUS + err := protocolSettings1.PopulateFromARM(owner, *typedInput.Properties.ProtocolSettings) + if err != nil { + return err + } + protocolSettings := protocolSettings1 + service.ProtocolSettings = &protocolSettings + } + } + + // Set property "ShareDeleteRetentionPolicy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ShareDeleteRetentionPolicy != nil { + var shareDeleteRetentionPolicy1 DeleteRetentionPolicy_STATUS + err := shareDeleteRetentionPolicy1.PopulateFromARM(owner, *typedInput.Properties.ShareDeleteRetentionPolicy) + if err != nil { + return err + } + shareDeleteRetentionPolicy := shareDeleteRetentionPolicy1 + service.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy + } + } + + // Set property "Sku": + if typedInput.Sku != nil { + var sku1 Sku_STATUS + err := sku1.PopulateFromARM(owner, *typedInput.Sku) + if err != nil { + return err + } + sku := sku1 + service.Sku = &sku + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + service.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccounts_FileService_STATUS populates our StorageAccounts_FileService_STATUS from the provided source StorageAccounts_FileService_STATUS +func (service *StorageAccounts_FileService_STATUS) AssignProperties_From_StorageAccounts_FileService_STATUS(source *v20230101s.StorageAccounts_FileService_STATUS) error { + + // Conditions + service.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Cors + if source.Cors != nil { + var cor CorsRules_STATUS + err := cor.AssignProperties_From_CorsRules_STATUS(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules_STATUS() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // Id + service.Id = genruntime.ClonePointerToString(source.Id) + + // Name + service.Name = genruntime.ClonePointerToString(source.Name) + + // ProtocolSettings + if source.ProtocolSettings != nil { + var protocolSetting ProtocolSettings_STATUS + err := protocolSetting.AssignProperties_From_ProtocolSettings_STATUS(source.ProtocolSettings) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ProtocolSettings_STATUS() to populate field ProtocolSettings") + } + service.ProtocolSettings = &protocolSetting + } else { + service.ProtocolSettings = nil + } + + // ShareDeleteRetentionPolicy + if source.ShareDeleteRetentionPolicy != nil { + var shareDeleteRetentionPolicy DeleteRetentionPolicy_STATUS + err := shareDeleteRetentionPolicy.AssignProperties_From_DeleteRetentionPolicy_STATUS(source.ShareDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DeleteRetentionPolicy_STATUS() to populate field ShareDeleteRetentionPolicy") + } + service.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy + } else { + service.ShareDeleteRetentionPolicy = nil + } + + // Sku + if source.Sku != nil { + var sku Sku_STATUS + err := sku.AssignProperties_From_Sku_STATUS(source.Sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Sku_STATUS() to populate field Sku") + } + service.Sku = &sku + } else { + service.Sku = nil + } + + // Type + service.Type = genruntime.ClonePointerToString(source.Type) + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_FileService_STATUS populates the provided destination StorageAccounts_FileService_STATUS from our StorageAccounts_FileService_STATUS +func (service *StorageAccounts_FileService_STATUS) AssignProperties_To_StorageAccounts_FileService_STATUS(destination *v20230101s.StorageAccounts_FileService_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(service.Conditions) + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules_STATUS + err := service.Cors.AssignProperties_To_CorsRules_STATUS(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules_STATUS() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(service.Id) + + // Name + destination.Name = genruntime.ClonePointerToString(service.Name) + + // ProtocolSettings + if service.ProtocolSettings != nil { + var protocolSetting v20230101s.ProtocolSettings_STATUS + err := service.ProtocolSettings.AssignProperties_To_ProtocolSettings_STATUS(&protocolSetting) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ProtocolSettings_STATUS() to populate field ProtocolSettings") + } + destination.ProtocolSettings = &protocolSetting + } else { + destination.ProtocolSettings = nil + } + + // ShareDeleteRetentionPolicy + if service.ShareDeleteRetentionPolicy != nil { + var shareDeleteRetentionPolicy v20230101s.DeleteRetentionPolicy_STATUS + err := service.ShareDeleteRetentionPolicy.AssignProperties_To_DeleteRetentionPolicy_STATUS(&shareDeleteRetentionPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DeleteRetentionPolicy_STATUS() to populate field ShareDeleteRetentionPolicy") + } + destination.ShareDeleteRetentionPolicy = &shareDeleteRetentionPolicy + } else { + destination.ShareDeleteRetentionPolicy = nil + } + + // Sku + if service.Sku != nil { + var sku v20230101s.Sku_STATUS + err := service.Sku.AssignProperties_To_Sku_STATUS(&sku) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Sku_STATUS() to populate field Sku") + } + destination.Sku = &sku + } else { + destination.Sku = nil + } + + // Type + destination.Type = genruntime.ClonePointerToString(service.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Protocol settings for file service +type ProtocolSettings struct { + // Smb: Setting for SMB protocol + Smb *SmbSetting `json:"smb,omitempty"` +} + +var _ genruntime.ARMTransformer = &ProtocolSettings{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (settings *ProtocolSettings) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if settings == nil { + return nil, nil + } + result := &ProtocolSettings_ARM{} + + // Set property "Smb": + if settings.Smb != nil { + smb_ARM, err := (*settings.Smb).ConvertToARM(resolved) + if err != nil { + return nil, err + } + smb := *smb_ARM.(*SmbSetting_ARM) + result.Smb = &smb + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (settings *ProtocolSettings) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ProtocolSettings_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (settings *ProtocolSettings) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ProtocolSettings_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ProtocolSettings_ARM, got %T", armInput) + } + + // Set property "Smb": + if typedInput.Smb != nil { + var smb1 SmbSetting + err := smb1.PopulateFromARM(owner, *typedInput.Smb) + if err != nil { + return err + } + smb := smb1 + settings.Smb = &smb + } + + // No error + return nil +} + +// AssignProperties_From_ProtocolSettings populates our ProtocolSettings from the provided source ProtocolSettings +func (settings *ProtocolSettings) AssignProperties_From_ProtocolSettings(source *v20230101s.ProtocolSettings) error { + + // Smb + if source.Smb != nil { + var smb SmbSetting + err := smb.AssignProperties_From_SmbSetting(source.Smb) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SmbSetting() to populate field Smb") + } + settings.Smb = &smb + } else { + settings.Smb = nil + } + + // No error + return nil +} + +// AssignProperties_To_ProtocolSettings populates the provided destination ProtocolSettings from our ProtocolSettings +func (settings *ProtocolSettings) AssignProperties_To_ProtocolSettings(destination *v20230101s.ProtocolSettings) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Smb + if settings.Smb != nil { + var smb v20230101s.SmbSetting + err := settings.Smb.AssignProperties_To_SmbSetting(&smb) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SmbSetting() to populate field Smb") + } + destination.Smb = &smb + } else { + destination.Smb = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ProtocolSettings_STATUS populates our ProtocolSettings from the provided source ProtocolSettings_STATUS +func (settings *ProtocolSettings) Initialize_From_ProtocolSettings_STATUS(source *ProtocolSettings_STATUS) error { + + // Smb + if source.Smb != nil { + var smb SmbSetting + err := smb.Initialize_From_SmbSetting_STATUS(source.Smb) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_SmbSetting_STATUS() to populate field Smb") + } + settings.Smb = &smb + } else { + settings.Smb = nil + } + + // No error + return nil +} + +// Protocol settings for file service +type ProtocolSettings_STATUS struct { + // Smb: Setting for SMB protocol + Smb *SmbSetting_STATUS `json:"smb,omitempty"` +} + +var _ genruntime.FromARMConverter = &ProtocolSettings_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (settings *ProtocolSettings_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ProtocolSettings_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (settings *ProtocolSettings_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ProtocolSettings_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ProtocolSettings_STATUS_ARM, got %T", armInput) + } + + // Set property "Smb": + if typedInput.Smb != nil { + var smb1 SmbSetting_STATUS + err := smb1.PopulateFromARM(owner, *typedInput.Smb) + if err != nil { + return err + } + smb := smb1 + settings.Smb = &smb + } + + // No error + return nil +} + +// AssignProperties_From_ProtocolSettings_STATUS populates our ProtocolSettings_STATUS from the provided source ProtocolSettings_STATUS +func (settings *ProtocolSettings_STATUS) AssignProperties_From_ProtocolSettings_STATUS(source *v20230101s.ProtocolSettings_STATUS) error { + + // Smb + if source.Smb != nil { + var smb SmbSetting_STATUS + err := smb.AssignProperties_From_SmbSetting_STATUS(source.Smb) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SmbSetting_STATUS() to populate field Smb") + } + settings.Smb = &smb + } else { + settings.Smb = nil + } + + // No error + return nil +} + +// AssignProperties_To_ProtocolSettings_STATUS populates the provided destination ProtocolSettings_STATUS from our ProtocolSettings_STATUS +func (settings *ProtocolSettings_STATUS) AssignProperties_To_ProtocolSettings_STATUS(destination *v20230101s.ProtocolSettings_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Smb + if settings.Smb != nil { + var smb v20230101s.SmbSetting_STATUS + err := settings.Smb.AssignProperties_To_SmbSetting_STATUS(&smb) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SmbSetting_STATUS() to populate field Smb") + } + destination.Smb = &smb + } else { + destination.Smb = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Setting for SMB protocol +type SmbSetting struct { + // AuthenticationMethods: SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos. Should be + // passed as a string with delimiter ';'. + AuthenticationMethods *string `json:"authenticationMethods,omitempty"` + + // ChannelEncryption: SMB channel encryption supported by server. Valid values are AES-128-CCM, AES-128-GCM, AES-256-GCM. + // Should be passed as a string with delimiter ';'. + ChannelEncryption *string `json:"channelEncryption,omitempty"` + + // KerberosTicketEncryption: Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256. Should be + // passed as a string with delimiter ';' + KerberosTicketEncryption *string `json:"kerberosTicketEncryption,omitempty"` + + // Multichannel: Multichannel setting. Applies to Premium FileStorage only. + Multichannel *Multichannel `json:"multichannel,omitempty"` + + // Versions: SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0, SMB3.1.1. Should be passed as a + // string with delimiter ';'. + Versions *string `json:"versions,omitempty"` +} + +var _ genruntime.ARMTransformer = &SmbSetting{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (setting *SmbSetting) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if setting == nil { + return nil, nil + } + result := &SmbSetting_ARM{} + + // Set property "AuthenticationMethods": + if setting.AuthenticationMethods != nil { + authenticationMethods := *setting.AuthenticationMethods + result.AuthenticationMethods = &authenticationMethods + } + + // Set property "ChannelEncryption": + if setting.ChannelEncryption != nil { + channelEncryption := *setting.ChannelEncryption + result.ChannelEncryption = &channelEncryption + } + + // Set property "KerberosTicketEncryption": + if setting.KerberosTicketEncryption != nil { + kerberosTicketEncryption := *setting.KerberosTicketEncryption + result.KerberosTicketEncryption = &kerberosTicketEncryption + } + + // Set property "Multichannel": + if setting.Multichannel != nil { + multichannel_ARM, err := (*setting.Multichannel).ConvertToARM(resolved) + if err != nil { + return nil, err + } + multichannel := *multichannel_ARM.(*Multichannel_ARM) + result.Multichannel = &multichannel + } + + // Set property "Versions": + if setting.Versions != nil { + versions := *setting.Versions + result.Versions = &versions + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (setting *SmbSetting) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &SmbSetting_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (setting *SmbSetting) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(SmbSetting_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SmbSetting_ARM, got %T", armInput) + } + + // Set property "AuthenticationMethods": + if typedInput.AuthenticationMethods != nil { + authenticationMethods := *typedInput.AuthenticationMethods + setting.AuthenticationMethods = &authenticationMethods + } + + // Set property "ChannelEncryption": + if typedInput.ChannelEncryption != nil { + channelEncryption := *typedInput.ChannelEncryption + setting.ChannelEncryption = &channelEncryption + } + + // Set property "KerberosTicketEncryption": + if typedInput.KerberosTicketEncryption != nil { + kerberosTicketEncryption := *typedInput.KerberosTicketEncryption + setting.KerberosTicketEncryption = &kerberosTicketEncryption + } + + // Set property "Multichannel": + if typedInput.Multichannel != nil { + var multichannel1 Multichannel + err := multichannel1.PopulateFromARM(owner, *typedInput.Multichannel) + if err != nil { + return err + } + multichannel := multichannel1 + setting.Multichannel = &multichannel + } + + // Set property "Versions": + if typedInput.Versions != nil { + versions := *typedInput.Versions + setting.Versions = &versions + } + + // No error + return nil +} + +// AssignProperties_From_SmbSetting populates our SmbSetting from the provided source SmbSetting +func (setting *SmbSetting) AssignProperties_From_SmbSetting(source *v20230101s.SmbSetting) error { + + // AuthenticationMethods + setting.AuthenticationMethods = genruntime.ClonePointerToString(source.AuthenticationMethods) + + // ChannelEncryption + setting.ChannelEncryption = genruntime.ClonePointerToString(source.ChannelEncryption) + + // KerberosTicketEncryption + setting.KerberosTicketEncryption = genruntime.ClonePointerToString(source.KerberosTicketEncryption) + + // Multichannel + if source.Multichannel != nil { + var multichannel Multichannel + err := multichannel.AssignProperties_From_Multichannel(source.Multichannel) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Multichannel() to populate field Multichannel") + } + setting.Multichannel = &multichannel + } else { + setting.Multichannel = nil + } + + // Versions + setting.Versions = genruntime.ClonePointerToString(source.Versions) + + // No error + return nil +} + +// AssignProperties_To_SmbSetting populates the provided destination SmbSetting from our SmbSetting +func (setting *SmbSetting) AssignProperties_To_SmbSetting(destination *v20230101s.SmbSetting) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AuthenticationMethods + destination.AuthenticationMethods = genruntime.ClonePointerToString(setting.AuthenticationMethods) + + // ChannelEncryption + destination.ChannelEncryption = genruntime.ClonePointerToString(setting.ChannelEncryption) + + // KerberosTicketEncryption + destination.KerberosTicketEncryption = genruntime.ClonePointerToString(setting.KerberosTicketEncryption) + + // Multichannel + if setting.Multichannel != nil { + var multichannel v20230101s.Multichannel + err := setting.Multichannel.AssignProperties_To_Multichannel(&multichannel) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Multichannel() to populate field Multichannel") + } + destination.Multichannel = &multichannel + } else { + destination.Multichannel = nil + } + + // Versions + destination.Versions = genruntime.ClonePointerToString(setting.Versions) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_SmbSetting_STATUS populates our SmbSetting from the provided source SmbSetting_STATUS +func (setting *SmbSetting) Initialize_From_SmbSetting_STATUS(source *SmbSetting_STATUS) error { + + // AuthenticationMethods + setting.AuthenticationMethods = genruntime.ClonePointerToString(source.AuthenticationMethods) + + // ChannelEncryption + setting.ChannelEncryption = genruntime.ClonePointerToString(source.ChannelEncryption) + + // KerberosTicketEncryption + setting.KerberosTicketEncryption = genruntime.ClonePointerToString(source.KerberosTicketEncryption) + + // Multichannel + if source.Multichannel != nil { + var multichannel Multichannel + err := multichannel.Initialize_From_Multichannel_STATUS(source.Multichannel) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_Multichannel_STATUS() to populate field Multichannel") + } + setting.Multichannel = &multichannel + } else { + setting.Multichannel = nil + } + + // Versions + setting.Versions = genruntime.ClonePointerToString(source.Versions) + + // No error + return nil +} + +// Setting for SMB protocol +type SmbSetting_STATUS struct { + // AuthenticationMethods: SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos. Should be + // passed as a string with delimiter ';'. + AuthenticationMethods *string `json:"authenticationMethods,omitempty"` + + // ChannelEncryption: SMB channel encryption supported by server. Valid values are AES-128-CCM, AES-128-GCM, AES-256-GCM. + // Should be passed as a string with delimiter ';'. + ChannelEncryption *string `json:"channelEncryption,omitempty"` + + // KerberosTicketEncryption: Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256. Should be + // passed as a string with delimiter ';' + KerberosTicketEncryption *string `json:"kerberosTicketEncryption,omitempty"` + + // Multichannel: Multichannel setting. Applies to Premium FileStorage only. + Multichannel *Multichannel_STATUS `json:"multichannel,omitempty"` + + // Versions: SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0, SMB3.1.1. Should be passed as a + // string with delimiter ';'. + Versions *string `json:"versions,omitempty"` +} + +var _ genruntime.FromARMConverter = &SmbSetting_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (setting *SmbSetting_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &SmbSetting_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (setting *SmbSetting_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(SmbSetting_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SmbSetting_STATUS_ARM, got %T", armInput) + } + + // Set property "AuthenticationMethods": + if typedInput.AuthenticationMethods != nil { + authenticationMethods := *typedInput.AuthenticationMethods + setting.AuthenticationMethods = &authenticationMethods + } + + // Set property "ChannelEncryption": + if typedInput.ChannelEncryption != nil { + channelEncryption := *typedInput.ChannelEncryption + setting.ChannelEncryption = &channelEncryption + } + + // Set property "KerberosTicketEncryption": + if typedInput.KerberosTicketEncryption != nil { + kerberosTicketEncryption := *typedInput.KerberosTicketEncryption + setting.KerberosTicketEncryption = &kerberosTicketEncryption + } + + // Set property "Multichannel": + if typedInput.Multichannel != nil { + var multichannel1 Multichannel_STATUS + err := multichannel1.PopulateFromARM(owner, *typedInput.Multichannel) + if err != nil { + return err + } + multichannel := multichannel1 + setting.Multichannel = &multichannel + } + + // Set property "Versions": + if typedInput.Versions != nil { + versions := *typedInput.Versions + setting.Versions = &versions + } + + // No error + return nil +} + +// AssignProperties_From_SmbSetting_STATUS populates our SmbSetting_STATUS from the provided source SmbSetting_STATUS +func (setting *SmbSetting_STATUS) AssignProperties_From_SmbSetting_STATUS(source *v20230101s.SmbSetting_STATUS) error { + + // AuthenticationMethods + setting.AuthenticationMethods = genruntime.ClonePointerToString(source.AuthenticationMethods) + + // ChannelEncryption + setting.ChannelEncryption = genruntime.ClonePointerToString(source.ChannelEncryption) + + // KerberosTicketEncryption + setting.KerberosTicketEncryption = genruntime.ClonePointerToString(source.KerberosTicketEncryption) + + // Multichannel + if source.Multichannel != nil { + var multichannel Multichannel_STATUS + err := multichannel.AssignProperties_From_Multichannel_STATUS(source.Multichannel) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Multichannel_STATUS() to populate field Multichannel") + } + setting.Multichannel = &multichannel + } else { + setting.Multichannel = nil + } + + // Versions + setting.Versions = genruntime.ClonePointerToString(source.Versions) + + // No error + return nil +} + +// AssignProperties_To_SmbSetting_STATUS populates the provided destination SmbSetting_STATUS from our SmbSetting_STATUS +func (setting *SmbSetting_STATUS) AssignProperties_To_SmbSetting_STATUS(destination *v20230101s.SmbSetting_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AuthenticationMethods + destination.AuthenticationMethods = genruntime.ClonePointerToString(setting.AuthenticationMethods) + + // ChannelEncryption + destination.ChannelEncryption = genruntime.ClonePointerToString(setting.ChannelEncryption) + + // KerberosTicketEncryption + destination.KerberosTicketEncryption = genruntime.ClonePointerToString(setting.KerberosTicketEncryption) + + // Multichannel + if setting.Multichannel != nil { + var multichannel v20230101s.Multichannel_STATUS + err := setting.Multichannel.AssignProperties_To_Multichannel_STATUS(&multichannel) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Multichannel_STATUS() to populate field Multichannel") + } + destination.Multichannel = &multichannel + } else { + destination.Multichannel = nil + } + + // Versions + destination.Versions = genruntime.ClonePointerToString(setting.Versions) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Multichannel setting. Applies to Premium FileStorage only. +type Multichannel struct { + // Enabled: Indicates whether multichannel is enabled + Enabled *bool `json:"enabled,omitempty"` +} + +var _ genruntime.ARMTransformer = &Multichannel{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (multichannel *Multichannel) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if multichannel == nil { + return nil, nil + } + result := &Multichannel_ARM{} + + // Set property "Enabled": + if multichannel.Enabled != nil { + enabled := *multichannel.Enabled + result.Enabled = &enabled + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (multichannel *Multichannel) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &Multichannel_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (multichannel *Multichannel) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Multichannel_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Multichannel_ARM, got %T", armInput) + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + multichannel.Enabled = &enabled + } + + // No error + return nil +} + +// AssignProperties_From_Multichannel populates our Multichannel from the provided source Multichannel +func (multichannel *Multichannel) AssignProperties_From_Multichannel(source *v20230101s.Multichannel) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + multichannel.Enabled = &enabled + } else { + multichannel.Enabled = nil + } + + // No error + return nil +} + +// AssignProperties_To_Multichannel populates the provided destination Multichannel from our Multichannel +func (multichannel *Multichannel) AssignProperties_To_Multichannel(destination *v20230101s.Multichannel) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Enabled + if multichannel.Enabled != nil { + enabled := *multichannel.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_Multichannel_STATUS populates our Multichannel from the provided source Multichannel_STATUS +func (multichannel *Multichannel) Initialize_From_Multichannel_STATUS(source *Multichannel_STATUS) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + multichannel.Enabled = &enabled + } else { + multichannel.Enabled = nil + } + + // No error + return nil +} + +// Multichannel setting. Applies to Premium FileStorage only. +type Multichannel_STATUS struct { + // Enabled: Indicates whether multichannel is enabled + Enabled *bool `json:"enabled,omitempty"` +} + +var _ genruntime.FromARMConverter = &Multichannel_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (multichannel *Multichannel_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &Multichannel_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (multichannel *Multichannel_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Multichannel_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Multichannel_STATUS_ARM, got %T", armInput) + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + multichannel.Enabled = &enabled + } + + // No error + return nil +} + +// AssignProperties_From_Multichannel_STATUS populates our Multichannel_STATUS from the provided source Multichannel_STATUS +func (multichannel *Multichannel_STATUS) AssignProperties_From_Multichannel_STATUS(source *v20230101s.Multichannel_STATUS) error { + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + multichannel.Enabled = &enabled + } else { + multichannel.Enabled = nil + } + + // No error + return nil +} + +// AssignProperties_To_Multichannel_STATUS populates the provided destination Multichannel_STATUS from our Multichannel_STATUS +func (multichannel *Multichannel_STATUS) AssignProperties_To_Multichannel_STATUS(destination *v20230101s.Multichannel_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Enabled + if multichannel.Enabled != nil { + enabled := *multichannel.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&StorageAccountsFileService{}, &StorageAccountsFileServiceList{}) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_service_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_file_service_types_gen_test.go new file mode 100644 index 00000000000..96efaf7f55b --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_file_service_types_gen_test.go @@ -0,0 +1,1041 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsFileService_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsFileService to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsFileService, StorageAccountsFileServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsFileService tests if a specific instance of StorageAccountsFileService round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsFileService(subject StorageAccountsFileService) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsFileService + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsFileService + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsFileService_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsFileService to StorageAccountsFileService via AssignProperties_To_StorageAccountsFileService & AssignProperties_From_StorageAccountsFileService returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsFileService, StorageAccountsFileServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsFileService tests if a specific instance of StorageAccountsFileService can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsFileService(subject StorageAccountsFileService) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsFileService + err := copied.AssignProperties_To_StorageAccountsFileService(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsFileService + err = actual.AssignProperties_From_StorageAccountsFileService(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsFileService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsFileService via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsFileService, StorageAccountsFileServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsFileService runs a test to see if a specific instance of StorageAccountsFileService round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsFileService(subject StorageAccountsFileService) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsFileService + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsFileService instances for property testing - lazily instantiated by +// StorageAccountsFileServiceGenerator() +var storageAccountsFileServiceGenerator gopter.Gen + +// StorageAccountsFileServiceGenerator returns a generator of StorageAccountsFileService instances for property testing. +func StorageAccountsFileServiceGenerator() gopter.Gen { + if storageAccountsFileServiceGenerator != nil { + return storageAccountsFileServiceGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsFileService(generators) + storageAccountsFileServiceGenerator = gen.Struct(reflect.TypeOf(StorageAccountsFileService{}), generators) + + return storageAccountsFileServiceGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsFileService is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsFileService(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_FileService_SpecGenerator() + gens["Status"] = StorageAccounts_FileService_STATUSGenerator() +} + +func Test_StorageAccounts_FileService_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_FileService_Spec to StorageAccounts_FileService_Spec via AssignProperties_To_StorageAccounts_FileService_Spec & AssignProperties_From_StorageAccounts_FileService_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_FileService_Spec, StorageAccounts_FileService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_FileService_Spec tests if a specific instance of StorageAccounts_FileService_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_FileService_Spec(subject StorageAccounts_FileService_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_FileService_Spec + err := copied.AssignProperties_To_StorageAccounts_FileService_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_FileService_Spec + err = actual.AssignProperties_From_StorageAccounts_FileService_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_FileService_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileService_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileService_Spec, StorageAccounts_FileService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileService_Spec runs a test to see if a specific instance of StorageAccounts_FileService_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileService_Spec(subject StorageAccounts_FileService_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileService_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileService_Spec instances for property testing - lazily instantiated by +// StorageAccounts_FileService_SpecGenerator() +var storageAccounts_FileService_SpecGenerator gopter.Gen + +// StorageAccounts_FileService_SpecGenerator returns a generator of StorageAccounts_FileService_Spec instances for property testing. +func StorageAccounts_FileService_SpecGenerator() gopter.Gen { + if storageAccounts_FileService_SpecGenerator != nil { + return storageAccounts_FileService_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Spec(generators) + storageAccounts_FileService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_Spec{}), generators) + + return storageAccounts_FileService_SpecGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileService_Spec(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRulesGenerator()) + gens["ProtocolSettings"] = gen.PtrOf(ProtocolSettingsGenerator()) + gens["ShareDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicyGenerator()) +} + +func Test_StorageAccounts_FileService_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_FileService_STATUS to StorageAccounts_FileService_STATUS via AssignProperties_To_StorageAccounts_FileService_STATUS & AssignProperties_From_StorageAccounts_FileService_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_FileService_STATUS, StorageAccounts_FileService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_FileService_STATUS tests if a specific instance of StorageAccounts_FileService_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_FileService_STATUS(subject StorageAccounts_FileService_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_FileService_STATUS + err := copied.AssignProperties_To_StorageAccounts_FileService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_FileService_STATUS + err = actual.AssignProperties_From_StorageAccounts_FileService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_FileService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileService_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileService_STATUS, StorageAccounts_FileService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileService_STATUS runs a test to see if a specific instance of StorageAccounts_FileService_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileService_STATUS(subject StorageAccounts_FileService_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileService_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileService_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_FileService_STATUSGenerator() +var storageAccounts_FileService_STATUSGenerator gopter.Gen + +// StorageAccounts_FileService_STATUSGenerator returns a generator of StorageAccounts_FileService_STATUS instances for property testing. +// We first initialize storageAccounts_FileService_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_FileService_STATUSGenerator() gopter.Gen { + if storageAccounts_FileService_STATUSGenerator != nil { + return storageAccounts_FileService_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileService_STATUS(generators) + storageAccounts_FileService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileService_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_FileService_STATUS(generators) + storageAccounts_FileService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileService_STATUS{}), generators) + + return storageAccounts_FileService_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_FileService_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_FileService_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileService_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileService_STATUS(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRules_STATUSGenerator()) + gens["ProtocolSettings"] = gen.PtrOf(ProtocolSettings_STATUSGenerator()) + gens["ShareDeleteRetentionPolicy"] = gen.PtrOf(DeleteRetentionPolicy_STATUSGenerator()) + gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator()) +} + +func Test_ProtocolSettings_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ProtocolSettings to ProtocolSettings via AssignProperties_To_ProtocolSettings & AssignProperties_From_ProtocolSettings returns original", + prop.ForAll(RunPropertyAssignmentTestForProtocolSettings, ProtocolSettingsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForProtocolSettings tests if a specific instance of ProtocolSettings can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForProtocolSettings(subject ProtocolSettings) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ProtocolSettings + err := copied.AssignProperties_To_ProtocolSettings(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ProtocolSettings + err = actual.AssignProperties_From_ProtocolSettings(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ProtocolSettings_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ProtocolSettings via JSON returns original", + prop.ForAll(RunJSONSerializationTestForProtocolSettings, ProtocolSettingsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForProtocolSettings runs a test to see if a specific instance of ProtocolSettings round trips to JSON and back losslessly +func RunJSONSerializationTestForProtocolSettings(subject ProtocolSettings) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ProtocolSettings + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ProtocolSettings instances for property testing - lazily instantiated by ProtocolSettingsGenerator() +var protocolSettingsGenerator gopter.Gen + +// ProtocolSettingsGenerator returns a generator of ProtocolSettings instances for property testing. +func ProtocolSettingsGenerator() gopter.Gen { + if protocolSettingsGenerator != nil { + return protocolSettingsGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForProtocolSettings(generators) + protocolSettingsGenerator = gen.Struct(reflect.TypeOf(ProtocolSettings{}), generators) + + return protocolSettingsGenerator +} + +// AddRelatedPropertyGeneratorsForProtocolSettings is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForProtocolSettings(gens map[string]gopter.Gen) { + gens["Smb"] = gen.PtrOf(SmbSettingGenerator()) +} + +func Test_ProtocolSettings_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ProtocolSettings_STATUS to ProtocolSettings_STATUS via AssignProperties_To_ProtocolSettings_STATUS & AssignProperties_From_ProtocolSettings_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForProtocolSettings_STATUS, ProtocolSettings_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForProtocolSettings_STATUS tests if a specific instance of ProtocolSettings_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForProtocolSettings_STATUS(subject ProtocolSettings_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ProtocolSettings_STATUS + err := copied.AssignProperties_To_ProtocolSettings_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ProtocolSettings_STATUS + err = actual.AssignProperties_From_ProtocolSettings_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ProtocolSettings_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ProtocolSettings_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForProtocolSettings_STATUS, ProtocolSettings_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForProtocolSettings_STATUS runs a test to see if a specific instance of ProtocolSettings_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForProtocolSettings_STATUS(subject ProtocolSettings_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ProtocolSettings_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ProtocolSettings_STATUS instances for property testing - lazily instantiated by +// ProtocolSettings_STATUSGenerator() +var protocolSettings_STATUSGenerator gopter.Gen + +// ProtocolSettings_STATUSGenerator returns a generator of ProtocolSettings_STATUS instances for property testing. +func ProtocolSettings_STATUSGenerator() gopter.Gen { + if protocolSettings_STATUSGenerator != nil { + return protocolSettings_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForProtocolSettings_STATUS(generators) + protocolSettings_STATUSGenerator = gen.Struct(reflect.TypeOf(ProtocolSettings_STATUS{}), generators) + + return protocolSettings_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForProtocolSettings_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForProtocolSettings_STATUS(gens map[string]gopter.Gen) { + gens["Smb"] = gen.PtrOf(SmbSetting_STATUSGenerator()) +} + +func Test_SmbSetting_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SmbSetting to SmbSetting via AssignProperties_To_SmbSetting & AssignProperties_From_SmbSetting returns original", + prop.ForAll(RunPropertyAssignmentTestForSmbSetting, SmbSettingGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSmbSetting tests if a specific instance of SmbSetting can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSmbSetting(subject SmbSetting) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.SmbSetting + err := copied.AssignProperties_To_SmbSetting(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SmbSetting + err = actual.AssignProperties_From_SmbSetting(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_SmbSetting_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SmbSetting via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSmbSetting, SmbSettingGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSmbSetting runs a test to see if a specific instance of SmbSetting round trips to JSON and back losslessly +func RunJSONSerializationTestForSmbSetting(subject SmbSetting) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SmbSetting + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SmbSetting instances for property testing - lazily instantiated by SmbSettingGenerator() +var smbSettingGenerator gopter.Gen + +// SmbSettingGenerator returns a generator of SmbSetting instances for property testing. +// We first initialize smbSettingGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func SmbSettingGenerator() gopter.Gen { + if smbSettingGenerator != nil { + return smbSettingGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSmbSetting(generators) + smbSettingGenerator = gen.Struct(reflect.TypeOf(SmbSetting{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSmbSetting(generators) + AddRelatedPropertyGeneratorsForSmbSetting(generators) + smbSettingGenerator = gen.Struct(reflect.TypeOf(SmbSetting{}), generators) + + return smbSettingGenerator +} + +// AddIndependentPropertyGeneratorsForSmbSetting is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSmbSetting(gens map[string]gopter.Gen) { + gens["AuthenticationMethods"] = gen.PtrOf(gen.AlphaString()) + gens["ChannelEncryption"] = gen.PtrOf(gen.AlphaString()) + gens["KerberosTicketEncryption"] = gen.PtrOf(gen.AlphaString()) + gens["Versions"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForSmbSetting is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSmbSetting(gens map[string]gopter.Gen) { + gens["Multichannel"] = gen.PtrOf(MultichannelGenerator()) +} + +func Test_SmbSetting_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SmbSetting_STATUS to SmbSetting_STATUS via AssignProperties_To_SmbSetting_STATUS & AssignProperties_From_SmbSetting_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSmbSetting_STATUS, SmbSetting_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSmbSetting_STATUS tests if a specific instance of SmbSetting_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSmbSetting_STATUS(subject SmbSetting_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.SmbSetting_STATUS + err := copied.AssignProperties_To_SmbSetting_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SmbSetting_STATUS + err = actual.AssignProperties_From_SmbSetting_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_SmbSetting_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SmbSetting_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSmbSetting_STATUS, SmbSetting_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSmbSetting_STATUS runs a test to see if a specific instance of SmbSetting_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSmbSetting_STATUS(subject SmbSetting_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SmbSetting_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SmbSetting_STATUS instances for property testing - lazily instantiated by SmbSetting_STATUSGenerator() +var smbSetting_STATUSGenerator gopter.Gen + +// SmbSetting_STATUSGenerator returns a generator of SmbSetting_STATUS instances for property testing. +// We first initialize smbSetting_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func SmbSetting_STATUSGenerator() gopter.Gen { + if smbSetting_STATUSGenerator != nil { + return smbSetting_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSmbSetting_STATUS(generators) + smbSetting_STATUSGenerator = gen.Struct(reflect.TypeOf(SmbSetting_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSmbSetting_STATUS(generators) + AddRelatedPropertyGeneratorsForSmbSetting_STATUS(generators) + smbSetting_STATUSGenerator = gen.Struct(reflect.TypeOf(SmbSetting_STATUS{}), generators) + + return smbSetting_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSmbSetting_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSmbSetting_STATUS(gens map[string]gopter.Gen) { + gens["AuthenticationMethods"] = gen.PtrOf(gen.AlphaString()) + gens["ChannelEncryption"] = gen.PtrOf(gen.AlphaString()) + gens["KerberosTicketEncryption"] = gen.PtrOf(gen.AlphaString()) + gens["Versions"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForSmbSetting_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSmbSetting_STATUS(gens map[string]gopter.Gen) { + gens["Multichannel"] = gen.PtrOf(Multichannel_STATUSGenerator()) +} + +func Test_Multichannel_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Multichannel to Multichannel via AssignProperties_To_Multichannel & AssignProperties_From_Multichannel returns original", + prop.ForAll(RunPropertyAssignmentTestForMultichannel, MultichannelGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForMultichannel tests if a specific instance of Multichannel can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForMultichannel(subject Multichannel) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Multichannel + err := copied.AssignProperties_To_Multichannel(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Multichannel + err = actual.AssignProperties_From_Multichannel(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_Multichannel_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Multichannel via JSON returns original", + prop.ForAll(RunJSONSerializationTestForMultichannel, MultichannelGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForMultichannel runs a test to see if a specific instance of Multichannel round trips to JSON and back losslessly +func RunJSONSerializationTestForMultichannel(subject Multichannel) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Multichannel + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Multichannel instances for property testing - lazily instantiated by MultichannelGenerator() +var multichannelGenerator gopter.Gen + +// MultichannelGenerator returns a generator of Multichannel instances for property testing. +func MultichannelGenerator() gopter.Gen { + if multichannelGenerator != nil { + return multichannelGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForMultichannel(generators) + multichannelGenerator = gen.Struct(reflect.TypeOf(Multichannel{}), generators) + + return multichannelGenerator +} + +// AddIndependentPropertyGeneratorsForMultichannel is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForMultichannel(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} + +func Test_Multichannel_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Multichannel_STATUS to Multichannel_STATUS via AssignProperties_To_Multichannel_STATUS & AssignProperties_From_Multichannel_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForMultichannel_STATUS, Multichannel_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForMultichannel_STATUS tests if a specific instance of Multichannel_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForMultichannel_STATUS(subject Multichannel_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.Multichannel_STATUS + err := copied.AssignProperties_To_Multichannel_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Multichannel_STATUS + err = actual.AssignProperties_From_Multichannel_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_Multichannel_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Multichannel_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForMultichannel_STATUS, Multichannel_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForMultichannel_STATUS runs a test to see if a specific instance of Multichannel_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForMultichannel_STATUS(subject Multichannel_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Multichannel_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Multichannel_STATUS instances for property testing - lazily instantiated by +// Multichannel_STATUSGenerator() +var multichannel_STATUSGenerator gopter.Gen + +// Multichannel_STATUSGenerator returns a generator of Multichannel_STATUS instances for property testing. +func Multichannel_STATUSGenerator() gopter.Gen { + if multichannel_STATUSGenerator != nil { + return multichannel_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForMultichannel_STATUS(generators) + multichannel_STATUSGenerator = gen.Struct(reflect.TypeOf(Multichannel_STATUS{}), generators) + + return multichannel_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForMultichannel_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForMultichannel_STATUS(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_services_share_spec_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_spec_arm_types_gen.go new file mode 100644 index 00000000000..7c9e75fd5e3 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_spec_arm_types_gen.go @@ -0,0 +1,71 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type StorageAccounts_FileServices_Share_Spec_ARM struct { + Name string `json:"name,omitempty"` + + // Properties: Properties of the file share. + Properties *FileShareProperties_ARM `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &StorageAccounts_FileServices_Share_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (share StorageAccounts_FileServices_Share_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (share *StorageAccounts_FileServices_Share_Spec_ARM) GetName() string { + return share.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/fileServices/shares" +func (share *StorageAccounts_FileServices_Share_Spec_ARM) GetType() string { + return "Microsoft.Storage/storageAccounts/fileServices/shares" +} + +// The properties of the file share. +type FileShareProperties_ARM struct { + // AccessTier: Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and + // Cool. FileStorage account can choose Premium. + AccessTier *FileShareProperties_AccessTier `json:"accessTier,omitempty"` + + // EnabledProtocols: The authentication protocol that is used for the file share. Can only be specified when creating a + // share. + EnabledProtocols *FileShareProperties_EnabledProtocols `json:"enabledProtocols,omitempty"` + + // Metadata: A name-value pair to associate with the share as metadata. + Metadata map[string]string `json:"metadata"` + + // RootSquash: The property is for NFS share only. The default is NoRootSquash. + RootSquash *FileShareProperties_RootSquash `json:"rootSquash,omitempty"` + + // ShareQuota: The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + // For Large File Shares, the maximum size is 102400. + ShareQuota *int `json:"shareQuota,omitempty"` + + // SignedIdentifiers: List of stored access policies specified on the share. + SignedIdentifiers []SignedIdentifier_ARM `json:"signedIdentifiers"` +} + +type SignedIdentifier_ARM struct { + // AccessPolicy: Access policy + AccessPolicy *AccessPolicy_ARM `json:"accessPolicy,omitempty"` + Id *string `json:"id,omitempty"` +} + +type AccessPolicy_ARM struct { + // ExpiryTime: Expiry time of the access policy + ExpiryTime *string `json:"expiryTime,omitempty"` + + // Permission: List of abbreviated permissions. + Permission *string `json:"permission,omitempty"` + + // StartTime: Start time of the access policy + StartTime *string `json:"startTime,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_services_share_spec_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_spec_arm_types_gen_test.go new file mode 100644 index 00000000000..03a5545f62e --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_spec_arm_types_gen_test.go @@ -0,0 +1,313 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_FileServices_Share_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileServices_Share_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileServices_Share_Spec_ARM, StorageAccounts_FileServices_Share_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileServices_Share_Spec_ARM runs a test to see if a specific instance of StorageAccounts_FileServices_Share_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileServices_Share_Spec_ARM(subject StorageAccounts_FileServices_Share_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileServices_Share_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileServices_Share_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_FileServices_Share_Spec_ARMGenerator() +var storageAccounts_FileServices_Share_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_FileServices_Share_Spec_ARMGenerator returns a generator of StorageAccounts_FileServices_Share_Spec_ARM instances for property testing. +// We first initialize storageAccounts_FileServices_Share_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_FileServices_Share_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_FileServices_Share_Spec_ARMGenerator != nil { + return storageAccounts_FileServices_Share_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec_ARM(generators) + storageAccounts_FileServices_Share_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileServices_Share_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec_ARM(generators) + storageAccounts_FileServices_Share_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileServices_Share_Spec_ARM{}), generators) + + return storageAccounts_FileServices_Share_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(FileShareProperties_ARMGenerator()) +} + +func Test_FileShareProperties_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of FileShareProperties_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForFileShareProperties_ARM, FileShareProperties_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForFileShareProperties_ARM runs a test to see if a specific instance of FileShareProperties_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForFileShareProperties_ARM(subject FileShareProperties_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual FileShareProperties_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of FileShareProperties_ARM instances for property testing - lazily instantiated by +// FileShareProperties_ARMGenerator() +var fileShareProperties_ARMGenerator gopter.Gen + +// FileShareProperties_ARMGenerator returns a generator of FileShareProperties_ARM instances for property testing. +// We first initialize fileShareProperties_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func FileShareProperties_ARMGenerator() gopter.Gen { + if fileShareProperties_ARMGenerator != nil { + return fileShareProperties_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForFileShareProperties_ARM(generators) + fileShareProperties_ARMGenerator = gen.Struct(reflect.TypeOf(FileShareProperties_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForFileShareProperties_ARM(generators) + AddRelatedPropertyGeneratorsForFileShareProperties_ARM(generators) + fileShareProperties_ARMGenerator = gen.Struct(reflect.TypeOf(FileShareProperties_ARM{}), generators) + + return fileShareProperties_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForFileShareProperties_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForFileShareProperties_ARM(gens map[string]gopter.Gen) { + gens["AccessTier"] = gen.PtrOf(gen.OneConstOf( + FileShareProperties_AccessTier_Cool, + FileShareProperties_AccessTier_Hot, + FileShareProperties_AccessTier_Premium, + FileShareProperties_AccessTier_TransactionOptimized)) + gens["EnabledProtocols"] = gen.PtrOf(gen.OneConstOf(FileShareProperties_EnabledProtocols_NFS, FileShareProperties_EnabledProtocols_SMB)) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["RootSquash"] = gen.PtrOf(gen.OneConstOf(FileShareProperties_RootSquash_AllSquash, FileShareProperties_RootSquash_NoRootSquash, FileShareProperties_RootSquash_RootSquash)) + gens["ShareQuota"] = gen.PtrOf(gen.Int()) +} + +// AddRelatedPropertyGeneratorsForFileShareProperties_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForFileShareProperties_ARM(gens map[string]gopter.Gen) { + gens["SignedIdentifiers"] = gen.SliceOf(SignedIdentifier_ARMGenerator()) +} + +func Test_SignedIdentifier_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SignedIdentifier_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSignedIdentifier_ARM, SignedIdentifier_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSignedIdentifier_ARM runs a test to see if a specific instance of SignedIdentifier_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForSignedIdentifier_ARM(subject SignedIdentifier_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SignedIdentifier_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SignedIdentifier_ARM instances for property testing - lazily instantiated by +// SignedIdentifier_ARMGenerator() +var signedIdentifier_ARMGenerator gopter.Gen + +// SignedIdentifier_ARMGenerator returns a generator of SignedIdentifier_ARM instances for property testing. +// We first initialize signedIdentifier_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func SignedIdentifier_ARMGenerator() gopter.Gen { + if signedIdentifier_ARMGenerator != nil { + return signedIdentifier_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSignedIdentifier_ARM(generators) + signedIdentifier_ARMGenerator = gen.Struct(reflect.TypeOf(SignedIdentifier_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSignedIdentifier_ARM(generators) + AddRelatedPropertyGeneratorsForSignedIdentifier_ARM(generators) + signedIdentifier_ARMGenerator = gen.Struct(reflect.TypeOf(SignedIdentifier_ARM{}), generators) + + return signedIdentifier_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForSignedIdentifier_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSignedIdentifier_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForSignedIdentifier_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSignedIdentifier_ARM(gens map[string]gopter.Gen) { + gens["AccessPolicy"] = gen.PtrOf(AccessPolicy_ARMGenerator()) +} + +func Test_AccessPolicy_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccessPolicy_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccessPolicy_ARM, AccessPolicy_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccessPolicy_ARM runs a test to see if a specific instance of AccessPolicy_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForAccessPolicy_ARM(subject AccessPolicy_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccessPolicy_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccessPolicy_ARM instances for property testing - lazily instantiated by AccessPolicy_ARMGenerator() +var accessPolicy_ARMGenerator gopter.Gen + +// AccessPolicy_ARMGenerator returns a generator of AccessPolicy_ARM instances for property testing. +func AccessPolicy_ARMGenerator() gopter.Gen { + if accessPolicy_ARMGenerator != nil { + return accessPolicy_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicy_ARM(generators) + accessPolicy_ARMGenerator = gen.Struct(reflect.TypeOf(AccessPolicy_ARM{}), generators) + + return accessPolicy_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForAccessPolicy_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccessPolicy_ARM(gens map[string]gopter.Gen) { + gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString()) + gens["Permission"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_services_share_status_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_status_arm_types_gen.go new file mode 100644 index 00000000000..51d014b31e5 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_status_arm_types_gen.go @@ -0,0 +1,102 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +type StorageAccounts_FileServices_Share_STATUS_ARM struct { + // Etag: Resource Etag. + Etag *string `json:"etag,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Properties: Properties of the file share. + Properties *FileShareProperties_STATUS_ARM `json:"properties,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// The properties of the file share. +type FileShareProperties_STATUS_ARM struct { + // AccessTier: Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and + // Cool. FileStorage account can choose Premium. + AccessTier *FileShareProperties_AccessTier_STATUS `json:"accessTier,omitempty"` + + // AccessTierChangeTime: Indicates the last modification time for share access tier. + AccessTierChangeTime *string `json:"accessTierChangeTime,omitempty"` + + // AccessTierStatus: Indicates if there is a pending transition for access tier. + AccessTierStatus *string `json:"accessTierStatus,omitempty"` + + // Deleted: Indicates whether the share was deleted. + Deleted *bool `json:"deleted,omitempty"` + + // DeletedTime: The deleted time if the share was deleted. + DeletedTime *string `json:"deletedTime,omitempty"` + + // EnabledProtocols: The authentication protocol that is used for the file share. Can only be specified when creating a + // share. + EnabledProtocols *FileShareProperties_EnabledProtocols_STATUS `json:"enabledProtocols,omitempty"` + + // LastModifiedTime: Returns the date and time the share was last modified. + LastModifiedTime *string `json:"lastModifiedTime,omitempty"` + + // LeaseDuration: Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased. + LeaseDuration *FileShareProperties_LeaseDuration_STATUS `json:"leaseDuration,omitempty"` + + // LeaseState: Lease state of the share. + LeaseState *FileShareProperties_LeaseState_STATUS `json:"leaseState,omitempty"` + + // LeaseStatus: The lease status of the share. + LeaseStatus *FileShareProperties_LeaseStatus_STATUS `json:"leaseStatus,omitempty"` + + // Metadata: A name-value pair to associate with the share as metadata. + Metadata map[string]string `json:"metadata"` + + // RemainingRetentionDays: Remaining retention days for share that was soft deleted. + RemainingRetentionDays *int `json:"remainingRetentionDays,omitempty"` + + // RootSquash: The property is for NFS share only. The default is NoRootSquash. + RootSquash *FileShareProperties_RootSquash_STATUS `json:"rootSquash,omitempty"` + + // ShareQuota: The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + // For Large File Shares, the maximum size is 102400. + ShareQuota *int `json:"shareQuota,omitempty"` + + // ShareUsageBytes: The approximate size of the data stored on the share. Note that this value may not include all recently + // created or recently resized files. + ShareUsageBytes *int `json:"shareUsageBytes,omitempty"` + + // SignedIdentifiers: List of stored access policies specified on the share. + SignedIdentifiers []SignedIdentifier_STATUS_ARM `json:"signedIdentifiers"` + + // SnapshotTime: Creation time of share snapshot returned in the response of list shares with expand param "snapshots". + SnapshotTime *string `json:"snapshotTime,omitempty"` + + // Version: The version of the share. + Version *string `json:"version,omitempty"` +} + +type SignedIdentifier_STATUS_ARM struct { + // AccessPolicy: Access policy + AccessPolicy *AccessPolicy_STATUS_ARM `json:"accessPolicy,omitempty"` + + // Id: An unique identifier of the stored access policy. + Id *string `json:"id,omitempty"` +} + +type AccessPolicy_STATUS_ARM struct { + // ExpiryTime: Expiry time of the access policy + ExpiryTime *string `json:"expiryTime,omitempty"` + + // Permission: List of abbreviated permissions. + Permission *string `json:"permission,omitempty"` + + // StartTime: Start time of the access policy + StartTime *string `json:"startTime,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_services_share_status_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_status_arm_types_gen_test.go new file mode 100644 index 00000000000..8ebea188a41 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_status_arm_types_gen_test.go @@ -0,0 +1,334 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_FileServices_Share_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileServices_Share_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileServices_Share_STATUS_ARM, StorageAccounts_FileServices_Share_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileServices_Share_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_FileServices_Share_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileServices_Share_STATUS_ARM(subject StorageAccounts_FileServices_Share_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileServices_Share_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileServices_Share_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccounts_FileServices_Share_STATUS_ARMGenerator() +var storageAccounts_FileServices_Share_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_FileServices_Share_STATUS_ARMGenerator returns a generator of StorageAccounts_FileServices_Share_STATUS_ARM instances for property testing. +// We first initialize storageAccounts_FileServices_Share_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_FileServices_Share_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_FileServices_Share_STATUS_ARMGenerator != nil { + return storageAccounts_FileServices_Share_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS_ARM(generators) + storageAccounts_FileServices_Share_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileServices_Share_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS_ARM(generators) + storageAccounts_FileServices_Share_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileServices_Share_STATUS_ARM{}), generators) + + return storageAccounts_FileServices_Share_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(FileShareProperties_STATUS_ARMGenerator()) +} + +func Test_FileShareProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of FileShareProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForFileShareProperties_STATUS_ARM, FileShareProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForFileShareProperties_STATUS_ARM runs a test to see if a specific instance of FileShareProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForFileShareProperties_STATUS_ARM(subject FileShareProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual FileShareProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of FileShareProperties_STATUS_ARM instances for property testing - lazily instantiated by +// FileShareProperties_STATUS_ARMGenerator() +var fileShareProperties_STATUS_ARMGenerator gopter.Gen + +// FileShareProperties_STATUS_ARMGenerator returns a generator of FileShareProperties_STATUS_ARM instances for property testing. +// We first initialize fileShareProperties_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func FileShareProperties_STATUS_ARMGenerator() gopter.Gen { + if fileShareProperties_STATUS_ARMGenerator != nil { + return fileShareProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForFileShareProperties_STATUS_ARM(generators) + fileShareProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(FileShareProperties_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForFileShareProperties_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForFileShareProperties_STATUS_ARM(generators) + fileShareProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(FileShareProperties_STATUS_ARM{}), generators) + + return fileShareProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForFileShareProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForFileShareProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AccessTier"] = gen.PtrOf(gen.OneConstOf( + FileShareProperties_AccessTier_STATUS_Cool, + FileShareProperties_AccessTier_STATUS_Hot, + FileShareProperties_AccessTier_STATUS_Premium, + FileShareProperties_AccessTier_STATUS_TransactionOptimized)) + gens["AccessTierChangeTime"] = gen.PtrOf(gen.AlphaString()) + gens["AccessTierStatus"] = gen.PtrOf(gen.AlphaString()) + gens["Deleted"] = gen.PtrOf(gen.Bool()) + gens["DeletedTime"] = gen.PtrOf(gen.AlphaString()) + gens["EnabledProtocols"] = gen.PtrOf(gen.OneConstOf(FileShareProperties_EnabledProtocols_STATUS_NFS, FileShareProperties_EnabledProtocols_STATUS_SMB)) + gens["LastModifiedTime"] = gen.PtrOf(gen.AlphaString()) + gens["LeaseDuration"] = gen.PtrOf(gen.OneConstOf(FileShareProperties_LeaseDuration_STATUS_Fixed, FileShareProperties_LeaseDuration_STATUS_Infinite)) + gens["LeaseState"] = gen.PtrOf(gen.OneConstOf( + FileShareProperties_LeaseState_STATUS_Available, + FileShareProperties_LeaseState_STATUS_Breaking, + FileShareProperties_LeaseState_STATUS_Broken, + FileShareProperties_LeaseState_STATUS_Expired, + FileShareProperties_LeaseState_STATUS_Leased)) + gens["LeaseStatus"] = gen.PtrOf(gen.OneConstOf(FileShareProperties_LeaseStatus_STATUS_Locked, FileShareProperties_LeaseStatus_STATUS_Unlocked)) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["RemainingRetentionDays"] = gen.PtrOf(gen.Int()) + gens["RootSquash"] = gen.PtrOf(gen.OneConstOf(FileShareProperties_RootSquash_STATUS_AllSquash, FileShareProperties_RootSquash_STATUS_NoRootSquash, FileShareProperties_RootSquash_STATUS_RootSquash)) + gens["ShareQuota"] = gen.PtrOf(gen.Int()) + gens["ShareUsageBytes"] = gen.PtrOf(gen.Int()) + gens["SnapshotTime"] = gen.PtrOf(gen.AlphaString()) + gens["Version"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForFileShareProperties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForFileShareProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["SignedIdentifiers"] = gen.SliceOf(SignedIdentifier_STATUS_ARMGenerator()) +} + +func Test_SignedIdentifier_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SignedIdentifier_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSignedIdentifier_STATUS_ARM, SignedIdentifier_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSignedIdentifier_STATUS_ARM runs a test to see if a specific instance of SignedIdentifier_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForSignedIdentifier_STATUS_ARM(subject SignedIdentifier_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SignedIdentifier_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SignedIdentifier_STATUS_ARM instances for property testing - lazily instantiated by +// SignedIdentifier_STATUS_ARMGenerator() +var signedIdentifier_STATUS_ARMGenerator gopter.Gen + +// SignedIdentifier_STATUS_ARMGenerator returns a generator of SignedIdentifier_STATUS_ARM instances for property testing. +// We first initialize signedIdentifier_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func SignedIdentifier_STATUS_ARMGenerator() gopter.Gen { + if signedIdentifier_STATUS_ARMGenerator != nil { + return signedIdentifier_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSignedIdentifier_STATUS_ARM(generators) + signedIdentifier_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(SignedIdentifier_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSignedIdentifier_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForSignedIdentifier_STATUS_ARM(generators) + signedIdentifier_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(SignedIdentifier_STATUS_ARM{}), generators) + + return signedIdentifier_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForSignedIdentifier_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSignedIdentifier_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForSignedIdentifier_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSignedIdentifier_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AccessPolicy"] = gen.PtrOf(AccessPolicy_STATUS_ARMGenerator()) +} + +func Test_AccessPolicy_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccessPolicy_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccessPolicy_STATUS_ARM, AccessPolicy_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccessPolicy_STATUS_ARM runs a test to see if a specific instance of AccessPolicy_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForAccessPolicy_STATUS_ARM(subject AccessPolicy_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccessPolicy_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccessPolicy_STATUS_ARM instances for property testing - lazily instantiated by +// AccessPolicy_STATUS_ARMGenerator() +var accessPolicy_STATUS_ARMGenerator gopter.Gen + +// AccessPolicy_STATUS_ARMGenerator returns a generator of AccessPolicy_STATUS_ARM instances for property testing. +func AccessPolicy_STATUS_ARMGenerator() gopter.Gen { + if accessPolicy_STATUS_ARMGenerator != nil { + return accessPolicy_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicy_STATUS_ARM(generators) + accessPolicy_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(AccessPolicy_STATUS_ARM{}), generators) + + return accessPolicy_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForAccessPolicy_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccessPolicy_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString()) + gens["Permission"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_services_share_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_types_gen.go new file mode 100644 index 00000000000..e1974a170e0 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_types_gen.go @@ -0,0 +1,1925 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/file.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName} +type StorageAccountsFileServicesShare struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_FileServices_Share_Spec `json:"spec,omitempty"` + Status StorageAccounts_FileServices_Share_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsFileServicesShare{} + +// GetConditions returns the conditions of the resource +func (share *StorageAccountsFileServicesShare) GetConditions() conditions.Conditions { + return share.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (share *StorageAccountsFileServicesShare) SetConditions(conditions conditions.Conditions) { + share.Status.Conditions = conditions +} + +var _ conversion.Convertible = &StorageAccountsFileServicesShare{} + +// ConvertFrom populates our StorageAccountsFileServicesShare from the provided hub StorageAccountsFileServicesShare +func (share *StorageAccountsFileServicesShare) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsFileServicesShare) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsFileServicesShare but received %T instead", hub) + } + + return share.AssignProperties_From_StorageAccountsFileServicesShare(source) +} + +// ConvertTo populates the provided hub StorageAccountsFileServicesShare from our StorageAccountsFileServicesShare +func (share *StorageAccountsFileServicesShare) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsFileServicesShare) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsFileServicesShare but received %T instead", hub) + } + + return share.AssignProperties_To_StorageAccountsFileServicesShare(destination) +} + +// +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20230101-storageaccountsfileservicesshare,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsfileservicesshares,verbs=create;update,versions=v1api20230101,name=default.v1api20230101.storageaccountsfileservicesshares.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &StorageAccountsFileServicesShare{} + +// Default applies defaults to the StorageAccountsFileServicesShare resource +func (share *StorageAccountsFileServicesShare) Default() { + share.defaultImpl() + var temp any = share + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (share *StorageAccountsFileServicesShare) defaultAzureName() { + if share.Spec.AzureName == "" { + share.Spec.AzureName = share.Name + } +} + +// defaultImpl applies the code generated defaults to the StorageAccountsFileServicesShare resource +func (share *StorageAccountsFileServicesShare) defaultImpl() { share.defaultAzureName() } + +var _ genruntime.ImportableResource = &StorageAccountsFileServicesShare{} + +// InitializeSpec initializes the spec for this resource from the given status +func (share *StorageAccountsFileServicesShare) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*StorageAccounts_FileServices_Share_STATUS); ok { + return share.Spec.Initialize_From_StorageAccounts_FileServices_Share_STATUS(s) + } + + return fmt.Errorf("expected Status of type StorageAccounts_FileServices_Share_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &StorageAccountsFileServicesShare{} + +// AzureName returns the Azure name of the resource +func (share *StorageAccountsFileServicesShare) AzureName() string { + return share.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (share StorageAccountsFileServicesShare) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (share *StorageAccountsFileServicesShare) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (share *StorageAccountsFileServicesShare) GetSpec() genruntime.ConvertibleSpec { + return &share.Spec +} + +// GetStatus returns the status of this resource +func (share *StorageAccountsFileServicesShare) GetStatus() genruntime.ConvertibleStatus { + return &share.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (share *StorageAccountsFileServicesShare) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/fileServices/shares" +func (share *StorageAccountsFileServicesShare) GetType() string { + return "Microsoft.Storage/storageAccounts/fileServices/shares" +} + +// NewEmptyStatus returns a new empty (blank) status +func (share *StorageAccountsFileServicesShare) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_FileServices_Share_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (share *StorageAccountsFileServicesShare) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(share.Spec) + return share.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (share *StorageAccountsFileServicesShare) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_FileServices_Share_STATUS); ok { + share.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_FileServices_Share_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + share.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-storage-azure-com-v1api20230101-storageaccountsfileservicesshare,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsfileservicesshares,verbs=create;update,versions=v1api20230101,name=validate.v1api20230101.storageaccountsfileservicesshares.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &StorageAccountsFileServicesShare{} + +// ValidateCreate validates the creation of the resource +func (share *StorageAccountsFileServicesShare) ValidateCreate() (admission.Warnings, error) { + validations := share.createValidations() + var temp any = share + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (share *StorageAccountsFileServicesShare) ValidateDelete() (admission.Warnings, error) { + validations := share.deleteValidations() + var temp any = share + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (share *StorageAccountsFileServicesShare) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := share.updateValidations() + var temp any = share + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (share *StorageAccountsFileServicesShare) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){share.validateResourceReferences, share.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (share *StorageAccountsFileServicesShare) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (share *StorageAccountsFileServicesShare) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return share.validateResourceReferences() + }, + share.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return share.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (share *StorageAccountsFileServicesShare) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(share) +} + +// validateResourceReferences validates all resource references +func (share *StorageAccountsFileServicesShare) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&share.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (share *StorageAccountsFileServicesShare) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*StorageAccountsFileServicesShare) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, share) +} + +// AssignProperties_From_StorageAccountsFileServicesShare populates our StorageAccountsFileServicesShare from the provided source StorageAccountsFileServicesShare +func (share *StorageAccountsFileServicesShare) AssignProperties_From_StorageAccountsFileServicesShare(source *v20230101s.StorageAccountsFileServicesShare) error { + + // ObjectMeta + share.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_FileServices_Share_Spec + err := spec.AssignProperties_From_StorageAccounts_FileServices_Share_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_FileServices_Share_Spec() to populate field Spec") + } + share.Spec = spec + + // Status + var status StorageAccounts_FileServices_Share_STATUS + err = status.AssignProperties_From_StorageAccounts_FileServices_Share_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_FileServices_Share_STATUS() to populate field Status") + } + share.Status = status + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsFileServicesShare populates the provided destination StorageAccountsFileServicesShare from our StorageAccountsFileServicesShare +func (share *StorageAccountsFileServicesShare) AssignProperties_To_StorageAccountsFileServicesShare(destination *v20230101s.StorageAccountsFileServicesShare) error { + + // ObjectMeta + destination.ObjectMeta = *share.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_FileServices_Share_Spec + err := share.Spec.AssignProperties_To_StorageAccounts_FileServices_Share_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_FileServices_Share_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_FileServices_Share_STATUS + err = share.Status.AssignProperties_To_StorageAccounts_FileServices_Share_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_FileServices_Share_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (share *StorageAccountsFileServicesShare) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: share.Spec.OriginalVersion(), + Kind: "StorageAccountsFileServicesShare", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/file.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName} +type StorageAccountsFileServicesShareList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsFileServicesShare `json:"items"` +} + +type StorageAccounts_FileServices_Share_Spec struct { + // AccessTier: Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and + // Cool. FileStorage account can choose Premium. + AccessTier *FileShareProperties_AccessTier `json:"accessTier,omitempty"` + + // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:MinLength=3 + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // EnabledProtocols: The authentication protocol that is used for the file share. Can only be specified when creating a + // share. + EnabledProtocols *FileShareProperties_EnabledProtocols `json:"enabledProtocols,omitempty"` + + // Metadata: A name-value pair to associate with the share as metadata. + Metadata map[string]string `json:"metadata,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccountsFileService resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccountsFileService"` + + // RootSquash: The property is for NFS share only. The default is NoRootSquash. + RootSquash *FileShareProperties_RootSquash `json:"rootSquash,omitempty"` + + // +kubebuilder:validation:Maximum=102400 + // +kubebuilder:validation:Minimum=1 + // ShareQuota: The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + // For Large File Shares, the maximum size is 102400. + ShareQuota *int `json:"shareQuota,omitempty"` + + // SignedIdentifiers: List of stored access policies specified on the share. + SignedIdentifiers []SignedIdentifier `json:"signedIdentifiers,omitempty"` +} + +var _ genruntime.ARMTransformer = &StorageAccounts_FileServices_Share_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (share *StorageAccounts_FileServices_Share_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if share == nil { + return nil, nil + } + result := &StorageAccounts_FileServices_Share_Spec_ARM{} + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if share.AccessTier != nil || + share.EnabledProtocols != nil || + share.Metadata != nil || + share.RootSquash != nil || + share.ShareQuota != nil || + share.SignedIdentifiers != nil { + result.Properties = &FileShareProperties_ARM{} + } + if share.AccessTier != nil { + accessTier := *share.AccessTier + result.Properties.AccessTier = &accessTier + } + if share.EnabledProtocols != nil { + enabledProtocols := *share.EnabledProtocols + result.Properties.EnabledProtocols = &enabledProtocols + } + if share.Metadata != nil { + result.Properties.Metadata = make(map[string]string, len(share.Metadata)) + for key, value := range share.Metadata { + result.Properties.Metadata[key] = value + } + } + if share.RootSquash != nil { + rootSquash := *share.RootSquash + result.Properties.RootSquash = &rootSquash + } + if share.ShareQuota != nil { + shareQuota := *share.ShareQuota + result.Properties.ShareQuota = &shareQuota + } + for _, item := range share.SignedIdentifiers { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.Properties.SignedIdentifiers = append(result.Properties.SignedIdentifiers, *item_ARM.(*SignedIdentifier_ARM)) + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (share *StorageAccounts_FileServices_Share_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_FileServices_Share_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (share *StorageAccounts_FileServices_Share_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_FileServices_Share_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_FileServices_Share_Spec_ARM, got %T", armInput) + } + + // Set property "AccessTier": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AccessTier != nil { + accessTier := *typedInput.Properties.AccessTier + share.AccessTier = &accessTier + } + } + + // Set property "AzureName": + share.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "EnabledProtocols": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.EnabledProtocols != nil { + enabledProtocols := *typedInput.Properties.EnabledProtocols + share.EnabledProtocols = &enabledProtocols + } + } + + // Set property "Metadata": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Metadata != nil { + share.Metadata = make(map[string]string, len(typedInput.Properties.Metadata)) + for key, value := range typedInput.Properties.Metadata { + share.Metadata[key] = value + } + } + } + + // Set property "Owner": + share.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "RootSquash": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.RootSquash != nil { + rootSquash := *typedInput.Properties.RootSquash + share.RootSquash = &rootSquash + } + } + + // Set property "ShareQuota": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ShareQuota != nil { + shareQuota := *typedInput.Properties.ShareQuota + share.ShareQuota = &shareQuota + } + } + + // Set property "SignedIdentifiers": + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.SignedIdentifiers { + var item1 SignedIdentifier + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + share.SignedIdentifiers = append(share.SignedIdentifiers, item1) + } + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_FileServices_Share_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_FileServices_Share_Spec from the provided source +func (share *StorageAccounts_FileServices_Share_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20230101s.StorageAccounts_FileServices_Share_Spec) + if ok { + // Populate our instance from source + return share.AssignProperties_From_StorageAccounts_FileServices_Share_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_FileServices_Share_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = share.AssignProperties_From_StorageAccounts_FileServices_Share_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_FileServices_Share_Spec +func (share *StorageAccounts_FileServices_Share_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20230101s.StorageAccounts_FileServices_Share_Spec) + if ok { + // Populate destination from our instance + return share.AssignProperties_To_StorageAccounts_FileServices_Share_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_FileServices_Share_Spec{} + err := share.AssignProperties_To_StorageAccounts_FileServices_Share_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_FileServices_Share_Spec populates our StorageAccounts_FileServices_Share_Spec from the provided source StorageAccounts_FileServices_Share_Spec +func (share *StorageAccounts_FileServices_Share_Spec) AssignProperties_From_StorageAccounts_FileServices_Share_Spec(source *v20230101s.StorageAccounts_FileServices_Share_Spec) error { + + // AccessTier + if source.AccessTier != nil { + accessTier := FileShareProperties_AccessTier(*source.AccessTier) + share.AccessTier = &accessTier + } else { + share.AccessTier = nil + } + + // AzureName + share.AzureName = source.AzureName + + // EnabledProtocols + if source.EnabledProtocols != nil { + enabledProtocol := FileShareProperties_EnabledProtocols(*source.EnabledProtocols) + share.EnabledProtocols = &enabledProtocol + } else { + share.EnabledProtocols = nil + } + + // Metadata + share.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + share.Owner = &owner + } else { + share.Owner = nil + } + + // RootSquash + if source.RootSquash != nil { + rootSquash := FileShareProperties_RootSquash(*source.RootSquash) + share.RootSquash = &rootSquash + } else { + share.RootSquash = nil + } + + // ShareQuota + if source.ShareQuota != nil { + shareQuota := *source.ShareQuota + share.ShareQuota = &shareQuota + } else { + share.ShareQuota = nil + } + + // SignedIdentifiers + if source.SignedIdentifiers != nil { + signedIdentifierList := make([]SignedIdentifier, len(source.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range source.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier SignedIdentifier + err := signedIdentifier.AssignProperties_From_SignedIdentifier(&signedIdentifierItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SignedIdentifier() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + share.SignedIdentifiers = signedIdentifierList + } else { + share.SignedIdentifiers = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_FileServices_Share_Spec populates the provided destination StorageAccounts_FileServices_Share_Spec from our StorageAccounts_FileServices_Share_Spec +func (share *StorageAccounts_FileServices_Share_Spec) AssignProperties_To_StorageAccounts_FileServices_Share_Spec(destination *v20230101s.StorageAccounts_FileServices_Share_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AccessTier + if share.AccessTier != nil { + accessTier := string(*share.AccessTier) + destination.AccessTier = &accessTier + } else { + destination.AccessTier = nil + } + + // AzureName + destination.AzureName = share.AzureName + + // EnabledProtocols + if share.EnabledProtocols != nil { + enabledProtocol := string(*share.EnabledProtocols) + destination.EnabledProtocols = &enabledProtocol + } else { + destination.EnabledProtocols = nil + } + + // Metadata + destination.Metadata = genruntime.CloneMapOfStringToString(share.Metadata) + + // OriginalVersion + destination.OriginalVersion = share.OriginalVersion() + + // Owner + if share.Owner != nil { + owner := share.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // RootSquash + if share.RootSquash != nil { + rootSquash := string(*share.RootSquash) + destination.RootSquash = &rootSquash + } else { + destination.RootSquash = nil + } + + // ShareQuota + if share.ShareQuota != nil { + shareQuota := *share.ShareQuota + destination.ShareQuota = &shareQuota + } else { + destination.ShareQuota = nil + } + + // SignedIdentifiers + if share.SignedIdentifiers != nil { + signedIdentifierList := make([]v20230101s.SignedIdentifier, len(share.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range share.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier v20230101s.SignedIdentifier + err := signedIdentifierItem.AssignProperties_To_SignedIdentifier(&signedIdentifier) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SignedIdentifier() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + destination.SignedIdentifiers = signedIdentifierList + } else { + destination.SignedIdentifiers = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_StorageAccounts_FileServices_Share_STATUS populates our StorageAccounts_FileServices_Share_Spec from the provided source StorageAccounts_FileServices_Share_STATUS +func (share *StorageAccounts_FileServices_Share_Spec) Initialize_From_StorageAccounts_FileServices_Share_STATUS(source *StorageAccounts_FileServices_Share_STATUS) error { + + // AccessTier + if source.AccessTier != nil { + accessTier := FileShareProperties_AccessTier(*source.AccessTier) + share.AccessTier = &accessTier + } else { + share.AccessTier = nil + } + + // EnabledProtocols + if source.EnabledProtocols != nil { + enabledProtocol := FileShareProperties_EnabledProtocols(*source.EnabledProtocols) + share.EnabledProtocols = &enabledProtocol + } else { + share.EnabledProtocols = nil + } + + // Metadata + share.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // RootSquash + if source.RootSquash != nil { + rootSquash := FileShareProperties_RootSquash(*source.RootSquash) + share.RootSquash = &rootSquash + } else { + share.RootSquash = nil + } + + // ShareQuota + if source.ShareQuota != nil { + shareQuota := *source.ShareQuota + share.ShareQuota = &shareQuota + } else { + share.ShareQuota = nil + } + + // SignedIdentifiers + if source.SignedIdentifiers != nil { + signedIdentifierList := make([]SignedIdentifier, len(source.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range source.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier SignedIdentifier + err := signedIdentifier.Initialize_From_SignedIdentifier_STATUS(&signedIdentifierItem) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_SignedIdentifier_STATUS() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + share.SignedIdentifiers = signedIdentifierList + } else { + share.SignedIdentifiers = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (share *StorageAccounts_FileServices_Share_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (share *StorageAccounts_FileServices_Share_Spec) SetAzureName(azureName string) { + share.AzureName = azureName +} + +type StorageAccounts_FileServices_Share_STATUS struct { + // AccessTier: Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and + // Cool. FileStorage account can choose Premium. + AccessTier *FileShareProperties_AccessTier_STATUS `json:"accessTier,omitempty"` + + // AccessTierChangeTime: Indicates the last modification time for share access tier. + AccessTierChangeTime *string `json:"accessTierChangeTime,omitempty"` + + // AccessTierStatus: Indicates if there is a pending transition for access tier. + AccessTierStatus *string `json:"accessTierStatus,omitempty"` + + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // Deleted: Indicates whether the share was deleted. + Deleted *bool `json:"deleted,omitempty"` + + // DeletedTime: The deleted time if the share was deleted. + DeletedTime *string `json:"deletedTime,omitempty"` + + // EnabledProtocols: The authentication protocol that is used for the file share. Can only be specified when creating a + // share. + EnabledProtocols *FileShareProperties_EnabledProtocols_STATUS `json:"enabledProtocols,omitempty"` + + // Etag: Resource Etag. + Etag *string `json:"etag,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // LastModifiedTime: Returns the date and time the share was last modified. + LastModifiedTime *string `json:"lastModifiedTime,omitempty"` + + // LeaseDuration: Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased. + LeaseDuration *FileShareProperties_LeaseDuration_STATUS `json:"leaseDuration,omitempty"` + + // LeaseState: Lease state of the share. + LeaseState *FileShareProperties_LeaseState_STATUS `json:"leaseState,omitempty"` + + // LeaseStatus: The lease status of the share. + LeaseStatus *FileShareProperties_LeaseStatus_STATUS `json:"leaseStatus,omitempty"` + + // Metadata: A name-value pair to associate with the share as metadata. + Metadata map[string]string `json:"metadata,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // RemainingRetentionDays: Remaining retention days for share that was soft deleted. + RemainingRetentionDays *int `json:"remainingRetentionDays,omitempty"` + + // RootSquash: The property is for NFS share only. The default is NoRootSquash. + RootSquash *FileShareProperties_RootSquash_STATUS `json:"rootSquash,omitempty"` + + // ShareQuota: The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + // For Large File Shares, the maximum size is 102400. + ShareQuota *int `json:"shareQuota,omitempty"` + + // ShareUsageBytes: The approximate size of the data stored on the share. Note that this value may not include all recently + // created or recently resized files. + ShareUsageBytes *int `json:"shareUsageBytes,omitempty"` + + // SignedIdentifiers: List of stored access policies specified on the share. + SignedIdentifiers []SignedIdentifier_STATUS `json:"signedIdentifiers,omitempty"` + + // SnapshotTime: Creation time of share snapshot returned in the response of list shares with expand param "snapshots". + SnapshotTime *string `json:"snapshotTime,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` + + // Version: The version of the share. + Version *string `json:"version,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_FileServices_Share_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_FileServices_Share_STATUS from the provided source +func (share *StorageAccounts_FileServices_Share_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20230101s.StorageAccounts_FileServices_Share_STATUS) + if ok { + // Populate our instance from source + return share.AssignProperties_From_StorageAccounts_FileServices_Share_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_FileServices_Share_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = share.AssignProperties_From_StorageAccounts_FileServices_Share_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_FileServices_Share_STATUS +func (share *StorageAccounts_FileServices_Share_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20230101s.StorageAccounts_FileServices_Share_STATUS) + if ok { + // Populate destination from our instance + return share.AssignProperties_To_StorageAccounts_FileServices_Share_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_FileServices_Share_STATUS{} + err := share.AssignProperties_To_StorageAccounts_FileServices_Share_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &StorageAccounts_FileServices_Share_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (share *StorageAccounts_FileServices_Share_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_FileServices_Share_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (share *StorageAccounts_FileServices_Share_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_FileServices_Share_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_FileServices_Share_STATUS_ARM, got %T", armInput) + } + + // Set property "AccessTier": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AccessTier != nil { + accessTier := *typedInput.Properties.AccessTier + share.AccessTier = &accessTier + } + } + + // Set property "AccessTierChangeTime": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AccessTierChangeTime != nil { + accessTierChangeTime := *typedInput.Properties.AccessTierChangeTime + share.AccessTierChangeTime = &accessTierChangeTime + } + } + + // Set property "AccessTierStatus": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AccessTierStatus != nil { + accessTierStatus := *typedInput.Properties.AccessTierStatus + share.AccessTierStatus = &accessTierStatus + } + } + + // no assignment for property "Conditions" + + // Set property "Deleted": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Deleted != nil { + deleted := *typedInput.Properties.Deleted + share.Deleted = &deleted + } + } + + // Set property "DeletedTime": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DeletedTime != nil { + deletedTime := *typedInput.Properties.DeletedTime + share.DeletedTime = &deletedTime + } + } + + // Set property "EnabledProtocols": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.EnabledProtocols != nil { + enabledProtocols := *typedInput.Properties.EnabledProtocols + share.EnabledProtocols = &enabledProtocols + } + } + + // Set property "Etag": + if typedInput.Etag != nil { + etag := *typedInput.Etag + share.Etag = &etag + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + share.Id = &id + } + + // Set property "LastModifiedTime": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LastModifiedTime != nil { + lastModifiedTime := *typedInput.Properties.LastModifiedTime + share.LastModifiedTime = &lastModifiedTime + } + } + + // Set property "LeaseDuration": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LeaseDuration != nil { + leaseDuration := *typedInput.Properties.LeaseDuration + share.LeaseDuration = &leaseDuration + } + } + + // Set property "LeaseState": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LeaseState != nil { + leaseState := *typedInput.Properties.LeaseState + share.LeaseState = &leaseState + } + } + + // Set property "LeaseStatus": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LeaseStatus != nil { + leaseStatus := *typedInput.Properties.LeaseStatus + share.LeaseStatus = &leaseStatus + } + } + + // Set property "Metadata": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Metadata != nil { + share.Metadata = make(map[string]string, len(typedInput.Properties.Metadata)) + for key, value := range typedInput.Properties.Metadata { + share.Metadata[key] = value + } + } + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + share.Name = &name + } + + // Set property "RemainingRetentionDays": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.RemainingRetentionDays != nil { + remainingRetentionDays := *typedInput.Properties.RemainingRetentionDays + share.RemainingRetentionDays = &remainingRetentionDays + } + } + + // Set property "RootSquash": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.RootSquash != nil { + rootSquash := *typedInput.Properties.RootSquash + share.RootSquash = &rootSquash + } + } + + // Set property "ShareQuota": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ShareQuota != nil { + shareQuota := *typedInput.Properties.ShareQuota + share.ShareQuota = &shareQuota + } + } + + // Set property "ShareUsageBytes": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ShareUsageBytes != nil { + shareUsageBytes := *typedInput.Properties.ShareUsageBytes + share.ShareUsageBytes = &shareUsageBytes + } + } + + // Set property "SignedIdentifiers": + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.SignedIdentifiers { + var item1 SignedIdentifier_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + share.SignedIdentifiers = append(share.SignedIdentifiers, item1) + } + } + + // Set property "SnapshotTime": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.SnapshotTime != nil { + snapshotTime := *typedInput.Properties.SnapshotTime + share.SnapshotTime = &snapshotTime + } + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + share.Type = &typeVar + } + + // Set property "Version": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Version != nil { + version := *typedInput.Properties.Version + share.Version = &version + } + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccounts_FileServices_Share_STATUS populates our StorageAccounts_FileServices_Share_STATUS from the provided source StorageAccounts_FileServices_Share_STATUS +func (share *StorageAccounts_FileServices_Share_STATUS) AssignProperties_From_StorageAccounts_FileServices_Share_STATUS(source *v20230101s.StorageAccounts_FileServices_Share_STATUS) error { + + // AccessTier + if source.AccessTier != nil { + accessTier := FileShareProperties_AccessTier_STATUS(*source.AccessTier) + share.AccessTier = &accessTier + } else { + share.AccessTier = nil + } + + // AccessTierChangeTime + share.AccessTierChangeTime = genruntime.ClonePointerToString(source.AccessTierChangeTime) + + // AccessTierStatus + share.AccessTierStatus = genruntime.ClonePointerToString(source.AccessTierStatus) + + // Conditions + share.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Deleted + if source.Deleted != nil { + deleted := *source.Deleted + share.Deleted = &deleted + } else { + share.Deleted = nil + } + + // DeletedTime + share.DeletedTime = genruntime.ClonePointerToString(source.DeletedTime) + + // EnabledProtocols + if source.EnabledProtocols != nil { + enabledProtocol := FileShareProperties_EnabledProtocols_STATUS(*source.EnabledProtocols) + share.EnabledProtocols = &enabledProtocol + } else { + share.EnabledProtocols = nil + } + + // Etag + share.Etag = genruntime.ClonePointerToString(source.Etag) + + // Id + share.Id = genruntime.ClonePointerToString(source.Id) + + // LastModifiedTime + share.LastModifiedTime = genruntime.ClonePointerToString(source.LastModifiedTime) + + // LeaseDuration + if source.LeaseDuration != nil { + leaseDuration := FileShareProperties_LeaseDuration_STATUS(*source.LeaseDuration) + share.LeaseDuration = &leaseDuration + } else { + share.LeaseDuration = nil + } + + // LeaseState + if source.LeaseState != nil { + leaseState := FileShareProperties_LeaseState_STATUS(*source.LeaseState) + share.LeaseState = &leaseState + } else { + share.LeaseState = nil + } + + // LeaseStatus + if source.LeaseStatus != nil { + leaseStatus := FileShareProperties_LeaseStatus_STATUS(*source.LeaseStatus) + share.LeaseStatus = &leaseStatus + } else { + share.LeaseStatus = nil + } + + // Metadata + share.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // Name + share.Name = genruntime.ClonePointerToString(source.Name) + + // RemainingRetentionDays + share.RemainingRetentionDays = genruntime.ClonePointerToInt(source.RemainingRetentionDays) + + // RootSquash + if source.RootSquash != nil { + rootSquash := FileShareProperties_RootSquash_STATUS(*source.RootSquash) + share.RootSquash = &rootSquash + } else { + share.RootSquash = nil + } + + // ShareQuota + share.ShareQuota = genruntime.ClonePointerToInt(source.ShareQuota) + + // ShareUsageBytes + share.ShareUsageBytes = genruntime.ClonePointerToInt(source.ShareUsageBytes) + + // SignedIdentifiers + if source.SignedIdentifiers != nil { + signedIdentifierList := make([]SignedIdentifier_STATUS, len(source.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range source.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier SignedIdentifier_STATUS + err := signedIdentifier.AssignProperties_From_SignedIdentifier_STATUS(&signedIdentifierItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SignedIdentifier_STATUS() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + share.SignedIdentifiers = signedIdentifierList + } else { + share.SignedIdentifiers = nil + } + + // SnapshotTime + share.SnapshotTime = genruntime.ClonePointerToString(source.SnapshotTime) + + // Type + share.Type = genruntime.ClonePointerToString(source.Type) + + // Version + share.Version = genruntime.ClonePointerToString(source.Version) + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_FileServices_Share_STATUS populates the provided destination StorageAccounts_FileServices_Share_STATUS from our StorageAccounts_FileServices_Share_STATUS +func (share *StorageAccounts_FileServices_Share_STATUS) AssignProperties_To_StorageAccounts_FileServices_Share_STATUS(destination *v20230101s.StorageAccounts_FileServices_Share_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AccessTier + if share.AccessTier != nil { + accessTier := string(*share.AccessTier) + destination.AccessTier = &accessTier + } else { + destination.AccessTier = nil + } + + // AccessTierChangeTime + destination.AccessTierChangeTime = genruntime.ClonePointerToString(share.AccessTierChangeTime) + + // AccessTierStatus + destination.AccessTierStatus = genruntime.ClonePointerToString(share.AccessTierStatus) + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(share.Conditions) + + // Deleted + if share.Deleted != nil { + deleted := *share.Deleted + destination.Deleted = &deleted + } else { + destination.Deleted = nil + } + + // DeletedTime + destination.DeletedTime = genruntime.ClonePointerToString(share.DeletedTime) + + // EnabledProtocols + if share.EnabledProtocols != nil { + enabledProtocol := string(*share.EnabledProtocols) + destination.EnabledProtocols = &enabledProtocol + } else { + destination.EnabledProtocols = nil + } + + // Etag + destination.Etag = genruntime.ClonePointerToString(share.Etag) + + // Id + destination.Id = genruntime.ClonePointerToString(share.Id) + + // LastModifiedTime + destination.LastModifiedTime = genruntime.ClonePointerToString(share.LastModifiedTime) + + // LeaseDuration + if share.LeaseDuration != nil { + leaseDuration := string(*share.LeaseDuration) + destination.LeaseDuration = &leaseDuration + } else { + destination.LeaseDuration = nil + } + + // LeaseState + if share.LeaseState != nil { + leaseState := string(*share.LeaseState) + destination.LeaseState = &leaseState + } else { + destination.LeaseState = nil + } + + // LeaseStatus + if share.LeaseStatus != nil { + leaseStatus := string(*share.LeaseStatus) + destination.LeaseStatus = &leaseStatus + } else { + destination.LeaseStatus = nil + } + + // Metadata + destination.Metadata = genruntime.CloneMapOfStringToString(share.Metadata) + + // Name + destination.Name = genruntime.ClonePointerToString(share.Name) + + // RemainingRetentionDays + destination.RemainingRetentionDays = genruntime.ClonePointerToInt(share.RemainingRetentionDays) + + // RootSquash + if share.RootSquash != nil { + rootSquash := string(*share.RootSquash) + destination.RootSquash = &rootSquash + } else { + destination.RootSquash = nil + } + + // ShareQuota + destination.ShareQuota = genruntime.ClonePointerToInt(share.ShareQuota) + + // ShareUsageBytes + destination.ShareUsageBytes = genruntime.ClonePointerToInt(share.ShareUsageBytes) + + // SignedIdentifiers + if share.SignedIdentifiers != nil { + signedIdentifierList := make([]v20230101s.SignedIdentifier_STATUS, len(share.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range share.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier v20230101s.SignedIdentifier_STATUS + err := signedIdentifierItem.AssignProperties_To_SignedIdentifier_STATUS(&signedIdentifier) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SignedIdentifier_STATUS() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + destination.SignedIdentifiers = signedIdentifierList + } else { + destination.SignedIdentifiers = nil + } + + // SnapshotTime + destination.SnapshotTime = genruntime.ClonePointerToString(share.SnapshotTime) + + // Type + destination.Type = genruntime.ClonePointerToString(share.Type) + + // Version + destination.Version = genruntime.ClonePointerToString(share.Version) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"Cool","Hot","Premium","TransactionOptimized"} +type FileShareProperties_AccessTier string + +const ( + FileShareProperties_AccessTier_Cool = FileShareProperties_AccessTier("Cool") + FileShareProperties_AccessTier_Hot = FileShareProperties_AccessTier("Hot") + FileShareProperties_AccessTier_Premium = FileShareProperties_AccessTier("Premium") + FileShareProperties_AccessTier_TransactionOptimized = FileShareProperties_AccessTier("TransactionOptimized") +) + +type FileShareProperties_AccessTier_STATUS string + +const ( + FileShareProperties_AccessTier_STATUS_Cool = FileShareProperties_AccessTier_STATUS("Cool") + FileShareProperties_AccessTier_STATUS_Hot = FileShareProperties_AccessTier_STATUS("Hot") + FileShareProperties_AccessTier_STATUS_Premium = FileShareProperties_AccessTier_STATUS("Premium") + FileShareProperties_AccessTier_STATUS_TransactionOptimized = FileShareProperties_AccessTier_STATUS("TransactionOptimized") +) + +// +kubebuilder:validation:Enum={"NFS","SMB"} +type FileShareProperties_EnabledProtocols string + +const ( + FileShareProperties_EnabledProtocols_NFS = FileShareProperties_EnabledProtocols("NFS") + FileShareProperties_EnabledProtocols_SMB = FileShareProperties_EnabledProtocols("SMB") +) + +type FileShareProperties_EnabledProtocols_STATUS string + +const ( + FileShareProperties_EnabledProtocols_STATUS_NFS = FileShareProperties_EnabledProtocols_STATUS("NFS") + FileShareProperties_EnabledProtocols_STATUS_SMB = FileShareProperties_EnabledProtocols_STATUS("SMB") +) + +type FileShareProperties_LeaseDuration_STATUS string + +const ( + FileShareProperties_LeaseDuration_STATUS_Fixed = FileShareProperties_LeaseDuration_STATUS("Fixed") + FileShareProperties_LeaseDuration_STATUS_Infinite = FileShareProperties_LeaseDuration_STATUS("Infinite") +) + +type FileShareProperties_LeaseState_STATUS string + +const ( + FileShareProperties_LeaseState_STATUS_Available = FileShareProperties_LeaseState_STATUS("Available") + FileShareProperties_LeaseState_STATUS_Breaking = FileShareProperties_LeaseState_STATUS("Breaking") + FileShareProperties_LeaseState_STATUS_Broken = FileShareProperties_LeaseState_STATUS("Broken") + FileShareProperties_LeaseState_STATUS_Expired = FileShareProperties_LeaseState_STATUS("Expired") + FileShareProperties_LeaseState_STATUS_Leased = FileShareProperties_LeaseState_STATUS("Leased") +) + +type FileShareProperties_LeaseStatus_STATUS string + +const ( + FileShareProperties_LeaseStatus_STATUS_Locked = FileShareProperties_LeaseStatus_STATUS("Locked") + FileShareProperties_LeaseStatus_STATUS_Unlocked = FileShareProperties_LeaseStatus_STATUS("Unlocked") +) + +// +kubebuilder:validation:Enum={"AllSquash","NoRootSquash","RootSquash"} +type FileShareProperties_RootSquash string + +const ( + FileShareProperties_RootSquash_AllSquash = FileShareProperties_RootSquash("AllSquash") + FileShareProperties_RootSquash_NoRootSquash = FileShareProperties_RootSquash("NoRootSquash") + FileShareProperties_RootSquash_RootSquash = FileShareProperties_RootSquash("RootSquash") +) + +type FileShareProperties_RootSquash_STATUS string + +const ( + FileShareProperties_RootSquash_STATUS_AllSquash = FileShareProperties_RootSquash_STATUS("AllSquash") + FileShareProperties_RootSquash_STATUS_NoRootSquash = FileShareProperties_RootSquash_STATUS("NoRootSquash") + FileShareProperties_RootSquash_STATUS_RootSquash = FileShareProperties_RootSquash_STATUS("RootSquash") +) + +type SignedIdentifier struct { + // AccessPolicy: Access policy + AccessPolicy *AccessPolicy `json:"accessPolicy,omitempty"` + + // Reference: An unique identifier of the stored access policy. + Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` +} + +var _ genruntime.ARMTransformer = &SignedIdentifier{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (identifier *SignedIdentifier) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if identifier == nil { + return nil, nil + } + result := &SignedIdentifier_ARM{} + + // Set property "AccessPolicy": + if identifier.AccessPolicy != nil { + accessPolicy_ARM, err := (*identifier.AccessPolicy).ConvertToARM(resolved) + if err != nil { + return nil, err + } + accessPolicy := *accessPolicy_ARM.(*AccessPolicy_ARM) + result.AccessPolicy = &accessPolicy + } + + // Set property "Id": + if identifier.Reference != nil { + referenceARMID, err := resolved.ResolvedReferences.Lookup(*identifier.Reference) + if err != nil { + return nil, err + } + reference := referenceARMID + result.Id = &reference + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identifier *SignedIdentifier) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &SignedIdentifier_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identifier *SignedIdentifier) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(SignedIdentifier_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SignedIdentifier_ARM, got %T", armInput) + } + + // Set property "AccessPolicy": + if typedInput.AccessPolicy != nil { + var accessPolicy1 AccessPolicy + err := accessPolicy1.PopulateFromARM(owner, *typedInput.AccessPolicy) + if err != nil { + return err + } + accessPolicy := accessPolicy1 + identifier.AccessPolicy = &accessPolicy + } + + // no assignment for property "Reference" + + // No error + return nil +} + +// AssignProperties_From_SignedIdentifier populates our SignedIdentifier from the provided source SignedIdentifier +func (identifier *SignedIdentifier) AssignProperties_From_SignedIdentifier(source *v20230101s.SignedIdentifier) error { + + // AccessPolicy + if source.AccessPolicy != nil { + var accessPolicy AccessPolicy + err := accessPolicy.AssignProperties_From_AccessPolicy(source.AccessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AccessPolicy() to populate field AccessPolicy") + } + identifier.AccessPolicy = &accessPolicy + } else { + identifier.AccessPolicy = nil + } + + // Reference + if source.Reference != nil { + reference := source.Reference.Copy() + identifier.Reference = &reference + } else { + identifier.Reference = nil + } + + // No error + return nil +} + +// AssignProperties_To_SignedIdentifier populates the provided destination SignedIdentifier from our SignedIdentifier +func (identifier *SignedIdentifier) AssignProperties_To_SignedIdentifier(destination *v20230101s.SignedIdentifier) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AccessPolicy + if identifier.AccessPolicy != nil { + var accessPolicy v20230101s.AccessPolicy + err := identifier.AccessPolicy.AssignProperties_To_AccessPolicy(&accessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AccessPolicy() to populate field AccessPolicy") + } + destination.AccessPolicy = &accessPolicy + } else { + destination.AccessPolicy = nil + } + + // Reference + if identifier.Reference != nil { + reference := identifier.Reference.Copy() + destination.Reference = &reference + } else { + destination.Reference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_SignedIdentifier_STATUS populates our SignedIdentifier from the provided source SignedIdentifier_STATUS +func (identifier *SignedIdentifier) Initialize_From_SignedIdentifier_STATUS(source *SignedIdentifier_STATUS) error { + + // AccessPolicy + if source.AccessPolicy != nil { + var accessPolicy AccessPolicy + err := accessPolicy.Initialize_From_AccessPolicy_STATUS(source.AccessPolicy) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_AccessPolicy_STATUS() to populate field AccessPolicy") + } + identifier.AccessPolicy = &accessPolicy + } else { + identifier.AccessPolicy = nil + } + + // Reference + if source.Id != nil { + reference := genruntime.CreateResourceReferenceFromARMID(*source.Id) + identifier.Reference = &reference + } else { + identifier.Reference = nil + } + + // No error + return nil +} + +type SignedIdentifier_STATUS struct { + // AccessPolicy: Access policy + AccessPolicy *AccessPolicy_STATUS `json:"accessPolicy,omitempty"` + + // Id: An unique identifier of the stored access policy. + Id *string `json:"id,omitempty"` +} + +var _ genruntime.FromARMConverter = &SignedIdentifier_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identifier *SignedIdentifier_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &SignedIdentifier_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identifier *SignedIdentifier_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(SignedIdentifier_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SignedIdentifier_STATUS_ARM, got %T", armInput) + } + + // Set property "AccessPolicy": + if typedInput.AccessPolicy != nil { + var accessPolicy1 AccessPolicy_STATUS + err := accessPolicy1.PopulateFromARM(owner, *typedInput.AccessPolicy) + if err != nil { + return err + } + accessPolicy := accessPolicy1 + identifier.AccessPolicy = &accessPolicy + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + identifier.Id = &id + } + + // No error + return nil +} + +// AssignProperties_From_SignedIdentifier_STATUS populates our SignedIdentifier_STATUS from the provided source SignedIdentifier_STATUS +func (identifier *SignedIdentifier_STATUS) AssignProperties_From_SignedIdentifier_STATUS(source *v20230101s.SignedIdentifier_STATUS) error { + + // AccessPolicy + if source.AccessPolicy != nil { + var accessPolicy AccessPolicy_STATUS + err := accessPolicy.AssignProperties_From_AccessPolicy_STATUS(source.AccessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AccessPolicy_STATUS() to populate field AccessPolicy") + } + identifier.AccessPolicy = &accessPolicy + } else { + identifier.AccessPolicy = nil + } + + // Id + identifier.Id = genruntime.ClonePointerToString(source.Id) + + // No error + return nil +} + +// AssignProperties_To_SignedIdentifier_STATUS populates the provided destination SignedIdentifier_STATUS from our SignedIdentifier_STATUS +func (identifier *SignedIdentifier_STATUS) AssignProperties_To_SignedIdentifier_STATUS(destination *v20230101s.SignedIdentifier_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AccessPolicy + if identifier.AccessPolicy != nil { + var accessPolicy v20230101s.AccessPolicy_STATUS + err := identifier.AccessPolicy.AssignProperties_To_AccessPolicy_STATUS(&accessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AccessPolicy_STATUS() to populate field AccessPolicy") + } + destination.AccessPolicy = &accessPolicy + } else { + destination.AccessPolicy = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(identifier.Id) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type AccessPolicy struct { + // ExpiryTime: Expiry time of the access policy + ExpiryTime *string `json:"expiryTime,omitempty"` + + // Permission: List of abbreviated permissions. + Permission *string `json:"permission,omitempty"` + + // StartTime: Start time of the access policy + StartTime *string `json:"startTime,omitempty"` +} + +var _ genruntime.ARMTransformer = &AccessPolicy{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (policy *AccessPolicy) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if policy == nil { + return nil, nil + } + result := &AccessPolicy_ARM{} + + // Set property "ExpiryTime": + if policy.ExpiryTime != nil { + expiryTime := *policy.ExpiryTime + result.ExpiryTime = &expiryTime + } + + // Set property "Permission": + if policy.Permission != nil { + permission := *policy.Permission + result.Permission = &permission + } + + // Set property "StartTime": + if policy.StartTime != nil { + startTime := *policy.StartTime + result.StartTime = &startTime + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *AccessPolicy) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &AccessPolicy_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *AccessPolicy) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(AccessPolicy_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AccessPolicy_ARM, got %T", armInput) + } + + // Set property "ExpiryTime": + if typedInput.ExpiryTime != nil { + expiryTime := *typedInput.ExpiryTime + policy.ExpiryTime = &expiryTime + } + + // Set property "Permission": + if typedInput.Permission != nil { + permission := *typedInput.Permission + policy.Permission = &permission + } + + // Set property "StartTime": + if typedInput.StartTime != nil { + startTime := *typedInput.StartTime + policy.StartTime = &startTime + } + + // No error + return nil +} + +// AssignProperties_From_AccessPolicy populates our AccessPolicy from the provided source AccessPolicy +func (policy *AccessPolicy) AssignProperties_From_AccessPolicy(source *v20230101s.AccessPolicy) error { + + // ExpiryTime + policy.ExpiryTime = genruntime.ClonePointerToString(source.ExpiryTime) + + // Permission + policy.Permission = genruntime.ClonePointerToString(source.Permission) + + // StartTime + policy.StartTime = genruntime.ClonePointerToString(source.StartTime) + + // No error + return nil +} + +// AssignProperties_To_AccessPolicy populates the provided destination AccessPolicy from our AccessPolicy +func (policy *AccessPolicy) AssignProperties_To_AccessPolicy(destination *v20230101s.AccessPolicy) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ExpiryTime + destination.ExpiryTime = genruntime.ClonePointerToString(policy.ExpiryTime) + + // Permission + destination.Permission = genruntime.ClonePointerToString(policy.Permission) + + // StartTime + destination.StartTime = genruntime.ClonePointerToString(policy.StartTime) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_AccessPolicy_STATUS populates our AccessPolicy from the provided source AccessPolicy_STATUS +func (policy *AccessPolicy) Initialize_From_AccessPolicy_STATUS(source *AccessPolicy_STATUS) error { + + // ExpiryTime + policy.ExpiryTime = genruntime.ClonePointerToString(source.ExpiryTime) + + // Permission + policy.Permission = genruntime.ClonePointerToString(source.Permission) + + // StartTime + policy.StartTime = genruntime.ClonePointerToString(source.StartTime) + + // No error + return nil +} + +type AccessPolicy_STATUS struct { + // ExpiryTime: Expiry time of the access policy + ExpiryTime *string `json:"expiryTime,omitempty"` + + // Permission: List of abbreviated permissions. + Permission *string `json:"permission,omitempty"` + + // StartTime: Start time of the access policy + StartTime *string `json:"startTime,omitempty"` +} + +var _ genruntime.FromARMConverter = &AccessPolicy_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *AccessPolicy_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &AccessPolicy_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *AccessPolicy_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(AccessPolicy_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AccessPolicy_STATUS_ARM, got %T", armInput) + } + + // Set property "ExpiryTime": + if typedInput.ExpiryTime != nil { + expiryTime := *typedInput.ExpiryTime + policy.ExpiryTime = &expiryTime + } + + // Set property "Permission": + if typedInput.Permission != nil { + permission := *typedInput.Permission + policy.Permission = &permission + } + + // Set property "StartTime": + if typedInput.StartTime != nil { + startTime := *typedInput.StartTime + policy.StartTime = &startTime + } + + // No error + return nil +} + +// AssignProperties_From_AccessPolicy_STATUS populates our AccessPolicy_STATUS from the provided source AccessPolicy_STATUS +func (policy *AccessPolicy_STATUS) AssignProperties_From_AccessPolicy_STATUS(source *v20230101s.AccessPolicy_STATUS) error { + + // ExpiryTime + policy.ExpiryTime = genruntime.ClonePointerToString(source.ExpiryTime) + + // Permission + policy.Permission = genruntime.ClonePointerToString(source.Permission) + + // StartTime + policy.StartTime = genruntime.ClonePointerToString(source.StartTime) + + // No error + return nil +} + +// AssignProperties_To_AccessPolicy_STATUS populates the provided destination AccessPolicy_STATUS from our AccessPolicy_STATUS +func (policy *AccessPolicy_STATUS) AssignProperties_To_AccessPolicy_STATUS(destination *v20230101s.AccessPolicy_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ExpiryTime + destination.ExpiryTime = genruntime.ClonePointerToString(policy.ExpiryTime) + + // Permission + destination.Permission = genruntime.ClonePointerToString(policy.Permission) + + // StartTime + destination.StartTime = genruntime.ClonePointerToString(policy.StartTime) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&StorageAccountsFileServicesShare{}, &StorageAccountsFileServicesShareList{}) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_services_share_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_types_gen_test.go new file mode 100644 index 00000000000..d2797b4a6f6 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_types_gen_test.go @@ -0,0 +1,866 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsFileServicesShare_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsFileServicesShare to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsFileServicesShare, StorageAccountsFileServicesShareGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsFileServicesShare tests if a specific instance of StorageAccountsFileServicesShare round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsFileServicesShare(subject StorageAccountsFileServicesShare) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsFileServicesShare + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsFileServicesShare + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsFileServicesShare_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsFileServicesShare to StorageAccountsFileServicesShare via AssignProperties_To_StorageAccountsFileServicesShare & AssignProperties_From_StorageAccountsFileServicesShare returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsFileServicesShare, StorageAccountsFileServicesShareGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsFileServicesShare tests if a specific instance of StorageAccountsFileServicesShare can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsFileServicesShare(subject StorageAccountsFileServicesShare) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsFileServicesShare + err := copied.AssignProperties_To_StorageAccountsFileServicesShare(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsFileServicesShare + err = actual.AssignProperties_From_StorageAccountsFileServicesShare(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsFileServicesShare_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsFileServicesShare via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsFileServicesShare, StorageAccountsFileServicesShareGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsFileServicesShare runs a test to see if a specific instance of StorageAccountsFileServicesShare round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsFileServicesShare(subject StorageAccountsFileServicesShare) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsFileServicesShare + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsFileServicesShare instances for property testing - lazily instantiated by +// StorageAccountsFileServicesShareGenerator() +var storageAccountsFileServicesShareGenerator gopter.Gen + +// StorageAccountsFileServicesShareGenerator returns a generator of StorageAccountsFileServicesShare instances for property testing. +func StorageAccountsFileServicesShareGenerator() gopter.Gen { + if storageAccountsFileServicesShareGenerator != nil { + return storageAccountsFileServicesShareGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsFileServicesShare(generators) + storageAccountsFileServicesShareGenerator = gen.Struct(reflect.TypeOf(StorageAccountsFileServicesShare{}), generators) + + return storageAccountsFileServicesShareGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsFileServicesShare is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsFileServicesShare(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_FileServices_Share_SpecGenerator() + gens["Status"] = StorageAccounts_FileServices_Share_STATUSGenerator() +} + +func Test_StorageAccounts_FileServices_Share_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_FileServices_Share_Spec to StorageAccounts_FileServices_Share_Spec via AssignProperties_To_StorageAccounts_FileServices_Share_Spec & AssignProperties_From_StorageAccounts_FileServices_Share_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_FileServices_Share_Spec, StorageAccounts_FileServices_Share_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_FileServices_Share_Spec tests if a specific instance of StorageAccounts_FileServices_Share_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_FileServices_Share_Spec(subject StorageAccounts_FileServices_Share_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_FileServices_Share_Spec + err := copied.AssignProperties_To_StorageAccounts_FileServices_Share_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_FileServices_Share_Spec + err = actual.AssignProperties_From_StorageAccounts_FileServices_Share_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_FileServices_Share_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileServices_Share_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileServices_Share_Spec, StorageAccounts_FileServices_Share_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileServices_Share_Spec runs a test to see if a specific instance of StorageAccounts_FileServices_Share_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileServices_Share_Spec(subject StorageAccounts_FileServices_Share_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileServices_Share_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileServices_Share_Spec instances for property testing - lazily instantiated by +// StorageAccounts_FileServices_Share_SpecGenerator() +var storageAccounts_FileServices_Share_SpecGenerator gopter.Gen + +// StorageAccounts_FileServices_Share_SpecGenerator returns a generator of StorageAccounts_FileServices_Share_Spec instances for property testing. +// We first initialize storageAccounts_FileServices_Share_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_FileServices_Share_SpecGenerator() gopter.Gen { + if storageAccounts_FileServices_Share_SpecGenerator != nil { + return storageAccounts_FileServices_Share_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec(generators) + storageAccounts_FileServices_Share_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileServices_Share_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec(generators) + storageAccounts_FileServices_Share_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileServices_Share_Spec{}), generators) + + return storageAccounts_FileServices_Share_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec(gens map[string]gopter.Gen) { + gens["AccessTier"] = gen.PtrOf(gen.OneConstOf( + FileShareProperties_AccessTier_Cool, + FileShareProperties_AccessTier_Hot, + FileShareProperties_AccessTier_Premium, + FileShareProperties_AccessTier_TransactionOptimized)) + gens["AzureName"] = gen.AlphaString() + gens["EnabledProtocols"] = gen.PtrOf(gen.OneConstOf(FileShareProperties_EnabledProtocols_NFS, FileShareProperties_EnabledProtocols_SMB)) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["RootSquash"] = gen.PtrOf(gen.OneConstOf(FileShareProperties_RootSquash_AllSquash, FileShareProperties_RootSquash_NoRootSquash, FileShareProperties_RootSquash_RootSquash)) + gens["ShareQuota"] = gen.PtrOf(gen.Int()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_Spec(gens map[string]gopter.Gen) { + gens["SignedIdentifiers"] = gen.SliceOf(SignedIdentifierGenerator()) +} + +func Test_StorageAccounts_FileServices_Share_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_FileServices_Share_STATUS to StorageAccounts_FileServices_Share_STATUS via AssignProperties_To_StorageAccounts_FileServices_Share_STATUS & AssignProperties_From_StorageAccounts_FileServices_Share_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_FileServices_Share_STATUS, StorageAccounts_FileServices_Share_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_FileServices_Share_STATUS tests if a specific instance of StorageAccounts_FileServices_Share_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_FileServices_Share_STATUS(subject StorageAccounts_FileServices_Share_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_FileServices_Share_STATUS + err := copied.AssignProperties_To_StorageAccounts_FileServices_Share_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_FileServices_Share_STATUS + err = actual.AssignProperties_From_StorageAccounts_FileServices_Share_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_FileServices_Share_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_FileServices_Share_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_FileServices_Share_STATUS, StorageAccounts_FileServices_Share_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_FileServices_Share_STATUS runs a test to see if a specific instance of StorageAccounts_FileServices_Share_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_FileServices_Share_STATUS(subject StorageAccounts_FileServices_Share_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_FileServices_Share_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_FileServices_Share_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_FileServices_Share_STATUSGenerator() +var storageAccounts_FileServices_Share_STATUSGenerator gopter.Gen + +// StorageAccounts_FileServices_Share_STATUSGenerator returns a generator of StorageAccounts_FileServices_Share_STATUS instances for property testing. +// We first initialize storageAccounts_FileServices_Share_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_FileServices_Share_STATUSGenerator() gopter.Gen { + if storageAccounts_FileServices_Share_STATUSGenerator != nil { + return storageAccounts_FileServices_Share_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS(generators) + storageAccounts_FileServices_Share_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileServices_Share_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS(generators) + storageAccounts_FileServices_Share_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_FileServices_Share_STATUS{}), generators) + + return storageAccounts_FileServices_Share_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS(gens map[string]gopter.Gen) { + gens["AccessTier"] = gen.PtrOf(gen.OneConstOf( + FileShareProperties_AccessTier_STATUS_Cool, + FileShareProperties_AccessTier_STATUS_Hot, + FileShareProperties_AccessTier_STATUS_Premium, + FileShareProperties_AccessTier_STATUS_TransactionOptimized)) + gens["AccessTierChangeTime"] = gen.PtrOf(gen.AlphaString()) + gens["AccessTierStatus"] = gen.PtrOf(gen.AlphaString()) + gens["Deleted"] = gen.PtrOf(gen.Bool()) + gens["DeletedTime"] = gen.PtrOf(gen.AlphaString()) + gens["EnabledProtocols"] = gen.PtrOf(gen.OneConstOf(FileShareProperties_EnabledProtocols_STATUS_NFS, FileShareProperties_EnabledProtocols_STATUS_SMB)) + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedTime"] = gen.PtrOf(gen.AlphaString()) + gens["LeaseDuration"] = gen.PtrOf(gen.OneConstOf(FileShareProperties_LeaseDuration_STATUS_Fixed, FileShareProperties_LeaseDuration_STATUS_Infinite)) + gens["LeaseState"] = gen.PtrOf(gen.OneConstOf( + FileShareProperties_LeaseState_STATUS_Available, + FileShareProperties_LeaseState_STATUS_Breaking, + FileShareProperties_LeaseState_STATUS_Broken, + FileShareProperties_LeaseState_STATUS_Expired, + FileShareProperties_LeaseState_STATUS_Leased)) + gens["LeaseStatus"] = gen.PtrOf(gen.OneConstOf(FileShareProperties_LeaseStatus_STATUS_Locked, FileShareProperties_LeaseStatus_STATUS_Unlocked)) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["RemainingRetentionDays"] = gen.PtrOf(gen.Int()) + gens["RootSquash"] = gen.PtrOf(gen.OneConstOf(FileShareProperties_RootSquash_STATUS_AllSquash, FileShareProperties_RootSquash_STATUS_NoRootSquash, FileShareProperties_RootSquash_STATUS_RootSquash)) + gens["ShareQuota"] = gen.PtrOf(gen.Int()) + gens["ShareUsageBytes"] = gen.PtrOf(gen.Int()) + gens["SnapshotTime"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) + gens["Version"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_FileServices_Share_STATUS(gens map[string]gopter.Gen) { + gens["SignedIdentifiers"] = gen.SliceOf(SignedIdentifier_STATUSGenerator()) +} + +func Test_SignedIdentifier_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SignedIdentifier to SignedIdentifier via AssignProperties_To_SignedIdentifier & AssignProperties_From_SignedIdentifier returns original", + prop.ForAll(RunPropertyAssignmentTestForSignedIdentifier, SignedIdentifierGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSignedIdentifier tests if a specific instance of SignedIdentifier can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSignedIdentifier(subject SignedIdentifier) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.SignedIdentifier + err := copied.AssignProperties_To_SignedIdentifier(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SignedIdentifier + err = actual.AssignProperties_From_SignedIdentifier(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_SignedIdentifier_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SignedIdentifier via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSignedIdentifier, SignedIdentifierGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSignedIdentifier runs a test to see if a specific instance of SignedIdentifier round trips to JSON and back losslessly +func RunJSONSerializationTestForSignedIdentifier(subject SignedIdentifier) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SignedIdentifier + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SignedIdentifier instances for property testing - lazily instantiated by SignedIdentifierGenerator() +var signedIdentifierGenerator gopter.Gen + +// SignedIdentifierGenerator returns a generator of SignedIdentifier instances for property testing. +func SignedIdentifierGenerator() gopter.Gen { + if signedIdentifierGenerator != nil { + return signedIdentifierGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForSignedIdentifier(generators) + signedIdentifierGenerator = gen.Struct(reflect.TypeOf(SignedIdentifier{}), generators) + + return signedIdentifierGenerator +} + +// AddRelatedPropertyGeneratorsForSignedIdentifier is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSignedIdentifier(gens map[string]gopter.Gen) { + gens["AccessPolicy"] = gen.PtrOf(AccessPolicyGenerator()) +} + +func Test_SignedIdentifier_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SignedIdentifier_STATUS to SignedIdentifier_STATUS via AssignProperties_To_SignedIdentifier_STATUS & AssignProperties_From_SignedIdentifier_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSignedIdentifier_STATUS, SignedIdentifier_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSignedIdentifier_STATUS tests if a specific instance of SignedIdentifier_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSignedIdentifier_STATUS(subject SignedIdentifier_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.SignedIdentifier_STATUS + err := copied.AssignProperties_To_SignedIdentifier_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SignedIdentifier_STATUS + err = actual.AssignProperties_From_SignedIdentifier_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_SignedIdentifier_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SignedIdentifier_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSignedIdentifier_STATUS, SignedIdentifier_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSignedIdentifier_STATUS runs a test to see if a specific instance of SignedIdentifier_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSignedIdentifier_STATUS(subject SignedIdentifier_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SignedIdentifier_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SignedIdentifier_STATUS instances for property testing - lazily instantiated by +// SignedIdentifier_STATUSGenerator() +var signedIdentifier_STATUSGenerator gopter.Gen + +// SignedIdentifier_STATUSGenerator returns a generator of SignedIdentifier_STATUS instances for property testing. +// We first initialize signedIdentifier_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func SignedIdentifier_STATUSGenerator() gopter.Gen { + if signedIdentifier_STATUSGenerator != nil { + return signedIdentifier_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSignedIdentifier_STATUS(generators) + signedIdentifier_STATUSGenerator = gen.Struct(reflect.TypeOf(SignedIdentifier_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSignedIdentifier_STATUS(generators) + AddRelatedPropertyGeneratorsForSignedIdentifier_STATUS(generators) + signedIdentifier_STATUSGenerator = gen.Struct(reflect.TypeOf(SignedIdentifier_STATUS{}), generators) + + return signedIdentifier_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSignedIdentifier_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSignedIdentifier_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForSignedIdentifier_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSignedIdentifier_STATUS(gens map[string]gopter.Gen) { + gens["AccessPolicy"] = gen.PtrOf(AccessPolicy_STATUSGenerator()) +} + +func Test_AccessPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from AccessPolicy to AccessPolicy via AssignProperties_To_AccessPolicy & AssignProperties_From_AccessPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForAccessPolicy, AccessPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForAccessPolicy tests if a specific instance of AccessPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForAccessPolicy(subject AccessPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.AccessPolicy + err := copied.AssignProperties_To_AccessPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual AccessPolicy + err = actual.AssignProperties_From_AccessPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_AccessPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccessPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccessPolicy, AccessPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccessPolicy runs a test to see if a specific instance of AccessPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForAccessPolicy(subject AccessPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccessPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccessPolicy instances for property testing - lazily instantiated by AccessPolicyGenerator() +var accessPolicyGenerator gopter.Gen + +// AccessPolicyGenerator returns a generator of AccessPolicy instances for property testing. +func AccessPolicyGenerator() gopter.Gen { + if accessPolicyGenerator != nil { + return accessPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicy(generators) + accessPolicyGenerator = gen.Struct(reflect.TypeOf(AccessPolicy{}), generators) + + return accessPolicyGenerator +} + +// AddIndependentPropertyGeneratorsForAccessPolicy is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccessPolicy(gens map[string]gopter.Gen) { + gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString()) + gens["Permission"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_AccessPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from AccessPolicy_STATUS to AccessPolicy_STATUS via AssignProperties_To_AccessPolicy_STATUS & AssignProperties_From_AccessPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForAccessPolicy_STATUS, AccessPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForAccessPolicy_STATUS tests if a specific instance of AccessPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForAccessPolicy_STATUS(subject AccessPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.AccessPolicy_STATUS + err := copied.AssignProperties_To_AccessPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual AccessPolicy_STATUS + err = actual.AssignProperties_From_AccessPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_AccessPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccessPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccessPolicy_STATUS, AccessPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccessPolicy_STATUS runs a test to see if a specific instance of AccessPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForAccessPolicy_STATUS(subject AccessPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccessPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccessPolicy_STATUS instances for property testing - lazily instantiated by +// AccessPolicy_STATUSGenerator() +var accessPolicy_STATUSGenerator gopter.Gen + +// AccessPolicy_STATUSGenerator returns a generator of AccessPolicy_STATUS instances for property testing. +func AccessPolicy_STATUSGenerator() gopter.Gen { + if accessPolicy_STATUSGenerator != nil { + return accessPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicy_STATUS(generators) + accessPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(AccessPolicy_STATUS{}), generators) + + return accessPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForAccessPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccessPolicy_STATUS(gens map[string]gopter.Gen) { + gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString()) + gens["Permission"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_management_policy_spec_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_management_policy_spec_arm_types_gen.go new file mode 100644 index 00000000000..8c5a2b6c7dd --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_management_policy_spec_arm_types_gen.go @@ -0,0 +1,203 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type StorageAccounts_ManagementPolicy_Spec_ARM struct { + Name string `json:"name,omitempty"` + + // Properties: Returns the Storage Account Data Policies Rules. + Properties *ManagementPolicyProperties_ARM `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &StorageAccounts_ManagementPolicy_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (policy StorageAccounts_ManagementPolicy_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (policy *StorageAccounts_ManagementPolicy_Spec_ARM) GetName() string { + return policy.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/managementPolicies" +func (policy *StorageAccounts_ManagementPolicy_Spec_ARM) GetType() string { + return "Microsoft.Storage/storageAccounts/managementPolicies" +} + +// The Storage Account ManagementPolicy properties. +type ManagementPolicyProperties_ARM struct { + // Policy: The Storage Account ManagementPolicy, in JSON format. See more details in: + // https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + Policy *ManagementPolicySchema_ARM `json:"policy,omitempty"` +} + +// The Storage Account ManagementPolicies Rules. See more details in: +// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. +type ManagementPolicySchema_ARM struct { + // Rules: The Storage Account ManagementPolicies Rules. See more details in: + // https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + Rules []ManagementPolicyRule_ARM `json:"rules"` +} + +// An object that wraps the Lifecycle rule. Each rule is uniquely defined by name. +type ManagementPolicyRule_ARM struct { + // Definition: An object that defines the Lifecycle rule. + Definition *ManagementPolicyDefinition_ARM `json:"definition,omitempty"` + + // Enabled: Rule is enabled if set to true. + Enabled *bool `json:"enabled,omitempty"` + + // Name: A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be + // unique within a policy. + Name *string `json:"name,omitempty"` + + // Type: The valid value is Lifecycle + Type *ManagementPolicyRule_Type `json:"type,omitempty"` +} + +// An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set. +type ManagementPolicyDefinition_ARM struct { + // Actions: An object that defines the action set. + Actions *ManagementPolicyAction_ARM `json:"actions,omitempty"` + + // Filters: An object that defines the filter set. + Filters *ManagementPolicyFilter_ARM `json:"filters,omitempty"` +} + +// Actions are applied to the filtered blobs when the execution condition is met. +type ManagementPolicyAction_ARM struct { + // BaseBlob: The management policy action for base blob + BaseBlob *ManagementPolicyBaseBlob_ARM `json:"baseBlob,omitempty"` + + // Snapshot: The management policy action for snapshot + Snapshot *ManagementPolicySnapShot_ARM `json:"snapshot,omitempty"` + + // Version: The management policy action for version + Version *ManagementPolicyVersion_ARM `json:"version,omitempty"` +} + +// Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical +// AND is performed on all filters. +type ManagementPolicyFilter_ARM struct { + // BlobIndexMatch: An array of blob index tag based filters, there can be at most 10 tag filters + BlobIndexMatch []TagFilter_ARM `json:"blobIndexMatch"` + + // BlobTypes: An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete + // actions are supported for appendBlob. + BlobTypes []string `json:"blobTypes"` + + // PrefixMatch: An array of strings for prefixes to be match. + PrefixMatch []string `json:"prefixMatch"` +} + +// Management policy action for base blob. +type ManagementPolicyBaseBlob_ARM struct { + // Delete: The function to delete the blob + Delete *DateAfterModification_ARM `json:"delete,omitempty"` + + // EnableAutoTierToHotFromCool: This property enables auto tiering of a blob from cool to hot on a blob access. This + // property requires tierToCool.daysAfterLastAccessTimeGreaterThan. + EnableAutoTierToHotFromCool *bool `json:"enableAutoTierToHotFromCool,omitempty"` + + // TierToArchive: The function to tier blobs to archive storage. + TierToArchive *DateAfterModification_ARM `json:"tierToArchive,omitempty"` + + // TierToCold: The function to tier blobs to cold storage. + TierToCold *DateAfterModification_ARM `json:"tierToCold,omitempty"` + + // TierToCool: The function to tier blobs to cool storage. + TierToCool *DateAfterModification_ARM `json:"tierToCool,omitempty"` + + // TierToHot: The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage + // Accounts + TierToHot *DateAfterModification_ARM `json:"tierToHot,omitempty"` +} + +// Management policy action for snapshot. +type ManagementPolicySnapShot_ARM struct { + // Delete: The function to delete the blob snapshot + Delete *DateAfterCreation_ARM `json:"delete,omitempty"` + + // TierToArchive: The function to tier blob snapshot to archive storage. + TierToArchive *DateAfterCreation_ARM `json:"tierToArchive,omitempty"` + + // TierToCold: The function to tier blobs to cold storage. + TierToCold *DateAfterCreation_ARM `json:"tierToCold,omitempty"` + + // TierToCool: The function to tier blob snapshot to cool storage. + TierToCool *DateAfterCreation_ARM `json:"tierToCool,omitempty"` + + // TierToHot: The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage + // Accounts + TierToHot *DateAfterCreation_ARM `json:"tierToHot,omitempty"` +} + +// Management policy action for blob version. +type ManagementPolicyVersion_ARM struct { + // Delete: The function to delete the blob version + Delete *DateAfterCreation_ARM `json:"delete,omitempty"` + + // TierToArchive: The function to tier blob version to archive storage. + TierToArchive *DateAfterCreation_ARM `json:"tierToArchive,omitempty"` + + // TierToCold: The function to tier blobs to cold storage. + TierToCold *DateAfterCreation_ARM `json:"tierToCold,omitempty"` + + // TierToCool: The function to tier blob version to cool storage. + TierToCool *DateAfterCreation_ARM `json:"tierToCool,omitempty"` + + // TierToHot: The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage + // Accounts + TierToHot *DateAfterCreation_ARM `json:"tierToHot,omitempty"` +} + +// Blob index tag based filtering for blob objects +type TagFilter_ARM struct { + // Name: This is the filter tag name, it can have 1 - 128 characters + Name *string `json:"name,omitempty"` + + // Op: This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is + // currently supported + Op *string `json:"op,omitempty"` + + // Value: This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters + Value *string `json:"value,omitempty"` +} + +// Object to define snapshot and version action conditions. +type DateAfterCreation_ARM struct { + // DaysAfterCreationGreaterThan: Value indicating the age in days after creation + DaysAfterCreationGreaterThan *int `json:"daysAfterCreationGreaterThan,omitempty"` + + // DaysAfterLastTierChangeGreaterThan: Value indicating the age in days after last blob tier change time. This property is + // only applicable for tierToArchive actions and requires daysAfterCreationGreaterThan to be set for snapshots and blob + // version based actions. The blob will be archived if both the conditions are satisfied. + DaysAfterLastTierChangeGreaterThan *int `json:"daysAfterLastTierChangeGreaterThan,omitempty"` +} + +// Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, +// daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The +// daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires +// daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with +// daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan. +type DateAfterModification_ARM struct { + // DaysAfterCreationGreaterThan: Value indicating the age in days after blob creation. + DaysAfterCreationGreaterThan *int `json:"daysAfterCreationGreaterThan,omitempty"` + + // DaysAfterLastAccessTimeGreaterThan: Value indicating the age in days after last blob access. This property can only be + // used in conjunction with last access time tracking policy + DaysAfterLastAccessTimeGreaterThan *int `json:"daysAfterLastAccessTimeGreaterThan,omitempty"` + + // DaysAfterLastTierChangeGreaterThan: Value indicating the age in days after last blob tier change time. This property is + // only applicable for tierToArchive actions and requires daysAfterModificationGreaterThan to be set for baseBlobs based + // actions. The blob will be archived if both the conditions are satisfied. + DaysAfterLastTierChangeGreaterThan *int `json:"daysAfterLastTierChangeGreaterThan,omitempty"` + + // DaysAfterModificationGreaterThan: Value indicating the age in days after last modification + DaysAfterModificationGreaterThan *int `json:"daysAfterModificationGreaterThan,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_management_policy_spec_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_management_policy_spec_arm_types_gen_test.go new file mode 100644 index 00000000000..ae7a14a4d06 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_management_policy_spec_arm_types_gen_test.go @@ -0,0 +1,890 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_ManagementPolicy_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_ManagementPolicy_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_ManagementPolicy_Spec_ARM, StorageAccounts_ManagementPolicy_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_ManagementPolicy_Spec_ARM runs a test to see if a specific instance of StorageAccounts_ManagementPolicy_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_ManagementPolicy_Spec_ARM(subject StorageAccounts_ManagementPolicy_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_ManagementPolicy_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_ManagementPolicy_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_ManagementPolicy_Spec_ARMGenerator() +var storageAccounts_ManagementPolicy_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_ManagementPolicy_Spec_ARMGenerator returns a generator of StorageAccounts_ManagementPolicy_Spec_ARM instances for property testing. +// We first initialize storageAccounts_ManagementPolicy_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_ManagementPolicy_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_ManagementPolicy_Spec_ARMGenerator != nil { + return storageAccounts_ManagementPolicy_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec_ARM(generators) + storageAccounts_ManagementPolicy_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_ManagementPolicy_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec_ARM(generators) + storageAccounts_ManagementPolicy_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_ManagementPolicy_Spec_ARM{}), generators) + + return storageAccounts_ManagementPolicy_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(ManagementPolicyProperties_ARMGenerator()) +} + +func Test_ManagementPolicyProperties_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyProperties_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyProperties_ARM, ManagementPolicyProperties_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyProperties_ARM runs a test to see if a specific instance of ManagementPolicyProperties_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyProperties_ARM(subject ManagementPolicyProperties_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyProperties_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyProperties_ARM instances for property testing - lazily instantiated by +// ManagementPolicyProperties_ARMGenerator() +var managementPolicyProperties_ARMGenerator gopter.Gen + +// ManagementPolicyProperties_ARMGenerator returns a generator of ManagementPolicyProperties_ARM instances for property testing. +func ManagementPolicyProperties_ARMGenerator() gopter.Gen { + if managementPolicyProperties_ARMGenerator != nil { + return managementPolicyProperties_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyProperties_ARM(generators) + managementPolicyProperties_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyProperties_ARM{}), generators) + + return managementPolicyProperties_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyProperties_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyProperties_ARM(gens map[string]gopter.Gen) { + gens["Policy"] = gen.PtrOf(ManagementPolicySchema_ARMGenerator()) +} + +func Test_ManagementPolicySchema_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicySchema_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicySchema_ARM, ManagementPolicySchema_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicySchema_ARM runs a test to see if a specific instance of ManagementPolicySchema_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicySchema_ARM(subject ManagementPolicySchema_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicySchema_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicySchema_ARM instances for property testing - lazily instantiated by +// ManagementPolicySchema_ARMGenerator() +var managementPolicySchema_ARMGenerator gopter.Gen + +// ManagementPolicySchema_ARMGenerator returns a generator of ManagementPolicySchema_ARM instances for property testing. +func ManagementPolicySchema_ARMGenerator() gopter.Gen { + if managementPolicySchema_ARMGenerator != nil { + return managementPolicySchema_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicySchema_ARM(generators) + managementPolicySchema_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicySchema_ARM{}), generators) + + return managementPolicySchema_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicySchema_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicySchema_ARM(gens map[string]gopter.Gen) { + gens["Rules"] = gen.SliceOf(ManagementPolicyRule_ARMGenerator()) +} + +func Test_ManagementPolicyRule_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyRule_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyRule_ARM, ManagementPolicyRule_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyRule_ARM runs a test to see if a specific instance of ManagementPolicyRule_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyRule_ARM(subject ManagementPolicyRule_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyRule_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyRule_ARM instances for property testing - lazily instantiated by +// ManagementPolicyRule_ARMGenerator() +var managementPolicyRule_ARMGenerator gopter.Gen + +// ManagementPolicyRule_ARMGenerator returns a generator of ManagementPolicyRule_ARM instances for property testing. +// We first initialize managementPolicyRule_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyRule_ARMGenerator() gopter.Gen { + if managementPolicyRule_ARMGenerator != nil { + return managementPolicyRule_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyRule_ARM(generators) + managementPolicyRule_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyRule_ARM(generators) + AddRelatedPropertyGeneratorsForManagementPolicyRule_ARM(generators) + managementPolicyRule_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule_ARM{}), generators) + + return managementPolicyRule_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyRule_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyRule_ARM(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf(ManagementPolicyRule_Type_Lifecycle)) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyRule_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyRule_ARM(gens map[string]gopter.Gen) { + gens["Definition"] = gen.PtrOf(ManagementPolicyDefinition_ARMGenerator()) +} + +func Test_ManagementPolicyDefinition_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyDefinition_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyDefinition_ARM, ManagementPolicyDefinition_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyDefinition_ARM runs a test to see if a specific instance of ManagementPolicyDefinition_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyDefinition_ARM(subject ManagementPolicyDefinition_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyDefinition_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyDefinition_ARM instances for property testing - lazily instantiated by +// ManagementPolicyDefinition_ARMGenerator() +var managementPolicyDefinition_ARMGenerator gopter.Gen + +// ManagementPolicyDefinition_ARMGenerator returns a generator of ManagementPolicyDefinition_ARM instances for property testing. +func ManagementPolicyDefinition_ARMGenerator() gopter.Gen { + if managementPolicyDefinition_ARMGenerator != nil { + return managementPolicyDefinition_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyDefinition_ARM(generators) + managementPolicyDefinition_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyDefinition_ARM{}), generators) + + return managementPolicyDefinition_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyDefinition_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyDefinition_ARM(gens map[string]gopter.Gen) { + gens["Actions"] = gen.PtrOf(ManagementPolicyAction_ARMGenerator()) + gens["Filters"] = gen.PtrOf(ManagementPolicyFilter_ARMGenerator()) +} + +func Test_ManagementPolicyAction_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyAction_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyAction_ARM, ManagementPolicyAction_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyAction_ARM runs a test to see if a specific instance of ManagementPolicyAction_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyAction_ARM(subject ManagementPolicyAction_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyAction_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyAction_ARM instances for property testing - lazily instantiated by +// ManagementPolicyAction_ARMGenerator() +var managementPolicyAction_ARMGenerator gopter.Gen + +// ManagementPolicyAction_ARMGenerator returns a generator of ManagementPolicyAction_ARM instances for property testing. +func ManagementPolicyAction_ARMGenerator() gopter.Gen { + if managementPolicyAction_ARMGenerator != nil { + return managementPolicyAction_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyAction_ARM(generators) + managementPolicyAction_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyAction_ARM{}), generators) + + return managementPolicyAction_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyAction_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyAction_ARM(gens map[string]gopter.Gen) { + gens["BaseBlob"] = gen.PtrOf(ManagementPolicyBaseBlob_ARMGenerator()) + gens["Snapshot"] = gen.PtrOf(ManagementPolicySnapShot_ARMGenerator()) + gens["Version"] = gen.PtrOf(ManagementPolicyVersion_ARMGenerator()) +} + +func Test_ManagementPolicyFilter_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyFilter_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyFilter_ARM, ManagementPolicyFilter_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyFilter_ARM runs a test to see if a specific instance of ManagementPolicyFilter_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyFilter_ARM(subject ManagementPolicyFilter_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyFilter_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyFilter_ARM instances for property testing - lazily instantiated by +// ManagementPolicyFilter_ARMGenerator() +var managementPolicyFilter_ARMGenerator gopter.Gen + +// ManagementPolicyFilter_ARMGenerator returns a generator of ManagementPolicyFilter_ARM instances for property testing. +// We first initialize managementPolicyFilter_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyFilter_ARMGenerator() gopter.Gen { + if managementPolicyFilter_ARMGenerator != nil { + return managementPolicyFilter_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyFilter_ARM(generators) + managementPolicyFilter_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyFilter_ARM(generators) + AddRelatedPropertyGeneratorsForManagementPolicyFilter_ARM(generators) + managementPolicyFilter_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter_ARM{}), generators) + + return managementPolicyFilter_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyFilter_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyFilter_ARM(gens map[string]gopter.Gen) { + gens["BlobTypes"] = gen.SliceOf(gen.AlphaString()) + gens["PrefixMatch"] = gen.SliceOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyFilter_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyFilter_ARM(gens map[string]gopter.Gen) { + gens["BlobIndexMatch"] = gen.SliceOf(TagFilter_ARMGenerator()) +} + +func Test_ManagementPolicyBaseBlob_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyBaseBlob_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyBaseBlob_ARM, ManagementPolicyBaseBlob_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyBaseBlob_ARM runs a test to see if a specific instance of ManagementPolicyBaseBlob_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyBaseBlob_ARM(subject ManagementPolicyBaseBlob_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyBaseBlob_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyBaseBlob_ARM instances for property testing - lazily instantiated by +// ManagementPolicyBaseBlob_ARMGenerator() +var managementPolicyBaseBlob_ARMGenerator gopter.Gen + +// ManagementPolicyBaseBlob_ARMGenerator returns a generator of ManagementPolicyBaseBlob_ARM instances for property testing. +// We first initialize managementPolicyBaseBlob_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyBaseBlob_ARMGenerator() gopter.Gen { + if managementPolicyBaseBlob_ARMGenerator != nil { + return managementPolicyBaseBlob_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_ARM(generators) + managementPolicyBaseBlob_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_ARM(generators) + AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_ARM(generators) + managementPolicyBaseBlob_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob_ARM{}), generators) + + return managementPolicyBaseBlob_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_ARM(gens map[string]gopter.Gen) { + gens["EnableAutoTierToHotFromCool"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_ARM(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterModification_ARMGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterModification_ARMGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterModification_ARMGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterModification_ARMGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterModification_ARMGenerator()) +} + +func Test_ManagementPolicySnapShot_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicySnapShot_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicySnapShot_ARM, ManagementPolicySnapShot_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicySnapShot_ARM runs a test to see if a specific instance of ManagementPolicySnapShot_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicySnapShot_ARM(subject ManagementPolicySnapShot_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicySnapShot_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicySnapShot_ARM instances for property testing - lazily instantiated by +// ManagementPolicySnapShot_ARMGenerator() +var managementPolicySnapShot_ARMGenerator gopter.Gen + +// ManagementPolicySnapShot_ARMGenerator returns a generator of ManagementPolicySnapShot_ARM instances for property testing. +func ManagementPolicySnapShot_ARMGenerator() gopter.Gen { + if managementPolicySnapShot_ARMGenerator != nil { + return managementPolicySnapShot_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicySnapShot_ARM(generators) + managementPolicySnapShot_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicySnapShot_ARM{}), generators) + + return managementPolicySnapShot_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicySnapShot_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicySnapShot_ARM(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterCreation_ARMGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterCreation_ARMGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterCreation_ARMGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterCreation_ARMGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterCreation_ARMGenerator()) +} + +func Test_ManagementPolicyVersion_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyVersion_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyVersion_ARM, ManagementPolicyVersion_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyVersion_ARM runs a test to see if a specific instance of ManagementPolicyVersion_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyVersion_ARM(subject ManagementPolicyVersion_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyVersion_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyVersion_ARM instances for property testing - lazily instantiated by +// ManagementPolicyVersion_ARMGenerator() +var managementPolicyVersion_ARMGenerator gopter.Gen + +// ManagementPolicyVersion_ARMGenerator returns a generator of ManagementPolicyVersion_ARM instances for property testing. +func ManagementPolicyVersion_ARMGenerator() gopter.Gen { + if managementPolicyVersion_ARMGenerator != nil { + return managementPolicyVersion_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyVersion_ARM(generators) + managementPolicyVersion_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyVersion_ARM{}), generators) + + return managementPolicyVersion_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyVersion_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyVersion_ARM(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterCreation_ARMGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterCreation_ARMGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterCreation_ARMGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterCreation_ARMGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterCreation_ARMGenerator()) +} + +func Test_TagFilter_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TagFilter_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTagFilter_ARM, TagFilter_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTagFilter_ARM runs a test to see if a specific instance of TagFilter_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForTagFilter_ARM(subject TagFilter_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TagFilter_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TagFilter_ARM instances for property testing - lazily instantiated by TagFilter_ARMGenerator() +var tagFilter_ARMGenerator gopter.Gen + +// TagFilter_ARMGenerator returns a generator of TagFilter_ARM instances for property testing. +func TagFilter_ARMGenerator() gopter.Gen { + if tagFilter_ARMGenerator != nil { + return tagFilter_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTagFilter_ARM(generators) + tagFilter_ARMGenerator = gen.Struct(reflect.TypeOf(TagFilter_ARM{}), generators) + + return tagFilter_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForTagFilter_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTagFilter_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Op"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_DateAfterCreation_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DateAfterCreation_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDateAfterCreation_ARM, DateAfterCreation_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDateAfterCreation_ARM runs a test to see if a specific instance of DateAfterCreation_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForDateAfterCreation_ARM(subject DateAfterCreation_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DateAfterCreation_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DateAfterCreation_ARM instances for property testing - lazily instantiated by +// DateAfterCreation_ARMGenerator() +var dateAfterCreation_ARMGenerator gopter.Gen + +// DateAfterCreation_ARMGenerator returns a generator of DateAfterCreation_ARM instances for property testing. +func DateAfterCreation_ARMGenerator() gopter.Gen { + if dateAfterCreation_ARMGenerator != nil { + return dateAfterCreation_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDateAfterCreation_ARM(generators) + dateAfterCreation_ARMGenerator = gen.Struct(reflect.TypeOf(DateAfterCreation_ARM{}), generators) + + return dateAfterCreation_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForDateAfterCreation_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDateAfterCreation_ARM(gens map[string]gopter.Gen) { + gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Int()) + gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Int()) +} + +func Test_DateAfterModification_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DateAfterModification_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDateAfterModification_ARM, DateAfterModification_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDateAfterModification_ARM runs a test to see if a specific instance of DateAfterModification_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForDateAfterModification_ARM(subject DateAfterModification_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DateAfterModification_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DateAfterModification_ARM instances for property testing - lazily instantiated by +// DateAfterModification_ARMGenerator() +var dateAfterModification_ARMGenerator gopter.Gen + +// DateAfterModification_ARMGenerator returns a generator of DateAfterModification_ARM instances for property testing. +func DateAfterModification_ARMGenerator() gopter.Gen { + if dateAfterModification_ARMGenerator != nil { + return dateAfterModification_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDateAfterModification_ARM(generators) + dateAfterModification_ARMGenerator = gen.Struct(reflect.TypeOf(DateAfterModification_ARM{}), generators) + + return dateAfterModification_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForDateAfterModification_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDateAfterModification_ARM(gens map[string]gopter.Gen) { + gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Int()) + gens["DaysAfterLastAccessTimeGreaterThan"] = gen.PtrOf(gen.Int()) + gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Int()) + gens["DaysAfterModificationGreaterThan"] = gen.PtrOf(gen.Int()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_management_policy_status_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_management_policy_status_arm_types_gen.go new file mode 100644 index 00000000000..8186fb5af74 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_management_policy_status_arm_types_gen.go @@ -0,0 +1,195 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +type StorageAccounts_ManagementPolicy_STATUS_ARM struct { + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Properties: Returns the Storage Account Data Policies Rules. + Properties *ManagementPolicyProperties_STATUS_ARM `json:"properties,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// The Storage Account ManagementPolicy properties. +type ManagementPolicyProperties_STATUS_ARM struct { + // LastModifiedTime: Returns the date and time the ManagementPolicies was last modified. + LastModifiedTime *string `json:"lastModifiedTime,omitempty"` + + // Policy: The Storage Account ManagementPolicy, in JSON format. See more details in: + // https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + Policy *ManagementPolicySchema_STATUS_ARM `json:"policy,omitempty"` +} + +// The Storage Account ManagementPolicies Rules. See more details in: +// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. +type ManagementPolicySchema_STATUS_ARM struct { + // Rules: The Storage Account ManagementPolicies Rules. See more details in: + // https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + Rules []ManagementPolicyRule_STATUS_ARM `json:"rules"` +} + +// An object that wraps the Lifecycle rule. Each rule is uniquely defined by name. +type ManagementPolicyRule_STATUS_ARM struct { + // Definition: An object that defines the Lifecycle rule. + Definition *ManagementPolicyDefinition_STATUS_ARM `json:"definition,omitempty"` + + // Enabled: Rule is enabled if set to true. + Enabled *bool `json:"enabled,omitempty"` + + // Name: A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be + // unique within a policy. + Name *string `json:"name,omitempty"` + + // Type: The valid value is Lifecycle + Type *ManagementPolicyRule_Type_STATUS `json:"type,omitempty"` +} + +// An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set. +type ManagementPolicyDefinition_STATUS_ARM struct { + // Actions: An object that defines the action set. + Actions *ManagementPolicyAction_STATUS_ARM `json:"actions,omitempty"` + + // Filters: An object that defines the filter set. + Filters *ManagementPolicyFilter_STATUS_ARM `json:"filters,omitempty"` +} + +// Actions are applied to the filtered blobs when the execution condition is met. +type ManagementPolicyAction_STATUS_ARM struct { + // BaseBlob: The management policy action for base blob + BaseBlob *ManagementPolicyBaseBlob_STATUS_ARM `json:"baseBlob,omitempty"` + + // Snapshot: The management policy action for snapshot + Snapshot *ManagementPolicySnapShot_STATUS_ARM `json:"snapshot,omitempty"` + + // Version: The management policy action for version + Version *ManagementPolicyVersion_STATUS_ARM `json:"version,omitempty"` +} + +// Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical +// AND is performed on all filters. +type ManagementPolicyFilter_STATUS_ARM struct { + // BlobIndexMatch: An array of blob index tag based filters, there can be at most 10 tag filters + BlobIndexMatch []TagFilter_STATUS_ARM `json:"blobIndexMatch"` + + // BlobTypes: An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete + // actions are supported for appendBlob. + BlobTypes []string `json:"blobTypes"` + + // PrefixMatch: An array of strings for prefixes to be match. + PrefixMatch []string `json:"prefixMatch"` +} + +// Management policy action for base blob. +type ManagementPolicyBaseBlob_STATUS_ARM struct { + // Delete: The function to delete the blob + Delete *DateAfterModification_STATUS_ARM `json:"delete,omitempty"` + + // EnableAutoTierToHotFromCool: This property enables auto tiering of a blob from cool to hot on a blob access. This + // property requires tierToCool.daysAfterLastAccessTimeGreaterThan. + EnableAutoTierToHotFromCool *bool `json:"enableAutoTierToHotFromCool,omitempty"` + + // TierToArchive: The function to tier blobs to archive storage. + TierToArchive *DateAfterModification_STATUS_ARM `json:"tierToArchive,omitempty"` + + // TierToCold: The function to tier blobs to cold storage. + TierToCold *DateAfterModification_STATUS_ARM `json:"tierToCold,omitempty"` + + // TierToCool: The function to tier blobs to cool storage. + TierToCool *DateAfterModification_STATUS_ARM `json:"tierToCool,omitempty"` + + // TierToHot: The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage + // Accounts + TierToHot *DateAfterModification_STATUS_ARM `json:"tierToHot,omitempty"` +} + +// Management policy action for snapshot. +type ManagementPolicySnapShot_STATUS_ARM struct { + // Delete: The function to delete the blob snapshot + Delete *DateAfterCreation_STATUS_ARM `json:"delete,omitempty"` + + // TierToArchive: The function to tier blob snapshot to archive storage. + TierToArchive *DateAfterCreation_STATUS_ARM `json:"tierToArchive,omitempty"` + + // TierToCold: The function to tier blobs to cold storage. + TierToCold *DateAfterCreation_STATUS_ARM `json:"tierToCold,omitempty"` + + // TierToCool: The function to tier blob snapshot to cool storage. + TierToCool *DateAfterCreation_STATUS_ARM `json:"tierToCool,omitempty"` + + // TierToHot: The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage + // Accounts + TierToHot *DateAfterCreation_STATUS_ARM `json:"tierToHot,omitempty"` +} + +// Management policy action for blob version. +type ManagementPolicyVersion_STATUS_ARM struct { + // Delete: The function to delete the blob version + Delete *DateAfterCreation_STATUS_ARM `json:"delete,omitempty"` + + // TierToArchive: The function to tier blob version to archive storage. + TierToArchive *DateAfterCreation_STATUS_ARM `json:"tierToArchive,omitempty"` + + // TierToCold: The function to tier blobs to cold storage. + TierToCold *DateAfterCreation_STATUS_ARM `json:"tierToCold,omitempty"` + + // TierToCool: The function to tier blob version to cool storage. + TierToCool *DateAfterCreation_STATUS_ARM `json:"tierToCool,omitempty"` + + // TierToHot: The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage + // Accounts + TierToHot *DateAfterCreation_STATUS_ARM `json:"tierToHot,omitempty"` +} + +// Blob index tag based filtering for blob objects +type TagFilter_STATUS_ARM struct { + // Name: This is the filter tag name, it can have 1 - 128 characters + Name *string `json:"name,omitempty"` + + // Op: This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is + // currently supported + Op *string `json:"op,omitempty"` + + // Value: This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters + Value *string `json:"value,omitempty"` +} + +// Object to define snapshot and version action conditions. +type DateAfterCreation_STATUS_ARM struct { + // DaysAfterCreationGreaterThan: Value indicating the age in days after creation + DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` + + // DaysAfterLastTierChangeGreaterThan: Value indicating the age in days after last blob tier change time. This property is + // only applicable for tierToArchive actions and requires daysAfterCreationGreaterThan to be set for snapshots and blob + // version based actions. The blob will be archived if both the conditions are satisfied. + DaysAfterLastTierChangeGreaterThan *float64 `json:"daysAfterLastTierChangeGreaterThan,omitempty"` +} + +// Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, +// daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The +// daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires +// daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with +// daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan. +type DateAfterModification_STATUS_ARM struct { + // DaysAfterCreationGreaterThan: Value indicating the age in days after blob creation. + DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` + + // DaysAfterLastAccessTimeGreaterThan: Value indicating the age in days after last blob access. This property can only be + // used in conjunction with last access time tracking policy + DaysAfterLastAccessTimeGreaterThan *float64 `json:"daysAfterLastAccessTimeGreaterThan,omitempty"` + + // DaysAfterLastTierChangeGreaterThan: Value indicating the age in days after last blob tier change time. This property is + // only applicable for tierToArchive actions and requires daysAfterModificationGreaterThan to be set for baseBlobs based + // actions. The blob will be archived if both the conditions are satisfied. + DaysAfterLastTierChangeGreaterThan *float64 `json:"daysAfterLastTierChangeGreaterThan,omitempty"` + + // DaysAfterModificationGreaterThan: Value indicating the age in days after last modification + DaysAfterModificationGreaterThan *float64 `json:"daysAfterModificationGreaterThan,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_management_policy_status_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_management_policy_status_arm_types_gen_test.go new file mode 100644 index 00000000000..3471b7d2006 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_management_policy_status_arm_types_gen_test.go @@ -0,0 +1,907 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_ManagementPolicy_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_ManagementPolicy_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_ManagementPolicy_STATUS_ARM, StorageAccounts_ManagementPolicy_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_ManagementPolicy_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_ManagementPolicy_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_ManagementPolicy_STATUS_ARM(subject StorageAccounts_ManagementPolicy_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_ManagementPolicy_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_ManagementPolicy_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccounts_ManagementPolicy_STATUS_ARMGenerator() +var storageAccounts_ManagementPolicy_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_ManagementPolicy_STATUS_ARMGenerator returns a generator of StorageAccounts_ManagementPolicy_STATUS_ARM instances for property testing. +// We first initialize storageAccounts_ManagementPolicy_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_ManagementPolicy_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_ManagementPolicy_STATUS_ARMGenerator != nil { + return storageAccounts_ManagementPolicy_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS_ARM(generators) + storageAccounts_ManagementPolicy_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_ManagementPolicy_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS_ARM(generators) + storageAccounts_ManagementPolicy_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_ManagementPolicy_STATUS_ARM{}), generators) + + return storageAccounts_ManagementPolicy_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(ManagementPolicyProperties_STATUS_ARMGenerator()) +} + +func Test_ManagementPolicyProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyProperties_STATUS_ARM, ManagementPolicyProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyProperties_STATUS_ARM runs a test to see if a specific instance of ManagementPolicyProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyProperties_STATUS_ARM(subject ManagementPolicyProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyProperties_STATUS_ARM instances for property testing - lazily instantiated by +// ManagementPolicyProperties_STATUS_ARMGenerator() +var managementPolicyProperties_STATUS_ARMGenerator gopter.Gen + +// ManagementPolicyProperties_STATUS_ARMGenerator returns a generator of ManagementPolicyProperties_STATUS_ARM instances for property testing. +// We first initialize managementPolicyProperties_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyProperties_STATUS_ARMGenerator() gopter.Gen { + if managementPolicyProperties_STATUS_ARMGenerator != nil { + return managementPolicyProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyProperties_STATUS_ARM(generators) + managementPolicyProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyProperties_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyProperties_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForManagementPolicyProperties_STATUS_ARM(generators) + managementPolicyProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyProperties_STATUS_ARM{}), generators) + + return managementPolicyProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["LastModifiedTime"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyProperties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Policy"] = gen.PtrOf(ManagementPolicySchema_STATUS_ARMGenerator()) +} + +func Test_ManagementPolicySchema_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicySchema_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicySchema_STATUS_ARM, ManagementPolicySchema_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicySchema_STATUS_ARM runs a test to see if a specific instance of ManagementPolicySchema_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicySchema_STATUS_ARM(subject ManagementPolicySchema_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicySchema_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicySchema_STATUS_ARM instances for property testing - lazily instantiated by +// ManagementPolicySchema_STATUS_ARMGenerator() +var managementPolicySchema_STATUS_ARMGenerator gopter.Gen + +// ManagementPolicySchema_STATUS_ARMGenerator returns a generator of ManagementPolicySchema_STATUS_ARM instances for property testing. +func ManagementPolicySchema_STATUS_ARMGenerator() gopter.Gen { + if managementPolicySchema_STATUS_ARMGenerator != nil { + return managementPolicySchema_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicySchema_STATUS_ARM(generators) + managementPolicySchema_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicySchema_STATUS_ARM{}), generators) + + return managementPolicySchema_STATUS_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicySchema_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicySchema_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Rules"] = gen.SliceOf(ManagementPolicyRule_STATUS_ARMGenerator()) +} + +func Test_ManagementPolicyRule_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyRule_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyRule_STATUS_ARM, ManagementPolicyRule_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyRule_STATUS_ARM runs a test to see if a specific instance of ManagementPolicyRule_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyRule_STATUS_ARM(subject ManagementPolicyRule_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyRule_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyRule_STATUS_ARM instances for property testing - lazily instantiated by +// ManagementPolicyRule_STATUS_ARMGenerator() +var managementPolicyRule_STATUS_ARMGenerator gopter.Gen + +// ManagementPolicyRule_STATUS_ARMGenerator returns a generator of ManagementPolicyRule_STATUS_ARM instances for property testing. +// We first initialize managementPolicyRule_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyRule_STATUS_ARMGenerator() gopter.Gen { + if managementPolicyRule_STATUS_ARMGenerator != nil { + return managementPolicyRule_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS_ARM(generators) + managementPolicyRule_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForManagementPolicyRule_STATUS_ARM(generators) + managementPolicyRule_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule_STATUS_ARM{}), generators) + + return managementPolicyRule_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf(ManagementPolicyRule_Type_STATUS_Lifecycle)) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyRule_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyRule_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Definition"] = gen.PtrOf(ManagementPolicyDefinition_STATUS_ARMGenerator()) +} + +func Test_ManagementPolicyDefinition_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyDefinition_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyDefinition_STATUS_ARM, ManagementPolicyDefinition_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyDefinition_STATUS_ARM runs a test to see if a specific instance of ManagementPolicyDefinition_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyDefinition_STATUS_ARM(subject ManagementPolicyDefinition_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyDefinition_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyDefinition_STATUS_ARM instances for property testing - lazily instantiated by +// ManagementPolicyDefinition_STATUS_ARMGenerator() +var managementPolicyDefinition_STATUS_ARMGenerator gopter.Gen + +// ManagementPolicyDefinition_STATUS_ARMGenerator returns a generator of ManagementPolicyDefinition_STATUS_ARM instances for property testing. +func ManagementPolicyDefinition_STATUS_ARMGenerator() gopter.Gen { + if managementPolicyDefinition_STATUS_ARMGenerator != nil { + return managementPolicyDefinition_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyDefinition_STATUS_ARM(generators) + managementPolicyDefinition_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyDefinition_STATUS_ARM{}), generators) + + return managementPolicyDefinition_STATUS_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyDefinition_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyDefinition_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Actions"] = gen.PtrOf(ManagementPolicyAction_STATUS_ARMGenerator()) + gens["Filters"] = gen.PtrOf(ManagementPolicyFilter_STATUS_ARMGenerator()) +} + +func Test_ManagementPolicyAction_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyAction_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyAction_STATUS_ARM, ManagementPolicyAction_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyAction_STATUS_ARM runs a test to see if a specific instance of ManagementPolicyAction_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyAction_STATUS_ARM(subject ManagementPolicyAction_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyAction_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyAction_STATUS_ARM instances for property testing - lazily instantiated by +// ManagementPolicyAction_STATUS_ARMGenerator() +var managementPolicyAction_STATUS_ARMGenerator gopter.Gen + +// ManagementPolicyAction_STATUS_ARMGenerator returns a generator of ManagementPolicyAction_STATUS_ARM instances for property testing. +func ManagementPolicyAction_STATUS_ARMGenerator() gopter.Gen { + if managementPolicyAction_STATUS_ARMGenerator != nil { + return managementPolicyAction_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyAction_STATUS_ARM(generators) + managementPolicyAction_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyAction_STATUS_ARM{}), generators) + + return managementPolicyAction_STATUS_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyAction_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyAction_STATUS_ARM(gens map[string]gopter.Gen) { + gens["BaseBlob"] = gen.PtrOf(ManagementPolicyBaseBlob_STATUS_ARMGenerator()) + gens["Snapshot"] = gen.PtrOf(ManagementPolicySnapShot_STATUS_ARMGenerator()) + gens["Version"] = gen.PtrOf(ManagementPolicyVersion_STATUS_ARMGenerator()) +} + +func Test_ManagementPolicyFilter_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyFilter_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyFilter_STATUS_ARM, ManagementPolicyFilter_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyFilter_STATUS_ARM runs a test to see if a specific instance of ManagementPolicyFilter_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyFilter_STATUS_ARM(subject ManagementPolicyFilter_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyFilter_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyFilter_STATUS_ARM instances for property testing - lazily instantiated by +// ManagementPolicyFilter_STATUS_ARMGenerator() +var managementPolicyFilter_STATUS_ARMGenerator gopter.Gen + +// ManagementPolicyFilter_STATUS_ARMGenerator returns a generator of ManagementPolicyFilter_STATUS_ARM instances for property testing. +// We first initialize managementPolicyFilter_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyFilter_STATUS_ARMGenerator() gopter.Gen { + if managementPolicyFilter_STATUS_ARMGenerator != nil { + return managementPolicyFilter_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS_ARM(generators) + managementPolicyFilter_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForManagementPolicyFilter_STATUS_ARM(generators) + managementPolicyFilter_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter_STATUS_ARM{}), generators) + + return managementPolicyFilter_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS_ARM(gens map[string]gopter.Gen) { + gens["BlobTypes"] = gen.SliceOf(gen.AlphaString()) + gens["PrefixMatch"] = gen.SliceOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyFilter_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyFilter_STATUS_ARM(gens map[string]gopter.Gen) { + gens["BlobIndexMatch"] = gen.SliceOf(TagFilter_STATUS_ARMGenerator()) +} + +func Test_ManagementPolicyBaseBlob_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyBaseBlob_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyBaseBlob_STATUS_ARM, ManagementPolicyBaseBlob_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyBaseBlob_STATUS_ARM runs a test to see if a specific instance of ManagementPolicyBaseBlob_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyBaseBlob_STATUS_ARM(subject ManagementPolicyBaseBlob_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyBaseBlob_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyBaseBlob_STATUS_ARM instances for property testing - lazily instantiated by +// ManagementPolicyBaseBlob_STATUS_ARMGenerator() +var managementPolicyBaseBlob_STATUS_ARMGenerator gopter.Gen + +// ManagementPolicyBaseBlob_STATUS_ARMGenerator returns a generator of ManagementPolicyBaseBlob_STATUS_ARM instances for property testing. +// We first initialize managementPolicyBaseBlob_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyBaseBlob_STATUS_ARMGenerator() gopter.Gen { + if managementPolicyBaseBlob_STATUS_ARMGenerator != nil { + return managementPolicyBaseBlob_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS_ARM(generators) + managementPolicyBaseBlob_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS_ARM(generators) + managementPolicyBaseBlob_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob_STATUS_ARM{}), generators) + + return managementPolicyBaseBlob_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS_ARM(gens map[string]gopter.Gen) { + gens["EnableAutoTierToHotFromCool"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterModification_STATUS_ARMGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterModification_STATUS_ARMGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterModification_STATUS_ARMGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterModification_STATUS_ARMGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterModification_STATUS_ARMGenerator()) +} + +func Test_ManagementPolicySnapShot_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicySnapShot_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicySnapShot_STATUS_ARM, ManagementPolicySnapShot_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicySnapShot_STATUS_ARM runs a test to see if a specific instance of ManagementPolicySnapShot_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicySnapShot_STATUS_ARM(subject ManagementPolicySnapShot_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicySnapShot_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicySnapShot_STATUS_ARM instances for property testing - lazily instantiated by +// ManagementPolicySnapShot_STATUS_ARMGenerator() +var managementPolicySnapShot_STATUS_ARMGenerator gopter.Gen + +// ManagementPolicySnapShot_STATUS_ARMGenerator returns a generator of ManagementPolicySnapShot_STATUS_ARM instances for property testing. +func ManagementPolicySnapShot_STATUS_ARMGenerator() gopter.Gen { + if managementPolicySnapShot_STATUS_ARMGenerator != nil { + return managementPolicySnapShot_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicySnapShot_STATUS_ARM(generators) + managementPolicySnapShot_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicySnapShot_STATUS_ARM{}), generators) + + return managementPolicySnapShot_STATUS_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicySnapShot_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicySnapShot_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterCreation_STATUS_ARMGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterCreation_STATUS_ARMGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterCreation_STATUS_ARMGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterCreation_STATUS_ARMGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterCreation_STATUS_ARMGenerator()) +} + +func Test_ManagementPolicyVersion_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyVersion_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyVersion_STATUS_ARM, ManagementPolicyVersion_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyVersion_STATUS_ARM runs a test to see if a specific instance of ManagementPolicyVersion_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyVersion_STATUS_ARM(subject ManagementPolicyVersion_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyVersion_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyVersion_STATUS_ARM instances for property testing - lazily instantiated by +// ManagementPolicyVersion_STATUS_ARMGenerator() +var managementPolicyVersion_STATUS_ARMGenerator gopter.Gen + +// ManagementPolicyVersion_STATUS_ARMGenerator returns a generator of ManagementPolicyVersion_STATUS_ARM instances for property testing. +func ManagementPolicyVersion_STATUS_ARMGenerator() gopter.Gen { + if managementPolicyVersion_STATUS_ARMGenerator != nil { + return managementPolicyVersion_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyVersion_STATUS_ARM(generators) + managementPolicyVersion_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyVersion_STATUS_ARM{}), generators) + + return managementPolicyVersion_STATUS_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyVersion_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyVersion_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterCreation_STATUS_ARMGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterCreation_STATUS_ARMGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterCreation_STATUS_ARMGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterCreation_STATUS_ARMGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterCreation_STATUS_ARMGenerator()) +} + +func Test_TagFilter_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TagFilter_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTagFilter_STATUS_ARM, TagFilter_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTagFilter_STATUS_ARM runs a test to see if a specific instance of TagFilter_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForTagFilter_STATUS_ARM(subject TagFilter_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TagFilter_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TagFilter_STATUS_ARM instances for property testing - lazily instantiated by +// TagFilter_STATUS_ARMGenerator() +var tagFilter_STATUS_ARMGenerator gopter.Gen + +// TagFilter_STATUS_ARMGenerator returns a generator of TagFilter_STATUS_ARM instances for property testing. +func TagFilter_STATUS_ARMGenerator() gopter.Gen { + if tagFilter_STATUS_ARMGenerator != nil { + return tagFilter_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTagFilter_STATUS_ARM(generators) + tagFilter_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(TagFilter_STATUS_ARM{}), generators) + + return tagFilter_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForTagFilter_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTagFilter_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Op"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_DateAfterCreation_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DateAfterCreation_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDateAfterCreation_STATUS_ARM, DateAfterCreation_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDateAfterCreation_STATUS_ARM runs a test to see if a specific instance of DateAfterCreation_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForDateAfterCreation_STATUS_ARM(subject DateAfterCreation_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DateAfterCreation_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DateAfterCreation_STATUS_ARM instances for property testing - lazily instantiated by +// DateAfterCreation_STATUS_ARMGenerator() +var dateAfterCreation_STATUS_ARMGenerator gopter.Gen + +// DateAfterCreation_STATUS_ARMGenerator returns a generator of DateAfterCreation_STATUS_ARM instances for property testing. +func DateAfterCreation_STATUS_ARMGenerator() gopter.Gen { + if dateAfterCreation_STATUS_ARMGenerator != nil { + return dateAfterCreation_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDateAfterCreation_STATUS_ARM(generators) + dateAfterCreation_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(DateAfterCreation_STATUS_ARM{}), generators) + + return dateAfterCreation_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForDateAfterCreation_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDateAfterCreation_STATUS_ARM(gens map[string]gopter.Gen) { + gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Float64()) + gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Float64()) +} + +func Test_DateAfterModification_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DateAfterModification_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDateAfterModification_STATUS_ARM, DateAfterModification_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDateAfterModification_STATUS_ARM runs a test to see if a specific instance of DateAfterModification_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForDateAfterModification_STATUS_ARM(subject DateAfterModification_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DateAfterModification_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DateAfterModification_STATUS_ARM instances for property testing - lazily instantiated by +// DateAfterModification_STATUS_ARMGenerator() +var dateAfterModification_STATUS_ARMGenerator gopter.Gen + +// DateAfterModification_STATUS_ARMGenerator returns a generator of DateAfterModification_STATUS_ARM instances for property testing. +func DateAfterModification_STATUS_ARMGenerator() gopter.Gen { + if dateAfterModification_STATUS_ARMGenerator != nil { + return dateAfterModification_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDateAfterModification_STATUS_ARM(generators) + dateAfterModification_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(DateAfterModification_STATUS_ARM{}), generators) + + return dateAfterModification_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForDateAfterModification_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDateAfterModification_STATUS_ARM(gens map[string]gopter.Gen) { + gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Float64()) + gens["DaysAfterLastAccessTimeGreaterThan"] = gen.PtrOf(gen.Float64()) + gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Float64()) + gens["DaysAfterModificationGreaterThan"] = gen.PtrOf(gen.Float64()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_management_policy_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_management_policy_types_gen.go new file mode 100644 index 00000000000..539f998c12f --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_management_policy_types_gen.go @@ -0,0 +1,5107 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/default +type StorageAccountsManagementPolicy struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_ManagementPolicy_Spec `json:"spec,omitempty"` + Status StorageAccounts_ManagementPolicy_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsManagementPolicy{} + +// GetConditions returns the conditions of the resource +func (policy *StorageAccountsManagementPolicy) GetConditions() conditions.Conditions { + return policy.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (policy *StorageAccountsManagementPolicy) SetConditions(conditions conditions.Conditions) { + policy.Status.Conditions = conditions +} + +var _ conversion.Convertible = &StorageAccountsManagementPolicy{} + +// ConvertFrom populates our StorageAccountsManagementPolicy from the provided hub StorageAccountsManagementPolicy +func (policy *StorageAccountsManagementPolicy) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsManagementPolicy) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsManagementPolicy but received %T instead", hub) + } + + return policy.AssignProperties_From_StorageAccountsManagementPolicy(source) +} + +// ConvertTo populates the provided hub StorageAccountsManagementPolicy from our StorageAccountsManagementPolicy +func (policy *StorageAccountsManagementPolicy) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsManagementPolicy) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsManagementPolicy but received %T instead", hub) + } + + return policy.AssignProperties_To_StorageAccountsManagementPolicy(destination) +} + +// +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20230101-storageaccountsmanagementpolicy,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsmanagementpolicies,verbs=create;update,versions=v1api20230101,name=default.v1api20230101.storageaccountsmanagementpolicies.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &StorageAccountsManagementPolicy{} + +// Default applies defaults to the StorageAccountsManagementPolicy resource +func (policy *StorageAccountsManagementPolicy) Default() { + policy.defaultImpl() + var temp any = policy + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultImpl applies the code generated defaults to the StorageAccountsManagementPolicy resource +func (policy *StorageAccountsManagementPolicy) defaultImpl() {} + +var _ genruntime.ImportableResource = &StorageAccountsManagementPolicy{} + +// InitializeSpec initializes the spec for this resource from the given status +func (policy *StorageAccountsManagementPolicy) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*StorageAccounts_ManagementPolicy_STATUS); ok { + return policy.Spec.Initialize_From_StorageAccounts_ManagementPolicy_STATUS(s) + } + + return fmt.Errorf("expected Status of type StorageAccounts_ManagementPolicy_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &StorageAccountsManagementPolicy{} + +// AzureName returns the Azure name of the resource (always "default") +func (policy *StorageAccountsManagementPolicy) AzureName() string { + return "default" +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (policy StorageAccountsManagementPolicy) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (policy *StorageAccountsManagementPolicy) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (policy *StorageAccountsManagementPolicy) GetSpec() genruntime.ConvertibleSpec { + return &policy.Spec +} + +// GetStatus returns the status of this resource +func (policy *StorageAccountsManagementPolicy) GetStatus() genruntime.ConvertibleStatus { + return &policy.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (policy *StorageAccountsManagementPolicy) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/managementPolicies" +func (policy *StorageAccountsManagementPolicy) GetType() string { + return "Microsoft.Storage/storageAccounts/managementPolicies" +} + +// NewEmptyStatus returns a new empty (blank) status +func (policy *StorageAccountsManagementPolicy) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_ManagementPolicy_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (policy *StorageAccountsManagementPolicy) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(policy.Spec) + return policy.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (policy *StorageAccountsManagementPolicy) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_ManagementPolicy_STATUS); ok { + policy.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_ManagementPolicy_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + policy.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-storage-azure-com-v1api20230101-storageaccountsmanagementpolicy,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsmanagementpolicies,verbs=create;update,versions=v1api20230101,name=validate.v1api20230101.storageaccountsmanagementpolicies.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &StorageAccountsManagementPolicy{} + +// ValidateCreate validates the creation of the resource +func (policy *StorageAccountsManagementPolicy) ValidateCreate() (admission.Warnings, error) { + validations := policy.createValidations() + var temp any = policy + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (policy *StorageAccountsManagementPolicy) ValidateDelete() (admission.Warnings, error) { + validations := policy.deleteValidations() + var temp any = policy + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (policy *StorageAccountsManagementPolicy) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := policy.updateValidations() + var temp any = policy + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (policy *StorageAccountsManagementPolicy) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){policy.validateResourceReferences, policy.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (policy *StorageAccountsManagementPolicy) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (policy *StorageAccountsManagementPolicy) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return policy.validateResourceReferences() + }, + policy.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return policy.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (policy *StorageAccountsManagementPolicy) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(policy) +} + +// validateResourceReferences validates all resource references +func (policy *StorageAccountsManagementPolicy) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&policy.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (policy *StorageAccountsManagementPolicy) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*StorageAccountsManagementPolicy) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, policy) +} + +// AssignProperties_From_StorageAccountsManagementPolicy populates our StorageAccountsManagementPolicy from the provided source StorageAccountsManagementPolicy +func (policy *StorageAccountsManagementPolicy) AssignProperties_From_StorageAccountsManagementPolicy(source *v20230101s.StorageAccountsManagementPolicy) error { + + // ObjectMeta + policy.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_ManagementPolicy_Spec + err := spec.AssignProperties_From_StorageAccounts_ManagementPolicy_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_ManagementPolicy_Spec() to populate field Spec") + } + policy.Spec = spec + + // Status + var status StorageAccounts_ManagementPolicy_STATUS + err = status.AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS() to populate field Status") + } + policy.Status = status + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsManagementPolicy populates the provided destination StorageAccountsManagementPolicy from our StorageAccountsManagementPolicy +func (policy *StorageAccountsManagementPolicy) AssignProperties_To_StorageAccountsManagementPolicy(destination *v20230101s.StorageAccountsManagementPolicy) error { + + // ObjectMeta + destination.ObjectMeta = *policy.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_ManagementPolicy_Spec + err := policy.Spec.AssignProperties_To_StorageAccounts_ManagementPolicy_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_ManagementPolicy_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_ManagementPolicy_STATUS + err = policy.Status.AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (policy *StorageAccountsManagementPolicy) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: policy.Spec.OriginalVersion(), + Kind: "StorageAccountsManagementPolicy", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/default +type StorageAccountsManagementPolicyList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsManagementPolicy `json:"items"` +} + +type StorageAccounts_ManagementPolicy_Spec struct { + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccount resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccount"` + + // +kubebuilder:validation:Required + // Policy: The Storage Account ManagementPolicy, in JSON format. See more details in: + // https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + Policy *ManagementPolicySchema `json:"policy,omitempty"` +} + +var _ genruntime.ARMTransformer = &StorageAccounts_ManagementPolicy_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (policy *StorageAccounts_ManagementPolicy_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if policy == nil { + return nil, nil + } + result := &StorageAccounts_ManagementPolicy_Spec_ARM{} + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if policy.Policy != nil { + result.Properties = &ManagementPolicyProperties_ARM{} + } + if policy.Policy != nil { + policy_ARM, err := (*policy.Policy).ConvertToARM(resolved) + if err != nil { + return nil, err + } + policy1 := *policy_ARM.(*ManagementPolicySchema_ARM) + result.Properties.Policy = &policy1 + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *StorageAccounts_ManagementPolicy_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_ManagementPolicy_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *StorageAccounts_ManagementPolicy_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_ManagementPolicy_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_ManagementPolicy_Spec_ARM, got %T", armInput) + } + + // Set property "Owner": + policy.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Policy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Policy != nil { + var policy2 ManagementPolicySchema + err := policy2.PopulateFromARM(owner, *typedInput.Properties.Policy) + if err != nil { + return err + } + policy1 := policy2 + policy.Policy = &policy1 + } + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_ManagementPolicy_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_ManagementPolicy_Spec from the provided source +func (policy *StorageAccounts_ManagementPolicy_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20230101s.StorageAccounts_ManagementPolicy_Spec) + if ok { + // Populate our instance from source + return policy.AssignProperties_From_StorageAccounts_ManagementPolicy_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_ManagementPolicy_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = policy.AssignProperties_From_StorageAccounts_ManagementPolicy_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_ManagementPolicy_Spec +func (policy *StorageAccounts_ManagementPolicy_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20230101s.StorageAccounts_ManagementPolicy_Spec) + if ok { + // Populate destination from our instance + return policy.AssignProperties_To_StorageAccounts_ManagementPolicy_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_ManagementPolicy_Spec{} + err := policy.AssignProperties_To_StorageAccounts_ManagementPolicy_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_ManagementPolicy_Spec populates our StorageAccounts_ManagementPolicy_Spec from the provided source StorageAccounts_ManagementPolicy_Spec +func (policy *StorageAccounts_ManagementPolicy_Spec) AssignProperties_From_StorageAccounts_ManagementPolicy_Spec(source *v20230101s.StorageAccounts_ManagementPolicy_Spec) error { + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + policy.Owner = &owner + } else { + policy.Owner = nil + } + + // Policy + if source.Policy != nil { + var policyLocal ManagementPolicySchema + err := policyLocal.AssignProperties_From_ManagementPolicySchema(source.Policy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicySchema() to populate field Policy") + } + policy.Policy = &policyLocal + } else { + policy.Policy = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_ManagementPolicy_Spec populates the provided destination StorageAccounts_ManagementPolicy_Spec from our StorageAccounts_ManagementPolicy_Spec +func (policy *StorageAccounts_ManagementPolicy_Spec) AssignProperties_To_StorageAccounts_ManagementPolicy_Spec(destination *v20230101s.StorageAccounts_ManagementPolicy_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // OriginalVersion + destination.OriginalVersion = policy.OriginalVersion() + + // Owner + if policy.Owner != nil { + owner := policy.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Policy + if policy.Policy != nil { + var policyLocal v20230101s.ManagementPolicySchema + err := policy.Policy.AssignProperties_To_ManagementPolicySchema(&policyLocal) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicySchema() to populate field Policy") + } + destination.Policy = &policyLocal + } else { + destination.Policy = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_StorageAccounts_ManagementPolicy_STATUS populates our StorageAccounts_ManagementPolicy_Spec from the provided source StorageAccounts_ManagementPolicy_STATUS +func (policy *StorageAccounts_ManagementPolicy_Spec) Initialize_From_StorageAccounts_ManagementPolicy_STATUS(source *StorageAccounts_ManagementPolicy_STATUS) error { + + // Policy + if source.Policy != nil { + var policyLocal ManagementPolicySchema + err := policyLocal.Initialize_From_ManagementPolicySchema_STATUS(source.Policy) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ManagementPolicySchema_STATUS() to populate field Policy") + } + policy.Policy = &policyLocal + } else { + policy.Policy = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (policy *StorageAccounts_ManagementPolicy_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +type StorageAccounts_ManagementPolicy_STATUS struct { + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // LastModifiedTime: Returns the date and time the ManagementPolicies was last modified. + LastModifiedTime *string `json:"lastModifiedTime,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Policy: The Storage Account ManagementPolicy, in JSON format. See more details in: + // https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + Policy *ManagementPolicySchema_STATUS `json:"policy,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_ManagementPolicy_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_ManagementPolicy_STATUS from the provided source +func (policy *StorageAccounts_ManagementPolicy_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20230101s.StorageAccounts_ManagementPolicy_STATUS) + if ok { + // Populate our instance from source + return policy.AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_ManagementPolicy_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = policy.AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_ManagementPolicy_STATUS +func (policy *StorageAccounts_ManagementPolicy_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20230101s.StorageAccounts_ManagementPolicy_STATUS) + if ok { + // Populate destination from our instance + return policy.AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_ManagementPolicy_STATUS{} + err := policy.AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &StorageAccounts_ManagementPolicy_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *StorageAccounts_ManagementPolicy_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_ManagementPolicy_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *StorageAccounts_ManagementPolicy_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_ManagementPolicy_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_ManagementPolicy_STATUS_ARM, got %T", armInput) + } + + // no assignment for property "Conditions" + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + policy.Id = &id + } + + // Set property "LastModifiedTime": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LastModifiedTime != nil { + lastModifiedTime := *typedInput.Properties.LastModifiedTime + policy.LastModifiedTime = &lastModifiedTime + } + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + policy.Name = &name + } + + // Set property "Policy": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Policy != nil { + var policy2 ManagementPolicySchema_STATUS + err := policy2.PopulateFromARM(owner, *typedInput.Properties.Policy) + if err != nil { + return err + } + policy1 := policy2 + policy.Policy = &policy1 + } + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + policy.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS populates our StorageAccounts_ManagementPolicy_STATUS from the provided source StorageAccounts_ManagementPolicy_STATUS +func (policy *StorageAccounts_ManagementPolicy_STATUS) AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS(source *v20230101s.StorageAccounts_ManagementPolicy_STATUS) error { + + // Conditions + policy.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Id + policy.Id = genruntime.ClonePointerToString(source.Id) + + // LastModifiedTime + policy.LastModifiedTime = genruntime.ClonePointerToString(source.LastModifiedTime) + + // Name + policy.Name = genruntime.ClonePointerToString(source.Name) + + // Policy + if source.Policy != nil { + var policyLocal ManagementPolicySchema_STATUS + err := policyLocal.AssignProperties_From_ManagementPolicySchema_STATUS(source.Policy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicySchema_STATUS() to populate field Policy") + } + policy.Policy = &policyLocal + } else { + policy.Policy = nil + } + + // Type + policy.Type = genruntime.ClonePointerToString(source.Type) + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS populates the provided destination StorageAccounts_ManagementPolicy_STATUS from our StorageAccounts_ManagementPolicy_STATUS +func (policy *StorageAccounts_ManagementPolicy_STATUS) AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS(destination *v20230101s.StorageAccounts_ManagementPolicy_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(policy.Conditions) + + // Id + destination.Id = genruntime.ClonePointerToString(policy.Id) + + // LastModifiedTime + destination.LastModifiedTime = genruntime.ClonePointerToString(policy.LastModifiedTime) + + // Name + destination.Name = genruntime.ClonePointerToString(policy.Name) + + // Policy + if policy.Policy != nil { + var policyLocal v20230101s.ManagementPolicySchema_STATUS + err := policy.Policy.AssignProperties_To_ManagementPolicySchema_STATUS(&policyLocal) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicySchema_STATUS() to populate field Policy") + } + destination.Policy = &policyLocal + } else { + destination.Policy = nil + } + + // Type + destination.Type = genruntime.ClonePointerToString(policy.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// The Storage Account ManagementPolicies Rules. See more details in: +// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. +type ManagementPolicySchema struct { + // +kubebuilder:validation:Required + // Rules: The Storage Account ManagementPolicies Rules. See more details in: + // https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + Rules []ManagementPolicyRule `json:"rules,omitempty"` +} + +var _ genruntime.ARMTransformer = &ManagementPolicySchema{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (schema *ManagementPolicySchema) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if schema == nil { + return nil, nil + } + result := &ManagementPolicySchema_ARM{} + + // Set property "Rules": + for _, item := range schema.Rules { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.Rules = append(result.Rules, *item_ARM.(*ManagementPolicyRule_ARM)) + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (schema *ManagementPolicySchema) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicySchema_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (schema *ManagementPolicySchema) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicySchema_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicySchema_ARM, got %T", armInput) + } + + // Set property "Rules": + for _, item := range typedInput.Rules { + var item1 ManagementPolicyRule + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + schema.Rules = append(schema.Rules, item1) + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicySchema populates our ManagementPolicySchema from the provided source ManagementPolicySchema +func (schema *ManagementPolicySchema) AssignProperties_From_ManagementPolicySchema(source *v20230101s.ManagementPolicySchema) error { + + // Rules + if source.Rules != nil { + ruleList := make([]ManagementPolicyRule, len(source.Rules)) + for ruleIndex, ruleItem := range source.Rules { + // Shadow the loop variable to avoid aliasing + ruleItem := ruleItem + var rule ManagementPolicyRule + err := rule.AssignProperties_From_ManagementPolicyRule(&ruleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyRule() to populate field Rules") + } + ruleList[ruleIndex] = rule + } + schema.Rules = ruleList + } else { + schema.Rules = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicySchema populates the provided destination ManagementPolicySchema from our ManagementPolicySchema +func (schema *ManagementPolicySchema) AssignProperties_To_ManagementPolicySchema(destination *v20230101s.ManagementPolicySchema) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Rules + if schema.Rules != nil { + ruleList := make([]v20230101s.ManagementPolicyRule, len(schema.Rules)) + for ruleIndex, ruleItem := range schema.Rules { + // Shadow the loop variable to avoid aliasing + ruleItem := ruleItem + var rule v20230101s.ManagementPolicyRule + err := ruleItem.AssignProperties_To_ManagementPolicyRule(&rule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyRule() to populate field Rules") + } + ruleList[ruleIndex] = rule + } + destination.Rules = ruleList + } else { + destination.Rules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ManagementPolicySchema_STATUS populates our ManagementPolicySchema from the provided source ManagementPolicySchema_STATUS +func (schema *ManagementPolicySchema) Initialize_From_ManagementPolicySchema_STATUS(source *ManagementPolicySchema_STATUS) error { + + // Rules + if source.Rules != nil { + ruleList := make([]ManagementPolicyRule, len(source.Rules)) + for ruleIndex, ruleItem := range source.Rules { + // Shadow the loop variable to avoid aliasing + ruleItem := ruleItem + var rule ManagementPolicyRule + err := rule.Initialize_From_ManagementPolicyRule_STATUS(&ruleItem) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ManagementPolicyRule_STATUS() to populate field Rules") + } + ruleList[ruleIndex] = rule + } + schema.Rules = ruleList + } else { + schema.Rules = nil + } + + // No error + return nil +} + +// The Storage Account ManagementPolicies Rules. See more details in: +// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. +type ManagementPolicySchema_STATUS struct { + // Rules: The Storage Account ManagementPolicies Rules. See more details in: + // https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + Rules []ManagementPolicyRule_STATUS `json:"rules,omitempty"` +} + +var _ genruntime.FromARMConverter = &ManagementPolicySchema_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (schema *ManagementPolicySchema_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicySchema_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (schema *ManagementPolicySchema_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicySchema_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicySchema_STATUS_ARM, got %T", armInput) + } + + // Set property "Rules": + for _, item := range typedInput.Rules { + var item1 ManagementPolicyRule_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + schema.Rules = append(schema.Rules, item1) + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicySchema_STATUS populates our ManagementPolicySchema_STATUS from the provided source ManagementPolicySchema_STATUS +func (schema *ManagementPolicySchema_STATUS) AssignProperties_From_ManagementPolicySchema_STATUS(source *v20230101s.ManagementPolicySchema_STATUS) error { + + // Rules + if source.Rules != nil { + ruleList := make([]ManagementPolicyRule_STATUS, len(source.Rules)) + for ruleIndex, ruleItem := range source.Rules { + // Shadow the loop variable to avoid aliasing + ruleItem := ruleItem + var rule ManagementPolicyRule_STATUS + err := rule.AssignProperties_From_ManagementPolicyRule_STATUS(&ruleItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyRule_STATUS() to populate field Rules") + } + ruleList[ruleIndex] = rule + } + schema.Rules = ruleList + } else { + schema.Rules = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicySchema_STATUS populates the provided destination ManagementPolicySchema_STATUS from our ManagementPolicySchema_STATUS +func (schema *ManagementPolicySchema_STATUS) AssignProperties_To_ManagementPolicySchema_STATUS(destination *v20230101s.ManagementPolicySchema_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Rules + if schema.Rules != nil { + ruleList := make([]v20230101s.ManagementPolicyRule_STATUS, len(schema.Rules)) + for ruleIndex, ruleItem := range schema.Rules { + // Shadow the loop variable to avoid aliasing + ruleItem := ruleItem + var rule v20230101s.ManagementPolicyRule_STATUS + err := ruleItem.AssignProperties_To_ManagementPolicyRule_STATUS(&rule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyRule_STATUS() to populate field Rules") + } + ruleList[ruleIndex] = rule + } + destination.Rules = ruleList + } else { + destination.Rules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// An object that wraps the Lifecycle rule. Each rule is uniquely defined by name. +type ManagementPolicyRule struct { + // +kubebuilder:validation:Required + // Definition: An object that defines the Lifecycle rule. + Definition *ManagementPolicyDefinition `json:"definition,omitempty"` + + // Enabled: Rule is enabled if set to true. + Enabled *bool `json:"enabled,omitempty"` + + // +kubebuilder:validation:Required + // Name: A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be + // unique within a policy. + Name *string `json:"name,omitempty"` + + // +kubebuilder:validation:Required + // Type: The valid value is Lifecycle + Type *ManagementPolicyRule_Type `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &ManagementPolicyRule{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (rule *ManagementPolicyRule) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if rule == nil { + return nil, nil + } + result := &ManagementPolicyRule_ARM{} + + // Set property "Definition": + if rule.Definition != nil { + definition_ARM, err := (*rule.Definition).ConvertToARM(resolved) + if err != nil { + return nil, err + } + definition := *definition_ARM.(*ManagementPolicyDefinition_ARM) + result.Definition = &definition + } + + // Set property "Enabled": + if rule.Enabled != nil { + enabled := *rule.Enabled + result.Enabled = &enabled + } + + // Set property "Name": + if rule.Name != nil { + name := *rule.Name + result.Name = &name + } + + // Set property "Type": + if rule.Type != nil { + typeVar := *rule.Type + result.Type = &typeVar + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rule *ManagementPolicyRule) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicyRule_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rule *ManagementPolicyRule) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicyRule_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicyRule_ARM, got %T", armInput) + } + + // Set property "Definition": + if typedInput.Definition != nil { + var definition1 ManagementPolicyDefinition + err := definition1.PopulateFromARM(owner, *typedInput.Definition) + if err != nil { + return err + } + definition := definition1 + rule.Definition = &definition + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + rule.Enabled = &enabled + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + rule.Name = &name + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + rule.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicyRule populates our ManagementPolicyRule from the provided source ManagementPolicyRule +func (rule *ManagementPolicyRule) AssignProperties_From_ManagementPolicyRule(source *v20230101s.ManagementPolicyRule) error { + + // Definition + if source.Definition != nil { + var definition ManagementPolicyDefinition + err := definition.AssignProperties_From_ManagementPolicyDefinition(source.Definition) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyDefinition() to populate field Definition") + } + rule.Definition = &definition + } else { + rule.Definition = nil + } + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } + + // Name + rule.Name = genruntime.ClonePointerToString(source.Name) + + // Type + if source.Type != nil { + typeVar := ManagementPolicyRule_Type(*source.Type) + rule.Type = &typeVar + } else { + rule.Type = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyRule populates the provided destination ManagementPolicyRule from our ManagementPolicyRule +func (rule *ManagementPolicyRule) AssignProperties_To_ManagementPolicyRule(destination *v20230101s.ManagementPolicyRule) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Definition + if rule.Definition != nil { + var definition v20230101s.ManagementPolicyDefinition + err := rule.Definition.AssignProperties_To_ManagementPolicyDefinition(&definition) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyDefinition() to populate field Definition") + } + destination.Definition = &definition + } else { + destination.Definition = nil + } + + // Enabled + if rule.Enabled != nil { + enabled := *rule.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(rule.Name) + + // Type + if rule.Type != nil { + typeVar := string(*rule.Type) + destination.Type = &typeVar + } else { + destination.Type = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ManagementPolicyRule_STATUS populates our ManagementPolicyRule from the provided source ManagementPolicyRule_STATUS +func (rule *ManagementPolicyRule) Initialize_From_ManagementPolicyRule_STATUS(source *ManagementPolicyRule_STATUS) error { + + // Definition + if source.Definition != nil { + var definition ManagementPolicyDefinition + err := definition.Initialize_From_ManagementPolicyDefinition_STATUS(source.Definition) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ManagementPolicyDefinition_STATUS() to populate field Definition") + } + rule.Definition = &definition + } else { + rule.Definition = nil + } + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } + + // Name + rule.Name = genruntime.ClonePointerToString(source.Name) + + // Type + if source.Type != nil { + typeVar := ManagementPolicyRule_Type(*source.Type) + rule.Type = &typeVar + } else { + rule.Type = nil + } + + // No error + return nil +} + +// An object that wraps the Lifecycle rule. Each rule is uniquely defined by name. +type ManagementPolicyRule_STATUS struct { + // Definition: An object that defines the Lifecycle rule. + Definition *ManagementPolicyDefinition_STATUS `json:"definition,omitempty"` + + // Enabled: Rule is enabled if set to true. + Enabled *bool `json:"enabled,omitempty"` + + // Name: A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be + // unique within a policy. + Name *string `json:"name,omitempty"` + + // Type: The valid value is Lifecycle + Type *ManagementPolicyRule_Type_STATUS `json:"type,omitempty"` +} + +var _ genruntime.FromARMConverter = &ManagementPolicyRule_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rule *ManagementPolicyRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicyRule_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rule *ManagementPolicyRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicyRule_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicyRule_STATUS_ARM, got %T", armInput) + } + + // Set property "Definition": + if typedInput.Definition != nil { + var definition1 ManagementPolicyDefinition_STATUS + err := definition1.PopulateFromARM(owner, *typedInput.Definition) + if err != nil { + return err + } + definition := definition1 + rule.Definition = &definition + } + + // Set property "Enabled": + if typedInput.Enabled != nil { + enabled := *typedInput.Enabled + rule.Enabled = &enabled + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + rule.Name = &name + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + rule.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicyRule_STATUS populates our ManagementPolicyRule_STATUS from the provided source ManagementPolicyRule_STATUS +func (rule *ManagementPolicyRule_STATUS) AssignProperties_From_ManagementPolicyRule_STATUS(source *v20230101s.ManagementPolicyRule_STATUS) error { + + // Definition + if source.Definition != nil { + var definition ManagementPolicyDefinition_STATUS + err := definition.AssignProperties_From_ManagementPolicyDefinition_STATUS(source.Definition) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyDefinition_STATUS() to populate field Definition") + } + rule.Definition = &definition + } else { + rule.Definition = nil + } + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } + + // Name + rule.Name = genruntime.ClonePointerToString(source.Name) + + // Type + if source.Type != nil { + typeVar := ManagementPolicyRule_Type_STATUS(*source.Type) + rule.Type = &typeVar + } else { + rule.Type = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyRule_STATUS populates the provided destination ManagementPolicyRule_STATUS from our ManagementPolicyRule_STATUS +func (rule *ManagementPolicyRule_STATUS) AssignProperties_To_ManagementPolicyRule_STATUS(destination *v20230101s.ManagementPolicyRule_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Definition + if rule.Definition != nil { + var definition v20230101s.ManagementPolicyDefinition_STATUS + err := rule.Definition.AssignProperties_To_ManagementPolicyDefinition_STATUS(&definition) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyDefinition_STATUS() to populate field Definition") + } + destination.Definition = &definition + } else { + destination.Definition = nil + } + + // Enabled + if rule.Enabled != nil { + enabled := *rule.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(rule.Name) + + // Type + if rule.Type != nil { + typeVar := string(*rule.Type) + destination.Type = &typeVar + } else { + destination.Type = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set. +type ManagementPolicyDefinition struct { + // +kubebuilder:validation:Required + // Actions: An object that defines the action set. + Actions *ManagementPolicyAction `json:"actions,omitempty"` + + // Filters: An object that defines the filter set. + Filters *ManagementPolicyFilter `json:"filters,omitempty"` +} + +var _ genruntime.ARMTransformer = &ManagementPolicyDefinition{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (definition *ManagementPolicyDefinition) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if definition == nil { + return nil, nil + } + result := &ManagementPolicyDefinition_ARM{} + + // Set property "Actions": + if definition.Actions != nil { + actions_ARM, err := (*definition.Actions).ConvertToARM(resolved) + if err != nil { + return nil, err + } + actions := *actions_ARM.(*ManagementPolicyAction_ARM) + result.Actions = &actions + } + + // Set property "Filters": + if definition.Filters != nil { + filters_ARM, err := (*definition.Filters).ConvertToARM(resolved) + if err != nil { + return nil, err + } + filters := *filters_ARM.(*ManagementPolicyFilter_ARM) + result.Filters = &filters + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (definition *ManagementPolicyDefinition) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicyDefinition_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (definition *ManagementPolicyDefinition) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicyDefinition_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicyDefinition_ARM, got %T", armInput) + } + + // Set property "Actions": + if typedInput.Actions != nil { + var actions1 ManagementPolicyAction + err := actions1.PopulateFromARM(owner, *typedInput.Actions) + if err != nil { + return err + } + actions := actions1 + definition.Actions = &actions + } + + // Set property "Filters": + if typedInput.Filters != nil { + var filters1 ManagementPolicyFilter + err := filters1.PopulateFromARM(owner, *typedInput.Filters) + if err != nil { + return err + } + filters := filters1 + definition.Filters = &filters + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicyDefinition populates our ManagementPolicyDefinition from the provided source ManagementPolicyDefinition +func (definition *ManagementPolicyDefinition) AssignProperties_From_ManagementPolicyDefinition(source *v20230101s.ManagementPolicyDefinition) error { + + // Actions + if source.Actions != nil { + var action ManagementPolicyAction + err := action.AssignProperties_From_ManagementPolicyAction(source.Actions) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyAction() to populate field Actions") + } + definition.Actions = &action + } else { + definition.Actions = nil + } + + // Filters + if source.Filters != nil { + var filter ManagementPolicyFilter + err := filter.AssignProperties_From_ManagementPolicyFilter(source.Filters) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyFilter() to populate field Filters") + } + definition.Filters = &filter + } else { + definition.Filters = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyDefinition populates the provided destination ManagementPolicyDefinition from our ManagementPolicyDefinition +func (definition *ManagementPolicyDefinition) AssignProperties_To_ManagementPolicyDefinition(destination *v20230101s.ManagementPolicyDefinition) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Actions + if definition.Actions != nil { + var action v20230101s.ManagementPolicyAction + err := definition.Actions.AssignProperties_To_ManagementPolicyAction(&action) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyAction() to populate field Actions") + } + destination.Actions = &action + } else { + destination.Actions = nil + } + + // Filters + if definition.Filters != nil { + var filter v20230101s.ManagementPolicyFilter + err := definition.Filters.AssignProperties_To_ManagementPolicyFilter(&filter) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyFilter() to populate field Filters") + } + destination.Filters = &filter + } else { + destination.Filters = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ManagementPolicyDefinition_STATUS populates our ManagementPolicyDefinition from the provided source ManagementPolicyDefinition_STATUS +func (definition *ManagementPolicyDefinition) Initialize_From_ManagementPolicyDefinition_STATUS(source *ManagementPolicyDefinition_STATUS) error { + + // Actions + if source.Actions != nil { + var action ManagementPolicyAction + err := action.Initialize_From_ManagementPolicyAction_STATUS(source.Actions) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ManagementPolicyAction_STATUS() to populate field Actions") + } + definition.Actions = &action + } else { + definition.Actions = nil + } + + // Filters + if source.Filters != nil { + var filter ManagementPolicyFilter + err := filter.Initialize_From_ManagementPolicyFilter_STATUS(source.Filters) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ManagementPolicyFilter_STATUS() to populate field Filters") + } + definition.Filters = &filter + } else { + definition.Filters = nil + } + + // No error + return nil +} + +// An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set. +type ManagementPolicyDefinition_STATUS struct { + // Actions: An object that defines the action set. + Actions *ManagementPolicyAction_STATUS `json:"actions,omitempty"` + + // Filters: An object that defines the filter set. + Filters *ManagementPolicyFilter_STATUS `json:"filters,omitempty"` +} + +var _ genruntime.FromARMConverter = &ManagementPolicyDefinition_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (definition *ManagementPolicyDefinition_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicyDefinition_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (definition *ManagementPolicyDefinition_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicyDefinition_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicyDefinition_STATUS_ARM, got %T", armInput) + } + + // Set property "Actions": + if typedInput.Actions != nil { + var actions1 ManagementPolicyAction_STATUS + err := actions1.PopulateFromARM(owner, *typedInput.Actions) + if err != nil { + return err + } + actions := actions1 + definition.Actions = &actions + } + + // Set property "Filters": + if typedInput.Filters != nil { + var filters1 ManagementPolicyFilter_STATUS + err := filters1.PopulateFromARM(owner, *typedInput.Filters) + if err != nil { + return err + } + filters := filters1 + definition.Filters = &filters + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicyDefinition_STATUS populates our ManagementPolicyDefinition_STATUS from the provided source ManagementPolicyDefinition_STATUS +func (definition *ManagementPolicyDefinition_STATUS) AssignProperties_From_ManagementPolicyDefinition_STATUS(source *v20230101s.ManagementPolicyDefinition_STATUS) error { + + // Actions + if source.Actions != nil { + var action ManagementPolicyAction_STATUS + err := action.AssignProperties_From_ManagementPolicyAction_STATUS(source.Actions) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyAction_STATUS() to populate field Actions") + } + definition.Actions = &action + } else { + definition.Actions = nil + } + + // Filters + if source.Filters != nil { + var filter ManagementPolicyFilter_STATUS + err := filter.AssignProperties_From_ManagementPolicyFilter_STATUS(source.Filters) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyFilter_STATUS() to populate field Filters") + } + definition.Filters = &filter + } else { + definition.Filters = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyDefinition_STATUS populates the provided destination ManagementPolicyDefinition_STATUS from our ManagementPolicyDefinition_STATUS +func (definition *ManagementPolicyDefinition_STATUS) AssignProperties_To_ManagementPolicyDefinition_STATUS(destination *v20230101s.ManagementPolicyDefinition_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Actions + if definition.Actions != nil { + var action v20230101s.ManagementPolicyAction_STATUS + err := definition.Actions.AssignProperties_To_ManagementPolicyAction_STATUS(&action) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyAction_STATUS() to populate field Actions") + } + destination.Actions = &action + } else { + destination.Actions = nil + } + + // Filters + if definition.Filters != nil { + var filter v20230101s.ManagementPolicyFilter_STATUS + err := definition.Filters.AssignProperties_To_ManagementPolicyFilter_STATUS(&filter) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyFilter_STATUS() to populate field Filters") + } + destination.Filters = &filter + } else { + destination.Filters = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"Lifecycle"} +type ManagementPolicyRule_Type string + +const ManagementPolicyRule_Type_Lifecycle = ManagementPolicyRule_Type("Lifecycle") + +type ManagementPolicyRule_Type_STATUS string + +const ManagementPolicyRule_Type_STATUS_Lifecycle = ManagementPolicyRule_Type_STATUS("Lifecycle") + +// Actions are applied to the filtered blobs when the execution condition is met. +type ManagementPolicyAction struct { + // BaseBlob: The management policy action for base blob + BaseBlob *ManagementPolicyBaseBlob `json:"baseBlob,omitempty"` + + // Snapshot: The management policy action for snapshot + Snapshot *ManagementPolicySnapShot `json:"snapshot,omitempty"` + + // Version: The management policy action for version + Version *ManagementPolicyVersion `json:"version,omitempty"` +} + +var _ genruntime.ARMTransformer = &ManagementPolicyAction{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (action *ManagementPolicyAction) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if action == nil { + return nil, nil + } + result := &ManagementPolicyAction_ARM{} + + // Set property "BaseBlob": + if action.BaseBlob != nil { + baseBlob_ARM, err := (*action.BaseBlob).ConvertToARM(resolved) + if err != nil { + return nil, err + } + baseBlob := *baseBlob_ARM.(*ManagementPolicyBaseBlob_ARM) + result.BaseBlob = &baseBlob + } + + // Set property "Snapshot": + if action.Snapshot != nil { + snapshot_ARM, err := (*action.Snapshot).ConvertToARM(resolved) + if err != nil { + return nil, err + } + snapshot := *snapshot_ARM.(*ManagementPolicySnapShot_ARM) + result.Snapshot = &snapshot + } + + // Set property "Version": + if action.Version != nil { + version_ARM, err := (*action.Version).ConvertToARM(resolved) + if err != nil { + return nil, err + } + version := *version_ARM.(*ManagementPolicyVersion_ARM) + result.Version = &version + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (action *ManagementPolicyAction) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicyAction_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (action *ManagementPolicyAction) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicyAction_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicyAction_ARM, got %T", armInput) + } + + // Set property "BaseBlob": + if typedInput.BaseBlob != nil { + var baseBlob1 ManagementPolicyBaseBlob + err := baseBlob1.PopulateFromARM(owner, *typedInput.BaseBlob) + if err != nil { + return err + } + baseBlob := baseBlob1 + action.BaseBlob = &baseBlob + } + + // Set property "Snapshot": + if typedInput.Snapshot != nil { + var snapshot1 ManagementPolicySnapShot + err := snapshot1.PopulateFromARM(owner, *typedInput.Snapshot) + if err != nil { + return err + } + snapshot := snapshot1 + action.Snapshot = &snapshot + } + + // Set property "Version": + if typedInput.Version != nil { + var version1 ManagementPolicyVersion + err := version1.PopulateFromARM(owner, *typedInput.Version) + if err != nil { + return err + } + version := version1 + action.Version = &version + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicyAction populates our ManagementPolicyAction from the provided source ManagementPolicyAction +func (action *ManagementPolicyAction) AssignProperties_From_ManagementPolicyAction(source *v20230101s.ManagementPolicyAction) error { + + // BaseBlob + if source.BaseBlob != nil { + var baseBlob ManagementPolicyBaseBlob + err := baseBlob.AssignProperties_From_ManagementPolicyBaseBlob(source.BaseBlob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyBaseBlob() to populate field BaseBlob") + } + action.BaseBlob = &baseBlob + } else { + action.BaseBlob = nil + } + + // Snapshot + if source.Snapshot != nil { + var snapshot ManagementPolicySnapShot + err := snapshot.AssignProperties_From_ManagementPolicySnapShot(source.Snapshot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicySnapShot() to populate field Snapshot") + } + action.Snapshot = &snapshot + } else { + action.Snapshot = nil + } + + // Version + if source.Version != nil { + var version ManagementPolicyVersion + err := version.AssignProperties_From_ManagementPolicyVersion(source.Version) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyVersion() to populate field Version") + } + action.Version = &version + } else { + action.Version = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyAction populates the provided destination ManagementPolicyAction from our ManagementPolicyAction +func (action *ManagementPolicyAction) AssignProperties_To_ManagementPolicyAction(destination *v20230101s.ManagementPolicyAction) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // BaseBlob + if action.BaseBlob != nil { + var baseBlob v20230101s.ManagementPolicyBaseBlob + err := action.BaseBlob.AssignProperties_To_ManagementPolicyBaseBlob(&baseBlob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyBaseBlob() to populate field BaseBlob") + } + destination.BaseBlob = &baseBlob + } else { + destination.BaseBlob = nil + } + + // Snapshot + if action.Snapshot != nil { + var snapshot v20230101s.ManagementPolicySnapShot + err := action.Snapshot.AssignProperties_To_ManagementPolicySnapShot(&snapshot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicySnapShot() to populate field Snapshot") + } + destination.Snapshot = &snapshot + } else { + destination.Snapshot = nil + } + + // Version + if action.Version != nil { + var version v20230101s.ManagementPolicyVersion + err := action.Version.AssignProperties_To_ManagementPolicyVersion(&version) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyVersion() to populate field Version") + } + destination.Version = &version + } else { + destination.Version = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ManagementPolicyAction_STATUS populates our ManagementPolicyAction from the provided source ManagementPolicyAction_STATUS +func (action *ManagementPolicyAction) Initialize_From_ManagementPolicyAction_STATUS(source *ManagementPolicyAction_STATUS) error { + + // BaseBlob + if source.BaseBlob != nil { + var baseBlob ManagementPolicyBaseBlob + err := baseBlob.Initialize_From_ManagementPolicyBaseBlob_STATUS(source.BaseBlob) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ManagementPolicyBaseBlob_STATUS() to populate field BaseBlob") + } + action.BaseBlob = &baseBlob + } else { + action.BaseBlob = nil + } + + // Snapshot + if source.Snapshot != nil { + var snapshot ManagementPolicySnapShot + err := snapshot.Initialize_From_ManagementPolicySnapShot_STATUS(source.Snapshot) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ManagementPolicySnapShot_STATUS() to populate field Snapshot") + } + action.Snapshot = &snapshot + } else { + action.Snapshot = nil + } + + // Version + if source.Version != nil { + var version ManagementPolicyVersion + err := version.Initialize_From_ManagementPolicyVersion_STATUS(source.Version) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_ManagementPolicyVersion_STATUS() to populate field Version") + } + action.Version = &version + } else { + action.Version = nil + } + + // No error + return nil +} + +// Actions are applied to the filtered blobs when the execution condition is met. +type ManagementPolicyAction_STATUS struct { + // BaseBlob: The management policy action for base blob + BaseBlob *ManagementPolicyBaseBlob_STATUS `json:"baseBlob,omitempty"` + + // Snapshot: The management policy action for snapshot + Snapshot *ManagementPolicySnapShot_STATUS `json:"snapshot,omitempty"` + + // Version: The management policy action for version + Version *ManagementPolicyVersion_STATUS `json:"version,omitempty"` +} + +var _ genruntime.FromARMConverter = &ManagementPolicyAction_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (action *ManagementPolicyAction_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicyAction_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (action *ManagementPolicyAction_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicyAction_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicyAction_STATUS_ARM, got %T", armInput) + } + + // Set property "BaseBlob": + if typedInput.BaseBlob != nil { + var baseBlob1 ManagementPolicyBaseBlob_STATUS + err := baseBlob1.PopulateFromARM(owner, *typedInput.BaseBlob) + if err != nil { + return err + } + baseBlob := baseBlob1 + action.BaseBlob = &baseBlob + } + + // Set property "Snapshot": + if typedInput.Snapshot != nil { + var snapshot1 ManagementPolicySnapShot_STATUS + err := snapshot1.PopulateFromARM(owner, *typedInput.Snapshot) + if err != nil { + return err + } + snapshot := snapshot1 + action.Snapshot = &snapshot + } + + // Set property "Version": + if typedInput.Version != nil { + var version1 ManagementPolicyVersion_STATUS + err := version1.PopulateFromARM(owner, *typedInput.Version) + if err != nil { + return err + } + version := version1 + action.Version = &version + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicyAction_STATUS populates our ManagementPolicyAction_STATUS from the provided source ManagementPolicyAction_STATUS +func (action *ManagementPolicyAction_STATUS) AssignProperties_From_ManagementPolicyAction_STATUS(source *v20230101s.ManagementPolicyAction_STATUS) error { + + // BaseBlob + if source.BaseBlob != nil { + var baseBlob ManagementPolicyBaseBlob_STATUS + err := baseBlob.AssignProperties_From_ManagementPolicyBaseBlob_STATUS(source.BaseBlob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyBaseBlob_STATUS() to populate field BaseBlob") + } + action.BaseBlob = &baseBlob + } else { + action.BaseBlob = nil + } + + // Snapshot + if source.Snapshot != nil { + var snapshot ManagementPolicySnapShot_STATUS + err := snapshot.AssignProperties_From_ManagementPolicySnapShot_STATUS(source.Snapshot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicySnapShot_STATUS() to populate field Snapshot") + } + action.Snapshot = &snapshot + } else { + action.Snapshot = nil + } + + // Version + if source.Version != nil { + var version ManagementPolicyVersion_STATUS + err := version.AssignProperties_From_ManagementPolicyVersion_STATUS(source.Version) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagementPolicyVersion_STATUS() to populate field Version") + } + action.Version = &version + } else { + action.Version = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyAction_STATUS populates the provided destination ManagementPolicyAction_STATUS from our ManagementPolicyAction_STATUS +func (action *ManagementPolicyAction_STATUS) AssignProperties_To_ManagementPolicyAction_STATUS(destination *v20230101s.ManagementPolicyAction_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // BaseBlob + if action.BaseBlob != nil { + var baseBlob v20230101s.ManagementPolicyBaseBlob_STATUS + err := action.BaseBlob.AssignProperties_To_ManagementPolicyBaseBlob_STATUS(&baseBlob) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyBaseBlob_STATUS() to populate field BaseBlob") + } + destination.BaseBlob = &baseBlob + } else { + destination.BaseBlob = nil + } + + // Snapshot + if action.Snapshot != nil { + var snapshot v20230101s.ManagementPolicySnapShot_STATUS + err := action.Snapshot.AssignProperties_To_ManagementPolicySnapShot_STATUS(&snapshot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicySnapShot_STATUS() to populate field Snapshot") + } + destination.Snapshot = &snapshot + } else { + destination.Snapshot = nil + } + + // Version + if action.Version != nil { + var version v20230101s.ManagementPolicyVersion_STATUS + err := action.Version.AssignProperties_To_ManagementPolicyVersion_STATUS(&version) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagementPolicyVersion_STATUS() to populate field Version") + } + destination.Version = &version + } else { + destination.Version = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical +// AND is performed on all filters. +type ManagementPolicyFilter struct { + // BlobIndexMatch: An array of blob index tag based filters, there can be at most 10 tag filters + BlobIndexMatch []TagFilter `json:"blobIndexMatch,omitempty"` + + // +kubebuilder:validation:Required + // BlobTypes: An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete + // actions are supported for appendBlob. + BlobTypes []string `json:"blobTypes,omitempty"` + + // PrefixMatch: An array of strings for prefixes to be match. + PrefixMatch []string `json:"prefixMatch,omitempty"` +} + +var _ genruntime.ARMTransformer = &ManagementPolicyFilter{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (filter *ManagementPolicyFilter) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if filter == nil { + return nil, nil + } + result := &ManagementPolicyFilter_ARM{} + + // Set property "BlobIndexMatch": + for _, item := range filter.BlobIndexMatch { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.BlobIndexMatch = append(result.BlobIndexMatch, *item_ARM.(*TagFilter_ARM)) + } + + // Set property "BlobTypes": + for _, item := range filter.BlobTypes { + result.BlobTypes = append(result.BlobTypes, item) + } + + // Set property "PrefixMatch": + for _, item := range filter.PrefixMatch { + result.PrefixMatch = append(result.PrefixMatch, item) + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (filter *ManagementPolicyFilter) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicyFilter_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (filter *ManagementPolicyFilter) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicyFilter_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicyFilter_ARM, got %T", armInput) + } + + // Set property "BlobIndexMatch": + for _, item := range typedInput.BlobIndexMatch { + var item1 TagFilter + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + filter.BlobIndexMatch = append(filter.BlobIndexMatch, item1) + } + + // Set property "BlobTypes": + for _, item := range typedInput.BlobTypes { + filter.BlobTypes = append(filter.BlobTypes, item) + } + + // Set property "PrefixMatch": + for _, item := range typedInput.PrefixMatch { + filter.PrefixMatch = append(filter.PrefixMatch, item) + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicyFilter populates our ManagementPolicyFilter from the provided source ManagementPolicyFilter +func (filter *ManagementPolicyFilter) AssignProperties_From_ManagementPolicyFilter(source *v20230101s.ManagementPolicyFilter) error { + + // BlobIndexMatch + if source.BlobIndexMatch != nil { + blobIndexMatchList := make([]TagFilter, len(source.BlobIndexMatch)) + for blobIndexMatchIndex, blobIndexMatchItem := range source.BlobIndexMatch { + // Shadow the loop variable to avoid aliasing + blobIndexMatchItem := blobIndexMatchItem + var blobIndexMatch TagFilter + err := blobIndexMatch.AssignProperties_From_TagFilter(&blobIndexMatchItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TagFilter() to populate field BlobIndexMatch") + } + blobIndexMatchList[blobIndexMatchIndex] = blobIndexMatch + } + filter.BlobIndexMatch = blobIndexMatchList + } else { + filter.BlobIndexMatch = nil + } + + // BlobTypes + filter.BlobTypes = genruntime.CloneSliceOfString(source.BlobTypes) + + // PrefixMatch + filter.PrefixMatch = genruntime.CloneSliceOfString(source.PrefixMatch) + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyFilter populates the provided destination ManagementPolicyFilter from our ManagementPolicyFilter +func (filter *ManagementPolicyFilter) AssignProperties_To_ManagementPolicyFilter(destination *v20230101s.ManagementPolicyFilter) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // BlobIndexMatch + if filter.BlobIndexMatch != nil { + blobIndexMatchList := make([]v20230101s.TagFilter, len(filter.BlobIndexMatch)) + for blobIndexMatchIndex, blobIndexMatchItem := range filter.BlobIndexMatch { + // Shadow the loop variable to avoid aliasing + blobIndexMatchItem := blobIndexMatchItem + var blobIndexMatch v20230101s.TagFilter + err := blobIndexMatchItem.AssignProperties_To_TagFilter(&blobIndexMatch) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TagFilter() to populate field BlobIndexMatch") + } + blobIndexMatchList[blobIndexMatchIndex] = blobIndexMatch + } + destination.BlobIndexMatch = blobIndexMatchList + } else { + destination.BlobIndexMatch = nil + } + + // BlobTypes + destination.BlobTypes = genruntime.CloneSliceOfString(filter.BlobTypes) + + // PrefixMatch + destination.PrefixMatch = genruntime.CloneSliceOfString(filter.PrefixMatch) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ManagementPolicyFilter_STATUS populates our ManagementPolicyFilter from the provided source ManagementPolicyFilter_STATUS +func (filter *ManagementPolicyFilter) Initialize_From_ManagementPolicyFilter_STATUS(source *ManagementPolicyFilter_STATUS) error { + + // BlobIndexMatch + if source.BlobIndexMatch != nil { + blobIndexMatchList := make([]TagFilter, len(source.BlobIndexMatch)) + for blobIndexMatchIndex, blobIndexMatchItem := range source.BlobIndexMatch { + // Shadow the loop variable to avoid aliasing + blobIndexMatchItem := blobIndexMatchItem + var blobIndexMatch TagFilter + err := blobIndexMatch.Initialize_From_TagFilter_STATUS(&blobIndexMatchItem) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_TagFilter_STATUS() to populate field BlobIndexMatch") + } + blobIndexMatchList[blobIndexMatchIndex] = blobIndexMatch + } + filter.BlobIndexMatch = blobIndexMatchList + } else { + filter.BlobIndexMatch = nil + } + + // BlobTypes + filter.BlobTypes = genruntime.CloneSliceOfString(source.BlobTypes) + + // PrefixMatch + filter.PrefixMatch = genruntime.CloneSliceOfString(source.PrefixMatch) + + // No error + return nil +} + +// Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical +// AND is performed on all filters. +type ManagementPolicyFilter_STATUS struct { + // BlobIndexMatch: An array of blob index tag based filters, there can be at most 10 tag filters + BlobIndexMatch []TagFilter_STATUS `json:"blobIndexMatch,omitempty"` + + // BlobTypes: An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete + // actions are supported for appendBlob. + BlobTypes []string `json:"blobTypes,omitempty"` + + // PrefixMatch: An array of strings for prefixes to be match. + PrefixMatch []string `json:"prefixMatch,omitempty"` +} + +var _ genruntime.FromARMConverter = &ManagementPolicyFilter_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (filter *ManagementPolicyFilter_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicyFilter_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (filter *ManagementPolicyFilter_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicyFilter_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicyFilter_STATUS_ARM, got %T", armInput) + } + + // Set property "BlobIndexMatch": + for _, item := range typedInput.BlobIndexMatch { + var item1 TagFilter_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + filter.BlobIndexMatch = append(filter.BlobIndexMatch, item1) + } + + // Set property "BlobTypes": + for _, item := range typedInput.BlobTypes { + filter.BlobTypes = append(filter.BlobTypes, item) + } + + // Set property "PrefixMatch": + for _, item := range typedInput.PrefixMatch { + filter.PrefixMatch = append(filter.PrefixMatch, item) + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicyFilter_STATUS populates our ManagementPolicyFilter_STATUS from the provided source ManagementPolicyFilter_STATUS +func (filter *ManagementPolicyFilter_STATUS) AssignProperties_From_ManagementPolicyFilter_STATUS(source *v20230101s.ManagementPolicyFilter_STATUS) error { + + // BlobIndexMatch + if source.BlobIndexMatch != nil { + blobIndexMatchList := make([]TagFilter_STATUS, len(source.BlobIndexMatch)) + for blobIndexMatchIndex, blobIndexMatchItem := range source.BlobIndexMatch { + // Shadow the loop variable to avoid aliasing + blobIndexMatchItem := blobIndexMatchItem + var blobIndexMatch TagFilter_STATUS + err := blobIndexMatch.AssignProperties_From_TagFilter_STATUS(&blobIndexMatchItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TagFilter_STATUS() to populate field BlobIndexMatch") + } + blobIndexMatchList[blobIndexMatchIndex] = blobIndexMatch + } + filter.BlobIndexMatch = blobIndexMatchList + } else { + filter.BlobIndexMatch = nil + } + + // BlobTypes + filter.BlobTypes = genruntime.CloneSliceOfString(source.BlobTypes) + + // PrefixMatch + filter.PrefixMatch = genruntime.CloneSliceOfString(source.PrefixMatch) + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyFilter_STATUS populates the provided destination ManagementPolicyFilter_STATUS from our ManagementPolicyFilter_STATUS +func (filter *ManagementPolicyFilter_STATUS) AssignProperties_To_ManagementPolicyFilter_STATUS(destination *v20230101s.ManagementPolicyFilter_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // BlobIndexMatch + if filter.BlobIndexMatch != nil { + blobIndexMatchList := make([]v20230101s.TagFilter_STATUS, len(filter.BlobIndexMatch)) + for blobIndexMatchIndex, blobIndexMatchItem := range filter.BlobIndexMatch { + // Shadow the loop variable to avoid aliasing + blobIndexMatchItem := blobIndexMatchItem + var blobIndexMatch v20230101s.TagFilter_STATUS + err := blobIndexMatchItem.AssignProperties_To_TagFilter_STATUS(&blobIndexMatch) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TagFilter_STATUS() to populate field BlobIndexMatch") + } + blobIndexMatchList[blobIndexMatchIndex] = blobIndexMatch + } + destination.BlobIndexMatch = blobIndexMatchList + } else { + destination.BlobIndexMatch = nil + } + + // BlobTypes + destination.BlobTypes = genruntime.CloneSliceOfString(filter.BlobTypes) + + // PrefixMatch + destination.PrefixMatch = genruntime.CloneSliceOfString(filter.PrefixMatch) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Management policy action for base blob. +type ManagementPolicyBaseBlob struct { + // Delete: The function to delete the blob + Delete *DateAfterModification `json:"delete,omitempty"` + + // EnableAutoTierToHotFromCool: This property enables auto tiering of a blob from cool to hot on a blob access. This + // property requires tierToCool.daysAfterLastAccessTimeGreaterThan. + EnableAutoTierToHotFromCool *bool `json:"enableAutoTierToHotFromCool,omitempty"` + + // TierToArchive: The function to tier blobs to archive storage. + TierToArchive *DateAfterModification `json:"tierToArchive,omitempty"` + + // TierToCold: The function to tier blobs to cold storage. + TierToCold *DateAfterModification `json:"tierToCold,omitempty"` + + // TierToCool: The function to tier blobs to cool storage. + TierToCool *DateAfterModification `json:"tierToCool,omitempty"` + + // TierToHot: The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage + // Accounts + TierToHot *DateAfterModification `json:"tierToHot,omitempty"` +} + +var _ genruntime.ARMTransformer = &ManagementPolicyBaseBlob{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (blob *ManagementPolicyBaseBlob) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if blob == nil { + return nil, nil + } + result := &ManagementPolicyBaseBlob_ARM{} + + // Set property "Delete": + if blob.Delete != nil { + delete_ARM, err := (*blob.Delete).ConvertToARM(resolved) + if err != nil { + return nil, err + } + delete := *delete_ARM.(*DateAfterModification_ARM) + result.Delete = &delete + } + + // Set property "EnableAutoTierToHotFromCool": + if blob.EnableAutoTierToHotFromCool != nil { + enableAutoTierToHotFromCool := *blob.EnableAutoTierToHotFromCool + result.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool + } + + // Set property "TierToArchive": + if blob.TierToArchive != nil { + tierToArchive_ARM, err := (*blob.TierToArchive).ConvertToARM(resolved) + if err != nil { + return nil, err + } + tierToArchive := *tierToArchive_ARM.(*DateAfterModification_ARM) + result.TierToArchive = &tierToArchive + } + + // Set property "TierToCold": + if blob.TierToCold != nil { + tierToCold_ARM, err := (*blob.TierToCold).ConvertToARM(resolved) + if err != nil { + return nil, err + } + tierToCold := *tierToCold_ARM.(*DateAfterModification_ARM) + result.TierToCold = &tierToCold + } + + // Set property "TierToCool": + if blob.TierToCool != nil { + tierToCool_ARM, err := (*blob.TierToCool).ConvertToARM(resolved) + if err != nil { + return nil, err + } + tierToCool := *tierToCool_ARM.(*DateAfterModification_ARM) + result.TierToCool = &tierToCool + } + + // Set property "TierToHot": + if blob.TierToHot != nil { + tierToHot_ARM, err := (*blob.TierToHot).ConvertToARM(resolved) + if err != nil { + return nil, err + } + tierToHot := *tierToHot_ARM.(*DateAfterModification_ARM) + result.TierToHot = &tierToHot + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (blob *ManagementPolicyBaseBlob) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicyBaseBlob_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (blob *ManagementPolicyBaseBlob) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicyBaseBlob_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicyBaseBlob_ARM, got %T", armInput) + } + + // Set property "Delete": + if typedInput.Delete != nil { + var delete1 DateAfterModification + err := delete1.PopulateFromARM(owner, *typedInput.Delete) + if err != nil { + return err + } + delete := delete1 + blob.Delete = &delete + } + + // Set property "EnableAutoTierToHotFromCool": + if typedInput.EnableAutoTierToHotFromCool != nil { + enableAutoTierToHotFromCool := *typedInput.EnableAutoTierToHotFromCool + blob.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool + } + + // Set property "TierToArchive": + if typedInput.TierToArchive != nil { + var tierToArchive1 DateAfterModification + err := tierToArchive1.PopulateFromARM(owner, *typedInput.TierToArchive) + if err != nil { + return err + } + tierToArchive := tierToArchive1 + blob.TierToArchive = &tierToArchive + } + + // Set property "TierToCold": + if typedInput.TierToCold != nil { + var tierToCold1 DateAfterModification + err := tierToCold1.PopulateFromARM(owner, *typedInput.TierToCold) + if err != nil { + return err + } + tierToCold := tierToCold1 + blob.TierToCold = &tierToCold + } + + // Set property "TierToCool": + if typedInput.TierToCool != nil { + var tierToCool1 DateAfterModification + err := tierToCool1.PopulateFromARM(owner, *typedInput.TierToCool) + if err != nil { + return err + } + tierToCool := tierToCool1 + blob.TierToCool = &tierToCool + } + + // Set property "TierToHot": + if typedInput.TierToHot != nil { + var tierToHot1 DateAfterModification + err := tierToHot1.PopulateFromARM(owner, *typedInput.TierToHot) + if err != nil { + return err + } + tierToHot := tierToHot1 + blob.TierToHot = &tierToHot + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicyBaseBlob populates our ManagementPolicyBaseBlob from the provided source ManagementPolicyBaseBlob +func (blob *ManagementPolicyBaseBlob) AssignProperties_From_ManagementPolicyBaseBlob(source *v20230101s.ManagementPolicyBaseBlob) error { + + // Delete + if source.Delete != nil { + var delete DateAfterModification + err := delete.AssignProperties_From_DateAfterModification(source.Delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification() to populate field Delete") + } + blob.Delete = &delete + } else { + blob.Delete = nil + } + + // EnableAutoTierToHotFromCool + if source.EnableAutoTierToHotFromCool != nil { + enableAutoTierToHotFromCool := *source.EnableAutoTierToHotFromCool + blob.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool + } else { + blob.EnableAutoTierToHotFromCool = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterModification + err := tierToArchive.AssignProperties_From_DateAfterModification(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification() to populate field TierToArchive") + } + blob.TierToArchive = &tierToArchive + } else { + blob.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterModification + err := tierToCold.AssignProperties_From_DateAfterModification(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification() to populate field TierToCold") + } + blob.TierToCold = &tierToCold + } else { + blob.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterModification + err := tierToCool.AssignProperties_From_DateAfterModification(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification() to populate field TierToCool") + } + blob.TierToCool = &tierToCool + } else { + blob.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterModification + err := tierToHot.AssignProperties_From_DateAfterModification(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification() to populate field TierToHot") + } + blob.TierToHot = &tierToHot + } else { + blob.TierToHot = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyBaseBlob populates the provided destination ManagementPolicyBaseBlob from our ManagementPolicyBaseBlob +func (blob *ManagementPolicyBaseBlob) AssignProperties_To_ManagementPolicyBaseBlob(destination *v20230101s.ManagementPolicyBaseBlob) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Delete + if blob.Delete != nil { + var delete v20230101s.DateAfterModification + err := blob.Delete.AssignProperties_To_DateAfterModification(&delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification() to populate field Delete") + } + destination.Delete = &delete + } else { + destination.Delete = nil + } + + // EnableAutoTierToHotFromCool + if blob.EnableAutoTierToHotFromCool != nil { + enableAutoTierToHotFromCool := *blob.EnableAutoTierToHotFromCool + destination.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool + } else { + destination.EnableAutoTierToHotFromCool = nil + } + + // TierToArchive + if blob.TierToArchive != nil { + var tierToArchive v20230101s.DateAfterModification + err := blob.TierToArchive.AssignProperties_To_DateAfterModification(&tierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification() to populate field TierToArchive") + } + destination.TierToArchive = &tierToArchive + } else { + destination.TierToArchive = nil + } + + // TierToCold + if blob.TierToCold != nil { + var tierToCold v20230101s.DateAfterModification + err := blob.TierToCold.AssignProperties_To_DateAfterModification(&tierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification() to populate field TierToCold") + } + destination.TierToCold = &tierToCold + } else { + destination.TierToCold = nil + } + + // TierToCool + if blob.TierToCool != nil { + var tierToCool v20230101s.DateAfterModification + err := blob.TierToCool.AssignProperties_To_DateAfterModification(&tierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification() to populate field TierToCool") + } + destination.TierToCool = &tierToCool + } else { + destination.TierToCool = nil + } + + // TierToHot + if blob.TierToHot != nil { + var tierToHot v20230101s.DateAfterModification + err := blob.TierToHot.AssignProperties_To_DateAfterModification(&tierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification() to populate field TierToHot") + } + destination.TierToHot = &tierToHot + } else { + destination.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ManagementPolicyBaseBlob_STATUS populates our ManagementPolicyBaseBlob from the provided source ManagementPolicyBaseBlob_STATUS +func (blob *ManagementPolicyBaseBlob) Initialize_From_ManagementPolicyBaseBlob_STATUS(source *ManagementPolicyBaseBlob_STATUS) error { + + // Delete + if source.Delete != nil { + var delete DateAfterModification + err := delete.Initialize_From_DateAfterModification_STATUS(source.Delete) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterModification_STATUS() to populate field Delete") + } + blob.Delete = &delete + } else { + blob.Delete = nil + } + + // EnableAutoTierToHotFromCool + if source.EnableAutoTierToHotFromCool != nil { + enableAutoTierToHotFromCool := *source.EnableAutoTierToHotFromCool + blob.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool + } else { + blob.EnableAutoTierToHotFromCool = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterModification + err := tierToArchive.Initialize_From_DateAfterModification_STATUS(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterModification_STATUS() to populate field TierToArchive") + } + blob.TierToArchive = &tierToArchive + } else { + blob.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterModification + err := tierToCold.Initialize_From_DateAfterModification_STATUS(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterModification_STATUS() to populate field TierToCold") + } + blob.TierToCold = &tierToCold + } else { + blob.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterModification + err := tierToCool.Initialize_From_DateAfterModification_STATUS(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterModification_STATUS() to populate field TierToCool") + } + blob.TierToCool = &tierToCool + } else { + blob.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterModification + err := tierToHot.Initialize_From_DateAfterModification_STATUS(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterModification_STATUS() to populate field TierToHot") + } + blob.TierToHot = &tierToHot + } else { + blob.TierToHot = nil + } + + // No error + return nil +} + +// Management policy action for base blob. +type ManagementPolicyBaseBlob_STATUS struct { + // Delete: The function to delete the blob + Delete *DateAfterModification_STATUS `json:"delete,omitempty"` + + // EnableAutoTierToHotFromCool: This property enables auto tiering of a blob from cool to hot on a blob access. This + // property requires tierToCool.daysAfterLastAccessTimeGreaterThan. + EnableAutoTierToHotFromCool *bool `json:"enableAutoTierToHotFromCool,omitempty"` + + // TierToArchive: The function to tier blobs to archive storage. + TierToArchive *DateAfterModification_STATUS `json:"tierToArchive,omitempty"` + + // TierToCold: The function to tier blobs to cold storage. + TierToCold *DateAfterModification_STATUS `json:"tierToCold,omitempty"` + + // TierToCool: The function to tier blobs to cool storage. + TierToCool *DateAfterModification_STATUS `json:"tierToCool,omitempty"` + + // TierToHot: The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage + // Accounts + TierToHot *DateAfterModification_STATUS `json:"tierToHot,omitempty"` +} + +var _ genruntime.FromARMConverter = &ManagementPolicyBaseBlob_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (blob *ManagementPolicyBaseBlob_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicyBaseBlob_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (blob *ManagementPolicyBaseBlob_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicyBaseBlob_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicyBaseBlob_STATUS_ARM, got %T", armInput) + } + + // Set property "Delete": + if typedInput.Delete != nil { + var delete1 DateAfterModification_STATUS + err := delete1.PopulateFromARM(owner, *typedInput.Delete) + if err != nil { + return err + } + delete := delete1 + blob.Delete = &delete + } + + // Set property "EnableAutoTierToHotFromCool": + if typedInput.EnableAutoTierToHotFromCool != nil { + enableAutoTierToHotFromCool := *typedInput.EnableAutoTierToHotFromCool + blob.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool + } + + // Set property "TierToArchive": + if typedInput.TierToArchive != nil { + var tierToArchive1 DateAfterModification_STATUS + err := tierToArchive1.PopulateFromARM(owner, *typedInput.TierToArchive) + if err != nil { + return err + } + tierToArchive := tierToArchive1 + blob.TierToArchive = &tierToArchive + } + + // Set property "TierToCold": + if typedInput.TierToCold != nil { + var tierToCold1 DateAfterModification_STATUS + err := tierToCold1.PopulateFromARM(owner, *typedInput.TierToCold) + if err != nil { + return err + } + tierToCold := tierToCold1 + blob.TierToCold = &tierToCold + } + + // Set property "TierToCool": + if typedInput.TierToCool != nil { + var tierToCool1 DateAfterModification_STATUS + err := tierToCool1.PopulateFromARM(owner, *typedInput.TierToCool) + if err != nil { + return err + } + tierToCool := tierToCool1 + blob.TierToCool = &tierToCool + } + + // Set property "TierToHot": + if typedInput.TierToHot != nil { + var tierToHot1 DateAfterModification_STATUS + err := tierToHot1.PopulateFromARM(owner, *typedInput.TierToHot) + if err != nil { + return err + } + tierToHot := tierToHot1 + blob.TierToHot = &tierToHot + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicyBaseBlob_STATUS populates our ManagementPolicyBaseBlob_STATUS from the provided source ManagementPolicyBaseBlob_STATUS +func (blob *ManagementPolicyBaseBlob_STATUS) AssignProperties_From_ManagementPolicyBaseBlob_STATUS(source *v20230101s.ManagementPolicyBaseBlob_STATUS) error { + + // Delete + if source.Delete != nil { + var delete DateAfterModification_STATUS + err := delete.AssignProperties_From_DateAfterModification_STATUS(source.Delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification_STATUS() to populate field Delete") + } + blob.Delete = &delete + } else { + blob.Delete = nil + } + + // EnableAutoTierToHotFromCool + if source.EnableAutoTierToHotFromCool != nil { + enableAutoTierToHotFromCool := *source.EnableAutoTierToHotFromCool + blob.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool + } else { + blob.EnableAutoTierToHotFromCool = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterModification_STATUS + err := tierToArchive.AssignProperties_From_DateAfterModification_STATUS(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification_STATUS() to populate field TierToArchive") + } + blob.TierToArchive = &tierToArchive + } else { + blob.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterModification_STATUS + err := tierToCold.AssignProperties_From_DateAfterModification_STATUS(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification_STATUS() to populate field TierToCold") + } + blob.TierToCold = &tierToCold + } else { + blob.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterModification_STATUS + err := tierToCool.AssignProperties_From_DateAfterModification_STATUS(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification_STATUS() to populate field TierToCool") + } + blob.TierToCool = &tierToCool + } else { + blob.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterModification_STATUS + err := tierToHot.AssignProperties_From_DateAfterModification_STATUS(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterModification_STATUS() to populate field TierToHot") + } + blob.TierToHot = &tierToHot + } else { + blob.TierToHot = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyBaseBlob_STATUS populates the provided destination ManagementPolicyBaseBlob_STATUS from our ManagementPolicyBaseBlob_STATUS +func (blob *ManagementPolicyBaseBlob_STATUS) AssignProperties_To_ManagementPolicyBaseBlob_STATUS(destination *v20230101s.ManagementPolicyBaseBlob_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Delete + if blob.Delete != nil { + var delete v20230101s.DateAfterModification_STATUS + err := blob.Delete.AssignProperties_To_DateAfterModification_STATUS(&delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification_STATUS() to populate field Delete") + } + destination.Delete = &delete + } else { + destination.Delete = nil + } + + // EnableAutoTierToHotFromCool + if blob.EnableAutoTierToHotFromCool != nil { + enableAutoTierToHotFromCool := *blob.EnableAutoTierToHotFromCool + destination.EnableAutoTierToHotFromCool = &enableAutoTierToHotFromCool + } else { + destination.EnableAutoTierToHotFromCool = nil + } + + // TierToArchive + if blob.TierToArchive != nil { + var tierToArchive v20230101s.DateAfterModification_STATUS + err := blob.TierToArchive.AssignProperties_To_DateAfterModification_STATUS(&tierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification_STATUS() to populate field TierToArchive") + } + destination.TierToArchive = &tierToArchive + } else { + destination.TierToArchive = nil + } + + // TierToCold + if blob.TierToCold != nil { + var tierToCold v20230101s.DateAfterModification_STATUS + err := blob.TierToCold.AssignProperties_To_DateAfterModification_STATUS(&tierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification_STATUS() to populate field TierToCold") + } + destination.TierToCold = &tierToCold + } else { + destination.TierToCold = nil + } + + // TierToCool + if blob.TierToCool != nil { + var tierToCool v20230101s.DateAfterModification_STATUS + err := blob.TierToCool.AssignProperties_To_DateAfterModification_STATUS(&tierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification_STATUS() to populate field TierToCool") + } + destination.TierToCool = &tierToCool + } else { + destination.TierToCool = nil + } + + // TierToHot + if blob.TierToHot != nil { + var tierToHot v20230101s.DateAfterModification_STATUS + err := blob.TierToHot.AssignProperties_To_DateAfterModification_STATUS(&tierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterModification_STATUS() to populate field TierToHot") + } + destination.TierToHot = &tierToHot + } else { + destination.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Management policy action for snapshot. +type ManagementPolicySnapShot struct { + // Delete: The function to delete the blob snapshot + Delete *DateAfterCreation `json:"delete,omitempty"` + + // TierToArchive: The function to tier blob snapshot to archive storage. + TierToArchive *DateAfterCreation `json:"tierToArchive,omitempty"` + + // TierToCold: The function to tier blobs to cold storage. + TierToCold *DateAfterCreation `json:"tierToCold,omitempty"` + + // TierToCool: The function to tier blob snapshot to cool storage. + TierToCool *DateAfterCreation `json:"tierToCool,omitempty"` + + // TierToHot: The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage + // Accounts + TierToHot *DateAfterCreation `json:"tierToHot,omitempty"` +} + +var _ genruntime.ARMTransformer = &ManagementPolicySnapShot{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (shot *ManagementPolicySnapShot) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if shot == nil { + return nil, nil + } + result := &ManagementPolicySnapShot_ARM{} + + // Set property "Delete": + if shot.Delete != nil { + delete_ARM, err := (*shot.Delete).ConvertToARM(resolved) + if err != nil { + return nil, err + } + delete := *delete_ARM.(*DateAfterCreation_ARM) + result.Delete = &delete + } + + // Set property "TierToArchive": + if shot.TierToArchive != nil { + tierToArchive_ARM, err := (*shot.TierToArchive).ConvertToARM(resolved) + if err != nil { + return nil, err + } + tierToArchive := *tierToArchive_ARM.(*DateAfterCreation_ARM) + result.TierToArchive = &tierToArchive + } + + // Set property "TierToCold": + if shot.TierToCold != nil { + tierToCold_ARM, err := (*shot.TierToCold).ConvertToARM(resolved) + if err != nil { + return nil, err + } + tierToCold := *tierToCold_ARM.(*DateAfterCreation_ARM) + result.TierToCold = &tierToCold + } + + // Set property "TierToCool": + if shot.TierToCool != nil { + tierToCool_ARM, err := (*shot.TierToCool).ConvertToARM(resolved) + if err != nil { + return nil, err + } + tierToCool := *tierToCool_ARM.(*DateAfterCreation_ARM) + result.TierToCool = &tierToCool + } + + // Set property "TierToHot": + if shot.TierToHot != nil { + tierToHot_ARM, err := (*shot.TierToHot).ConvertToARM(resolved) + if err != nil { + return nil, err + } + tierToHot := *tierToHot_ARM.(*DateAfterCreation_ARM) + result.TierToHot = &tierToHot + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (shot *ManagementPolicySnapShot) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicySnapShot_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (shot *ManagementPolicySnapShot) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicySnapShot_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicySnapShot_ARM, got %T", armInput) + } + + // Set property "Delete": + if typedInput.Delete != nil { + var delete1 DateAfterCreation + err := delete1.PopulateFromARM(owner, *typedInput.Delete) + if err != nil { + return err + } + delete := delete1 + shot.Delete = &delete + } + + // Set property "TierToArchive": + if typedInput.TierToArchive != nil { + var tierToArchive1 DateAfterCreation + err := tierToArchive1.PopulateFromARM(owner, *typedInput.TierToArchive) + if err != nil { + return err + } + tierToArchive := tierToArchive1 + shot.TierToArchive = &tierToArchive + } + + // Set property "TierToCold": + if typedInput.TierToCold != nil { + var tierToCold1 DateAfterCreation + err := tierToCold1.PopulateFromARM(owner, *typedInput.TierToCold) + if err != nil { + return err + } + tierToCold := tierToCold1 + shot.TierToCold = &tierToCold + } + + // Set property "TierToCool": + if typedInput.TierToCool != nil { + var tierToCool1 DateAfterCreation + err := tierToCool1.PopulateFromARM(owner, *typedInput.TierToCool) + if err != nil { + return err + } + tierToCool := tierToCool1 + shot.TierToCool = &tierToCool + } + + // Set property "TierToHot": + if typedInput.TierToHot != nil { + var tierToHot1 DateAfterCreation + err := tierToHot1.PopulateFromARM(owner, *typedInput.TierToHot) + if err != nil { + return err + } + tierToHot := tierToHot1 + shot.TierToHot = &tierToHot + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicySnapShot populates our ManagementPolicySnapShot from the provided source ManagementPolicySnapShot +func (shot *ManagementPolicySnapShot) AssignProperties_From_ManagementPolicySnapShot(source *v20230101s.ManagementPolicySnapShot) error { + + // Delete + if source.Delete != nil { + var delete DateAfterCreation + err := delete.AssignProperties_From_DateAfterCreation(source.Delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field Delete") + } + shot.Delete = &delete + } else { + shot.Delete = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterCreation + err := tierToArchive.AssignProperties_From_DateAfterCreation(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToArchive") + } + shot.TierToArchive = &tierToArchive + } else { + shot.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterCreation + err := tierToCold.AssignProperties_From_DateAfterCreation(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToCold") + } + shot.TierToCold = &tierToCold + } else { + shot.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterCreation + err := tierToCool.AssignProperties_From_DateAfterCreation(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToCool") + } + shot.TierToCool = &tierToCool + } else { + shot.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterCreation + err := tierToHot.AssignProperties_From_DateAfterCreation(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToHot") + } + shot.TierToHot = &tierToHot + } else { + shot.TierToHot = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicySnapShot populates the provided destination ManagementPolicySnapShot from our ManagementPolicySnapShot +func (shot *ManagementPolicySnapShot) AssignProperties_To_ManagementPolicySnapShot(destination *v20230101s.ManagementPolicySnapShot) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Delete + if shot.Delete != nil { + var delete v20230101s.DateAfterCreation + err := shot.Delete.AssignProperties_To_DateAfterCreation(&delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field Delete") + } + destination.Delete = &delete + } else { + destination.Delete = nil + } + + // TierToArchive + if shot.TierToArchive != nil { + var tierToArchive v20230101s.DateAfterCreation + err := shot.TierToArchive.AssignProperties_To_DateAfterCreation(&tierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToArchive") + } + destination.TierToArchive = &tierToArchive + } else { + destination.TierToArchive = nil + } + + // TierToCold + if shot.TierToCold != nil { + var tierToCold v20230101s.DateAfterCreation + err := shot.TierToCold.AssignProperties_To_DateAfterCreation(&tierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToCold") + } + destination.TierToCold = &tierToCold + } else { + destination.TierToCold = nil + } + + // TierToCool + if shot.TierToCool != nil { + var tierToCool v20230101s.DateAfterCreation + err := shot.TierToCool.AssignProperties_To_DateAfterCreation(&tierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToCool") + } + destination.TierToCool = &tierToCool + } else { + destination.TierToCool = nil + } + + // TierToHot + if shot.TierToHot != nil { + var tierToHot v20230101s.DateAfterCreation + err := shot.TierToHot.AssignProperties_To_DateAfterCreation(&tierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToHot") + } + destination.TierToHot = &tierToHot + } else { + destination.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ManagementPolicySnapShot_STATUS populates our ManagementPolicySnapShot from the provided source ManagementPolicySnapShot_STATUS +func (shot *ManagementPolicySnapShot) Initialize_From_ManagementPolicySnapShot_STATUS(source *ManagementPolicySnapShot_STATUS) error { + + // Delete + if source.Delete != nil { + var delete DateAfterCreation + err := delete.Initialize_From_DateAfterCreation_STATUS(source.Delete) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field Delete") + } + shot.Delete = &delete + } else { + shot.Delete = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterCreation + err := tierToArchive.Initialize_From_DateAfterCreation_STATUS(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToArchive") + } + shot.TierToArchive = &tierToArchive + } else { + shot.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterCreation + err := tierToCold.Initialize_From_DateAfterCreation_STATUS(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToCold") + } + shot.TierToCold = &tierToCold + } else { + shot.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterCreation + err := tierToCool.Initialize_From_DateAfterCreation_STATUS(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToCool") + } + shot.TierToCool = &tierToCool + } else { + shot.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterCreation + err := tierToHot.Initialize_From_DateAfterCreation_STATUS(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToHot") + } + shot.TierToHot = &tierToHot + } else { + shot.TierToHot = nil + } + + // No error + return nil +} + +// Management policy action for snapshot. +type ManagementPolicySnapShot_STATUS struct { + // Delete: The function to delete the blob snapshot + Delete *DateAfterCreation_STATUS `json:"delete,omitempty"` + + // TierToArchive: The function to tier blob snapshot to archive storage. + TierToArchive *DateAfterCreation_STATUS `json:"tierToArchive,omitempty"` + + // TierToCold: The function to tier blobs to cold storage. + TierToCold *DateAfterCreation_STATUS `json:"tierToCold,omitempty"` + + // TierToCool: The function to tier blob snapshot to cool storage. + TierToCool *DateAfterCreation_STATUS `json:"tierToCool,omitempty"` + + // TierToHot: The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage + // Accounts + TierToHot *DateAfterCreation_STATUS `json:"tierToHot,omitempty"` +} + +var _ genruntime.FromARMConverter = &ManagementPolicySnapShot_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (shot *ManagementPolicySnapShot_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicySnapShot_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (shot *ManagementPolicySnapShot_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicySnapShot_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicySnapShot_STATUS_ARM, got %T", armInput) + } + + // Set property "Delete": + if typedInput.Delete != nil { + var delete1 DateAfterCreation_STATUS + err := delete1.PopulateFromARM(owner, *typedInput.Delete) + if err != nil { + return err + } + delete := delete1 + shot.Delete = &delete + } + + // Set property "TierToArchive": + if typedInput.TierToArchive != nil { + var tierToArchive1 DateAfterCreation_STATUS + err := tierToArchive1.PopulateFromARM(owner, *typedInput.TierToArchive) + if err != nil { + return err + } + tierToArchive := tierToArchive1 + shot.TierToArchive = &tierToArchive + } + + // Set property "TierToCold": + if typedInput.TierToCold != nil { + var tierToCold1 DateAfterCreation_STATUS + err := tierToCold1.PopulateFromARM(owner, *typedInput.TierToCold) + if err != nil { + return err + } + tierToCold := tierToCold1 + shot.TierToCold = &tierToCold + } + + // Set property "TierToCool": + if typedInput.TierToCool != nil { + var tierToCool1 DateAfterCreation_STATUS + err := tierToCool1.PopulateFromARM(owner, *typedInput.TierToCool) + if err != nil { + return err + } + tierToCool := tierToCool1 + shot.TierToCool = &tierToCool + } + + // Set property "TierToHot": + if typedInput.TierToHot != nil { + var tierToHot1 DateAfterCreation_STATUS + err := tierToHot1.PopulateFromARM(owner, *typedInput.TierToHot) + if err != nil { + return err + } + tierToHot := tierToHot1 + shot.TierToHot = &tierToHot + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicySnapShot_STATUS populates our ManagementPolicySnapShot_STATUS from the provided source ManagementPolicySnapShot_STATUS +func (shot *ManagementPolicySnapShot_STATUS) AssignProperties_From_ManagementPolicySnapShot_STATUS(source *v20230101s.ManagementPolicySnapShot_STATUS) error { + + // Delete + if source.Delete != nil { + var delete DateAfterCreation_STATUS + err := delete.AssignProperties_From_DateAfterCreation_STATUS(source.Delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field Delete") + } + shot.Delete = &delete + } else { + shot.Delete = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterCreation_STATUS + err := tierToArchive.AssignProperties_From_DateAfterCreation_STATUS(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToArchive") + } + shot.TierToArchive = &tierToArchive + } else { + shot.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterCreation_STATUS + err := tierToCold.AssignProperties_From_DateAfterCreation_STATUS(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToCold") + } + shot.TierToCold = &tierToCold + } else { + shot.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterCreation_STATUS + err := tierToCool.AssignProperties_From_DateAfterCreation_STATUS(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToCool") + } + shot.TierToCool = &tierToCool + } else { + shot.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterCreation_STATUS + err := tierToHot.AssignProperties_From_DateAfterCreation_STATUS(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToHot") + } + shot.TierToHot = &tierToHot + } else { + shot.TierToHot = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicySnapShot_STATUS populates the provided destination ManagementPolicySnapShot_STATUS from our ManagementPolicySnapShot_STATUS +func (shot *ManagementPolicySnapShot_STATUS) AssignProperties_To_ManagementPolicySnapShot_STATUS(destination *v20230101s.ManagementPolicySnapShot_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Delete + if shot.Delete != nil { + var delete v20230101s.DateAfterCreation_STATUS + err := shot.Delete.AssignProperties_To_DateAfterCreation_STATUS(&delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field Delete") + } + destination.Delete = &delete + } else { + destination.Delete = nil + } + + // TierToArchive + if shot.TierToArchive != nil { + var tierToArchive v20230101s.DateAfterCreation_STATUS + err := shot.TierToArchive.AssignProperties_To_DateAfterCreation_STATUS(&tierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToArchive") + } + destination.TierToArchive = &tierToArchive + } else { + destination.TierToArchive = nil + } + + // TierToCold + if shot.TierToCold != nil { + var tierToCold v20230101s.DateAfterCreation_STATUS + err := shot.TierToCold.AssignProperties_To_DateAfterCreation_STATUS(&tierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToCold") + } + destination.TierToCold = &tierToCold + } else { + destination.TierToCold = nil + } + + // TierToCool + if shot.TierToCool != nil { + var tierToCool v20230101s.DateAfterCreation_STATUS + err := shot.TierToCool.AssignProperties_To_DateAfterCreation_STATUS(&tierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToCool") + } + destination.TierToCool = &tierToCool + } else { + destination.TierToCool = nil + } + + // TierToHot + if shot.TierToHot != nil { + var tierToHot v20230101s.DateAfterCreation_STATUS + err := shot.TierToHot.AssignProperties_To_DateAfterCreation_STATUS(&tierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToHot") + } + destination.TierToHot = &tierToHot + } else { + destination.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Management policy action for blob version. +type ManagementPolicyVersion struct { + // Delete: The function to delete the blob version + Delete *DateAfterCreation `json:"delete,omitempty"` + + // TierToArchive: The function to tier blob version to archive storage. + TierToArchive *DateAfterCreation `json:"tierToArchive,omitempty"` + + // TierToCold: The function to tier blobs to cold storage. + TierToCold *DateAfterCreation `json:"tierToCold,omitempty"` + + // TierToCool: The function to tier blob version to cool storage. + TierToCool *DateAfterCreation `json:"tierToCool,omitempty"` + + // TierToHot: The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage + // Accounts + TierToHot *DateAfterCreation `json:"tierToHot,omitempty"` +} + +var _ genruntime.ARMTransformer = &ManagementPolicyVersion{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (version *ManagementPolicyVersion) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if version == nil { + return nil, nil + } + result := &ManagementPolicyVersion_ARM{} + + // Set property "Delete": + if version.Delete != nil { + delete_ARM, err := (*version.Delete).ConvertToARM(resolved) + if err != nil { + return nil, err + } + delete := *delete_ARM.(*DateAfterCreation_ARM) + result.Delete = &delete + } + + // Set property "TierToArchive": + if version.TierToArchive != nil { + tierToArchive_ARM, err := (*version.TierToArchive).ConvertToARM(resolved) + if err != nil { + return nil, err + } + tierToArchive := *tierToArchive_ARM.(*DateAfterCreation_ARM) + result.TierToArchive = &tierToArchive + } + + // Set property "TierToCold": + if version.TierToCold != nil { + tierToCold_ARM, err := (*version.TierToCold).ConvertToARM(resolved) + if err != nil { + return nil, err + } + tierToCold := *tierToCold_ARM.(*DateAfterCreation_ARM) + result.TierToCold = &tierToCold + } + + // Set property "TierToCool": + if version.TierToCool != nil { + tierToCool_ARM, err := (*version.TierToCool).ConvertToARM(resolved) + if err != nil { + return nil, err + } + tierToCool := *tierToCool_ARM.(*DateAfterCreation_ARM) + result.TierToCool = &tierToCool + } + + // Set property "TierToHot": + if version.TierToHot != nil { + tierToHot_ARM, err := (*version.TierToHot).ConvertToARM(resolved) + if err != nil { + return nil, err + } + tierToHot := *tierToHot_ARM.(*DateAfterCreation_ARM) + result.TierToHot = &tierToHot + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (version *ManagementPolicyVersion) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicyVersion_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (version *ManagementPolicyVersion) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicyVersion_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicyVersion_ARM, got %T", armInput) + } + + // Set property "Delete": + if typedInput.Delete != nil { + var delete1 DateAfterCreation + err := delete1.PopulateFromARM(owner, *typedInput.Delete) + if err != nil { + return err + } + delete := delete1 + version.Delete = &delete + } + + // Set property "TierToArchive": + if typedInput.TierToArchive != nil { + var tierToArchive1 DateAfterCreation + err := tierToArchive1.PopulateFromARM(owner, *typedInput.TierToArchive) + if err != nil { + return err + } + tierToArchive := tierToArchive1 + version.TierToArchive = &tierToArchive + } + + // Set property "TierToCold": + if typedInput.TierToCold != nil { + var tierToCold1 DateAfterCreation + err := tierToCold1.PopulateFromARM(owner, *typedInput.TierToCold) + if err != nil { + return err + } + tierToCold := tierToCold1 + version.TierToCold = &tierToCold + } + + // Set property "TierToCool": + if typedInput.TierToCool != nil { + var tierToCool1 DateAfterCreation + err := tierToCool1.PopulateFromARM(owner, *typedInput.TierToCool) + if err != nil { + return err + } + tierToCool := tierToCool1 + version.TierToCool = &tierToCool + } + + // Set property "TierToHot": + if typedInput.TierToHot != nil { + var tierToHot1 DateAfterCreation + err := tierToHot1.PopulateFromARM(owner, *typedInput.TierToHot) + if err != nil { + return err + } + tierToHot := tierToHot1 + version.TierToHot = &tierToHot + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicyVersion populates our ManagementPolicyVersion from the provided source ManagementPolicyVersion +func (version *ManagementPolicyVersion) AssignProperties_From_ManagementPolicyVersion(source *v20230101s.ManagementPolicyVersion) error { + + // Delete + if source.Delete != nil { + var delete DateAfterCreation + err := delete.AssignProperties_From_DateAfterCreation(source.Delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field Delete") + } + version.Delete = &delete + } else { + version.Delete = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterCreation + err := tierToArchive.AssignProperties_From_DateAfterCreation(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToArchive") + } + version.TierToArchive = &tierToArchive + } else { + version.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterCreation + err := tierToCold.AssignProperties_From_DateAfterCreation(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToCold") + } + version.TierToCold = &tierToCold + } else { + version.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterCreation + err := tierToCool.AssignProperties_From_DateAfterCreation(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToCool") + } + version.TierToCool = &tierToCool + } else { + version.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterCreation + err := tierToHot.AssignProperties_From_DateAfterCreation(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation() to populate field TierToHot") + } + version.TierToHot = &tierToHot + } else { + version.TierToHot = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyVersion populates the provided destination ManagementPolicyVersion from our ManagementPolicyVersion +func (version *ManagementPolicyVersion) AssignProperties_To_ManagementPolicyVersion(destination *v20230101s.ManagementPolicyVersion) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Delete + if version.Delete != nil { + var delete v20230101s.DateAfterCreation + err := version.Delete.AssignProperties_To_DateAfterCreation(&delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field Delete") + } + destination.Delete = &delete + } else { + destination.Delete = nil + } + + // TierToArchive + if version.TierToArchive != nil { + var tierToArchive v20230101s.DateAfterCreation + err := version.TierToArchive.AssignProperties_To_DateAfterCreation(&tierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToArchive") + } + destination.TierToArchive = &tierToArchive + } else { + destination.TierToArchive = nil + } + + // TierToCold + if version.TierToCold != nil { + var tierToCold v20230101s.DateAfterCreation + err := version.TierToCold.AssignProperties_To_DateAfterCreation(&tierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToCold") + } + destination.TierToCold = &tierToCold + } else { + destination.TierToCold = nil + } + + // TierToCool + if version.TierToCool != nil { + var tierToCool v20230101s.DateAfterCreation + err := version.TierToCool.AssignProperties_To_DateAfterCreation(&tierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToCool") + } + destination.TierToCool = &tierToCool + } else { + destination.TierToCool = nil + } + + // TierToHot + if version.TierToHot != nil { + var tierToHot v20230101s.DateAfterCreation + err := version.TierToHot.AssignProperties_To_DateAfterCreation(&tierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation() to populate field TierToHot") + } + destination.TierToHot = &tierToHot + } else { + destination.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ManagementPolicyVersion_STATUS populates our ManagementPolicyVersion from the provided source ManagementPolicyVersion_STATUS +func (version *ManagementPolicyVersion) Initialize_From_ManagementPolicyVersion_STATUS(source *ManagementPolicyVersion_STATUS) error { + + // Delete + if source.Delete != nil { + var delete DateAfterCreation + err := delete.Initialize_From_DateAfterCreation_STATUS(source.Delete) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field Delete") + } + version.Delete = &delete + } else { + version.Delete = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterCreation + err := tierToArchive.Initialize_From_DateAfterCreation_STATUS(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToArchive") + } + version.TierToArchive = &tierToArchive + } else { + version.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterCreation + err := tierToCold.Initialize_From_DateAfterCreation_STATUS(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToCold") + } + version.TierToCold = &tierToCold + } else { + version.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterCreation + err := tierToCool.Initialize_From_DateAfterCreation_STATUS(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToCool") + } + version.TierToCool = &tierToCool + } else { + version.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterCreation + err := tierToHot.Initialize_From_DateAfterCreation_STATUS(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DateAfterCreation_STATUS() to populate field TierToHot") + } + version.TierToHot = &tierToHot + } else { + version.TierToHot = nil + } + + // No error + return nil +} + +// Management policy action for blob version. +type ManagementPolicyVersion_STATUS struct { + // Delete: The function to delete the blob version + Delete *DateAfterCreation_STATUS `json:"delete,omitempty"` + + // TierToArchive: The function to tier blob version to archive storage. + TierToArchive *DateAfterCreation_STATUS `json:"tierToArchive,omitempty"` + + // TierToCold: The function to tier blobs to cold storage. + TierToCold *DateAfterCreation_STATUS `json:"tierToCold,omitempty"` + + // TierToCool: The function to tier blob version to cool storage. + TierToCool *DateAfterCreation_STATUS `json:"tierToCool,omitempty"` + + // TierToHot: The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage + // Accounts + TierToHot *DateAfterCreation_STATUS `json:"tierToHot,omitempty"` +} + +var _ genruntime.FromARMConverter = &ManagementPolicyVersion_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (version *ManagementPolicyVersion_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagementPolicyVersion_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (version *ManagementPolicyVersion_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagementPolicyVersion_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagementPolicyVersion_STATUS_ARM, got %T", armInput) + } + + // Set property "Delete": + if typedInput.Delete != nil { + var delete1 DateAfterCreation_STATUS + err := delete1.PopulateFromARM(owner, *typedInput.Delete) + if err != nil { + return err + } + delete := delete1 + version.Delete = &delete + } + + // Set property "TierToArchive": + if typedInput.TierToArchive != nil { + var tierToArchive1 DateAfterCreation_STATUS + err := tierToArchive1.PopulateFromARM(owner, *typedInput.TierToArchive) + if err != nil { + return err + } + tierToArchive := tierToArchive1 + version.TierToArchive = &tierToArchive + } + + // Set property "TierToCold": + if typedInput.TierToCold != nil { + var tierToCold1 DateAfterCreation_STATUS + err := tierToCold1.PopulateFromARM(owner, *typedInput.TierToCold) + if err != nil { + return err + } + tierToCold := tierToCold1 + version.TierToCold = &tierToCold + } + + // Set property "TierToCool": + if typedInput.TierToCool != nil { + var tierToCool1 DateAfterCreation_STATUS + err := tierToCool1.PopulateFromARM(owner, *typedInput.TierToCool) + if err != nil { + return err + } + tierToCool := tierToCool1 + version.TierToCool = &tierToCool + } + + // Set property "TierToHot": + if typedInput.TierToHot != nil { + var tierToHot1 DateAfterCreation_STATUS + err := tierToHot1.PopulateFromARM(owner, *typedInput.TierToHot) + if err != nil { + return err + } + tierToHot := tierToHot1 + version.TierToHot = &tierToHot + } + + // No error + return nil +} + +// AssignProperties_From_ManagementPolicyVersion_STATUS populates our ManagementPolicyVersion_STATUS from the provided source ManagementPolicyVersion_STATUS +func (version *ManagementPolicyVersion_STATUS) AssignProperties_From_ManagementPolicyVersion_STATUS(source *v20230101s.ManagementPolicyVersion_STATUS) error { + + // Delete + if source.Delete != nil { + var delete DateAfterCreation_STATUS + err := delete.AssignProperties_From_DateAfterCreation_STATUS(source.Delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field Delete") + } + version.Delete = &delete + } else { + version.Delete = nil + } + + // TierToArchive + if source.TierToArchive != nil { + var tierToArchive DateAfterCreation_STATUS + err := tierToArchive.AssignProperties_From_DateAfterCreation_STATUS(source.TierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToArchive") + } + version.TierToArchive = &tierToArchive + } else { + version.TierToArchive = nil + } + + // TierToCold + if source.TierToCold != nil { + var tierToCold DateAfterCreation_STATUS + err := tierToCold.AssignProperties_From_DateAfterCreation_STATUS(source.TierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToCold") + } + version.TierToCold = &tierToCold + } else { + version.TierToCold = nil + } + + // TierToCool + if source.TierToCool != nil { + var tierToCool DateAfterCreation_STATUS + err := tierToCool.AssignProperties_From_DateAfterCreation_STATUS(source.TierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToCool") + } + version.TierToCool = &tierToCool + } else { + version.TierToCool = nil + } + + // TierToHot + if source.TierToHot != nil { + var tierToHot DateAfterCreation_STATUS + err := tierToHot.AssignProperties_From_DateAfterCreation_STATUS(source.TierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DateAfterCreation_STATUS() to populate field TierToHot") + } + version.TierToHot = &tierToHot + } else { + version.TierToHot = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagementPolicyVersion_STATUS populates the provided destination ManagementPolicyVersion_STATUS from our ManagementPolicyVersion_STATUS +func (version *ManagementPolicyVersion_STATUS) AssignProperties_To_ManagementPolicyVersion_STATUS(destination *v20230101s.ManagementPolicyVersion_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Delete + if version.Delete != nil { + var delete v20230101s.DateAfterCreation_STATUS + err := version.Delete.AssignProperties_To_DateAfterCreation_STATUS(&delete) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field Delete") + } + destination.Delete = &delete + } else { + destination.Delete = nil + } + + // TierToArchive + if version.TierToArchive != nil { + var tierToArchive v20230101s.DateAfterCreation_STATUS + err := version.TierToArchive.AssignProperties_To_DateAfterCreation_STATUS(&tierToArchive) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToArchive") + } + destination.TierToArchive = &tierToArchive + } else { + destination.TierToArchive = nil + } + + // TierToCold + if version.TierToCold != nil { + var tierToCold v20230101s.DateAfterCreation_STATUS + err := version.TierToCold.AssignProperties_To_DateAfterCreation_STATUS(&tierToCold) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToCold") + } + destination.TierToCold = &tierToCold + } else { + destination.TierToCold = nil + } + + // TierToCool + if version.TierToCool != nil { + var tierToCool v20230101s.DateAfterCreation_STATUS + err := version.TierToCool.AssignProperties_To_DateAfterCreation_STATUS(&tierToCool) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToCool") + } + destination.TierToCool = &tierToCool + } else { + destination.TierToCool = nil + } + + // TierToHot + if version.TierToHot != nil { + var tierToHot v20230101s.DateAfterCreation_STATUS + err := version.TierToHot.AssignProperties_To_DateAfterCreation_STATUS(&tierToHot) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DateAfterCreation_STATUS() to populate field TierToHot") + } + destination.TierToHot = &tierToHot + } else { + destination.TierToHot = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Blob index tag based filtering for blob objects +type TagFilter struct { + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=128 + // +kubebuilder:validation:MinLength=1 + // Name: This is the filter tag name, it can have 1 - 128 characters + Name *string `json:"name,omitempty"` + + // +kubebuilder:validation:Required + // Op: This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is + // currently supported + Op *string `json:"op,omitempty"` + + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=256 + // +kubebuilder:validation:MinLength=0 + // Value: This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters + Value *string `json:"value,omitempty"` +} + +var _ genruntime.ARMTransformer = &TagFilter{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (filter *TagFilter) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if filter == nil { + return nil, nil + } + result := &TagFilter_ARM{} + + // Set property "Name": + if filter.Name != nil { + name := *filter.Name + result.Name = &name + } + + // Set property "Op": + if filter.Op != nil { + op := *filter.Op + result.Op = &op + } + + // Set property "Value": + if filter.Value != nil { + value := *filter.Value + result.Value = &value + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (filter *TagFilter) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &TagFilter_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (filter *TagFilter) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(TagFilter_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected TagFilter_ARM, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + filter.Name = &name + } + + // Set property "Op": + if typedInput.Op != nil { + op := *typedInput.Op + filter.Op = &op + } + + // Set property "Value": + if typedInput.Value != nil { + value := *typedInput.Value + filter.Value = &value + } + + // No error + return nil +} + +// AssignProperties_From_TagFilter populates our TagFilter from the provided source TagFilter +func (filter *TagFilter) AssignProperties_From_TagFilter(source *v20230101s.TagFilter) error { + + // Name + if source.Name != nil { + name := *source.Name + filter.Name = &name + } else { + filter.Name = nil + } + + // Op + filter.Op = genruntime.ClonePointerToString(source.Op) + + // Value + if source.Value != nil { + value := *source.Value + filter.Value = &value + } else { + filter.Value = nil + } + + // No error + return nil +} + +// AssignProperties_To_TagFilter populates the provided destination TagFilter from our TagFilter +func (filter *TagFilter) AssignProperties_To_TagFilter(destination *v20230101s.TagFilter) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + if filter.Name != nil { + name := *filter.Name + destination.Name = &name + } else { + destination.Name = nil + } + + // Op + destination.Op = genruntime.ClonePointerToString(filter.Op) + + // Value + if filter.Value != nil { + value := *filter.Value + destination.Value = &value + } else { + destination.Value = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_TagFilter_STATUS populates our TagFilter from the provided source TagFilter_STATUS +func (filter *TagFilter) Initialize_From_TagFilter_STATUS(source *TagFilter_STATUS) error { + + // Name + if source.Name != nil { + name := *source.Name + filter.Name = &name + } else { + filter.Name = nil + } + + // Op + filter.Op = genruntime.ClonePointerToString(source.Op) + + // Value + if source.Value != nil { + value := *source.Value + filter.Value = &value + } else { + filter.Value = nil + } + + // No error + return nil +} + +// Blob index tag based filtering for blob objects +type TagFilter_STATUS struct { + // Name: This is the filter tag name, it can have 1 - 128 characters + Name *string `json:"name,omitempty"` + + // Op: This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is + // currently supported + Op *string `json:"op,omitempty"` + + // Value: This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters + Value *string `json:"value,omitempty"` +} + +var _ genruntime.FromARMConverter = &TagFilter_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (filter *TagFilter_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &TagFilter_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (filter *TagFilter_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(TagFilter_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected TagFilter_STATUS_ARM, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + filter.Name = &name + } + + // Set property "Op": + if typedInput.Op != nil { + op := *typedInput.Op + filter.Op = &op + } + + // Set property "Value": + if typedInput.Value != nil { + value := *typedInput.Value + filter.Value = &value + } + + // No error + return nil +} + +// AssignProperties_From_TagFilter_STATUS populates our TagFilter_STATUS from the provided source TagFilter_STATUS +func (filter *TagFilter_STATUS) AssignProperties_From_TagFilter_STATUS(source *v20230101s.TagFilter_STATUS) error { + + // Name + filter.Name = genruntime.ClonePointerToString(source.Name) + + // Op + filter.Op = genruntime.ClonePointerToString(source.Op) + + // Value + filter.Value = genruntime.ClonePointerToString(source.Value) + + // No error + return nil +} + +// AssignProperties_To_TagFilter_STATUS populates the provided destination TagFilter_STATUS from our TagFilter_STATUS +func (filter *TagFilter_STATUS) AssignProperties_To_TagFilter_STATUS(destination *v20230101s.TagFilter_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + destination.Name = genruntime.ClonePointerToString(filter.Name) + + // Op + destination.Op = genruntime.ClonePointerToString(filter.Op) + + // Value + destination.Value = genruntime.ClonePointerToString(filter.Value) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Object to define snapshot and version action conditions. +type DateAfterCreation struct { + // +kubebuilder:validation:Required + // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:MultipleOf=1 + // DaysAfterCreationGreaterThan: Value indicating the age in days after creation + DaysAfterCreationGreaterThan *int `json:"daysAfterCreationGreaterThan,omitempty"` + + // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:MultipleOf=1 + // DaysAfterLastTierChangeGreaterThan: Value indicating the age in days after last blob tier change time. This property is + // only applicable for tierToArchive actions and requires daysAfterCreationGreaterThan to be set for snapshots and blob + // version based actions. The blob will be archived if both the conditions are satisfied. + DaysAfterLastTierChangeGreaterThan *int `json:"daysAfterLastTierChangeGreaterThan,omitempty"` +} + +var _ genruntime.ARMTransformer = &DateAfterCreation{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (creation *DateAfterCreation) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if creation == nil { + return nil, nil + } + result := &DateAfterCreation_ARM{} + + // Set property "DaysAfterCreationGreaterThan": + if creation.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *creation.DaysAfterCreationGreaterThan + result.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } + + // Set property "DaysAfterLastTierChangeGreaterThan": + if creation.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *creation.DaysAfterLastTierChangeGreaterThan + result.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (creation *DateAfterCreation) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &DateAfterCreation_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (creation *DateAfterCreation) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(DateAfterCreation_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected DateAfterCreation_ARM, got %T", armInput) + } + + // Set property "DaysAfterCreationGreaterThan": + if typedInput.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *typedInput.DaysAfterCreationGreaterThan + creation.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } + + // Set property "DaysAfterLastTierChangeGreaterThan": + if typedInput.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *typedInput.DaysAfterLastTierChangeGreaterThan + creation.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } + + // No error + return nil +} + +// AssignProperties_From_DateAfterCreation populates our DateAfterCreation from the provided source DateAfterCreation +func (creation *DateAfterCreation) AssignProperties_From_DateAfterCreation(source *v20230101s.DateAfterCreation) error { + + // DaysAfterCreationGreaterThan + if source.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *source.DaysAfterCreationGreaterThan + creation.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + creation.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if source.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *source.DaysAfterLastTierChangeGreaterThan + creation.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + creation.DaysAfterLastTierChangeGreaterThan = nil + } + + // No error + return nil +} + +// AssignProperties_To_DateAfterCreation populates the provided destination DateAfterCreation from our DateAfterCreation +func (creation *DateAfterCreation) AssignProperties_To_DateAfterCreation(destination *v20230101s.DateAfterCreation) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // DaysAfterCreationGreaterThan + if creation.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *creation.DaysAfterCreationGreaterThan + destination.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + destination.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if creation.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *creation.DaysAfterLastTierChangeGreaterThan + destination.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + destination.DaysAfterLastTierChangeGreaterThan = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_DateAfterCreation_STATUS populates our DateAfterCreation from the provided source DateAfterCreation_STATUS +func (creation *DateAfterCreation) Initialize_From_DateAfterCreation_STATUS(source *DateAfterCreation_STATUS) error { + + // DaysAfterCreationGreaterThan + if source.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := genruntime.GetIntFromFloat(*source.DaysAfterCreationGreaterThan) + creation.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + creation.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if source.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := genruntime.GetIntFromFloat(*source.DaysAfterLastTierChangeGreaterThan) + creation.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + creation.DaysAfterLastTierChangeGreaterThan = nil + } + + // No error + return nil +} + +// Object to define snapshot and version action conditions. +type DateAfterCreation_STATUS struct { + // DaysAfterCreationGreaterThan: Value indicating the age in days after creation + DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` + + // DaysAfterLastTierChangeGreaterThan: Value indicating the age in days after last blob tier change time. This property is + // only applicable for tierToArchive actions and requires daysAfterCreationGreaterThan to be set for snapshots and blob + // version based actions. The blob will be archived if both the conditions are satisfied. + DaysAfterLastTierChangeGreaterThan *float64 `json:"daysAfterLastTierChangeGreaterThan,omitempty"` +} + +var _ genruntime.FromARMConverter = &DateAfterCreation_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (creation *DateAfterCreation_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &DateAfterCreation_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (creation *DateAfterCreation_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(DateAfterCreation_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected DateAfterCreation_STATUS_ARM, got %T", armInput) + } + + // Set property "DaysAfterCreationGreaterThan": + if typedInput.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *typedInput.DaysAfterCreationGreaterThan + creation.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } + + // Set property "DaysAfterLastTierChangeGreaterThan": + if typedInput.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *typedInput.DaysAfterLastTierChangeGreaterThan + creation.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } + + // No error + return nil +} + +// AssignProperties_From_DateAfterCreation_STATUS populates our DateAfterCreation_STATUS from the provided source DateAfterCreation_STATUS +func (creation *DateAfterCreation_STATUS) AssignProperties_From_DateAfterCreation_STATUS(source *v20230101s.DateAfterCreation_STATUS) error { + + // DaysAfterCreationGreaterThan + if source.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *source.DaysAfterCreationGreaterThan + creation.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + creation.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if source.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *source.DaysAfterLastTierChangeGreaterThan + creation.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + creation.DaysAfterLastTierChangeGreaterThan = nil + } + + // No error + return nil +} + +// AssignProperties_To_DateAfterCreation_STATUS populates the provided destination DateAfterCreation_STATUS from our DateAfterCreation_STATUS +func (creation *DateAfterCreation_STATUS) AssignProperties_To_DateAfterCreation_STATUS(destination *v20230101s.DateAfterCreation_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // DaysAfterCreationGreaterThan + if creation.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *creation.DaysAfterCreationGreaterThan + destination.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + destination.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if creation.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *creation.DaysAfterLastTierChangeGreaterThan + destination.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + destination.DaysAfterLastTierChangeGreaterThan = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, +// daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The +// daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires +// daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with +// daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan. +type DateAfterModification struct { + // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:MultipleOf=1 + // DaysAfterCreationGreaterThan: Value indicating the age in days after blob creation. + DaysAfterCreationGreaterThan *int `json:"daysAfterCreationGreaterThan,omitempty"` + + // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:MultipleOf=1 + // DaysAfterLastAccessTimeGreaterThan: Value indicating the age in days after last blob access. This property can only be + // used in conjunction with last access time tracking policy + DaysAfterLastAccessTimeGreaterThan *int `json:"daysAfterLastAccessTimeGreaterThan,omitempty"` + + // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:MultipleOf=1 + // DaysAfterLastTierChangeGreaterThan: Value indicating the age in days after last blob tier change time. This property is + // only applicable for tierToArchive actions and requires daysAfterModificationGreaterThan to be set for baseBlobs based + // actions. The blob will be archived if both the conditions are satisfied. + DaysAfterLastTierChangeGreaterThan *int `json:"daysAfterLastTierChangeGreaterThan,omitempty"` + + // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:MultipleOf=1 + // DaysAfterModificationGreaterThan: Value indicating the age in days after last modification + DaysAfterModificationGreaterThan *int `json:"daysAfterModificationGreaterThan,omitempty"` +} + +var _ genruntime.ARMTransformer = &DateAfterModification{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (modification *DateAfterModification) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if modification == nil { + return nil, nil + } + result := &DateAfterModification_ARM{} + + // Set property "DaysAfterCreationGreaterThan": + if modification.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *modification.DaysAfterCreationGreaterThan + result.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } + + // Set property "DaysAfterLastAccessTimeGreaterThan": + if modification.DaysAfterLastAccessTimeGreaterThan != nil { + daysAfterLastAccessTimeGreaterThan := *modification.DaysAfterLastAccessTimeGreaterThan + result.DaysAfterLastAccessTimeGreaterThan = &daysAfterLastAccessTimeGreaterThan + } + + // Set property "DaysAfterLastTierChangeGreaterThan": + if modification.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *modification.DaysAfterLastTierChangeGreaterThan + result.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } + + // Set property "DaysAfterModificationGreaterThan": + if modification.DaysAfterModificationGreaterThan != nil { + daysAfterModificationGreaterThan := *modification.DaysAfterModificationGreaterThan + result.DaysAfterModificationGreaterThan = &daysAfterModificationGreaterThan + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (modification *DateAfterModification) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &DateAfterModification_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (modification *DateAfterModification) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(DateAfterModification_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected DateAfterModification_ARM, got %T", armInput) + } + + // Set property "DaysAfterCreationGreaterThan": + if typedInput.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *typedInput.DaysAfterCreationGreaterThan + modification.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } + + // Set property "DaysAfterLastAccessTimeGreaterThan": + if typedInput.DaysAfterLastAccessTimeGreaterThan != nil { + daysAfterLastAccessTimeGreaterThan := *typedInput.DaysAfterLastAccessTimeGreaterThan + modification.DaysAfterLastAccessTimeGreaterThan = &daysAfterLastAccessTimeGreaterThan + } + + // Set property "DaysAfterLastTierChangeGreaterThan": + if typedInput.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *typedInput.DaysAfterLastTierChangeGreaterThan + modification.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } + + // Set property "DaysAfterModificationGreaterThan": + if typedInput.DaysAfterModificationGreaterThan != nil { + daysAfterModificationGreaterThan := *typedInput.DaysAfterModificationGreaterThan + modification.DaysAfterModificationGreaterThan = &daysAfterModificationGreaterThan + } + + // No error + return nil +} + +// AssignProperties_From_DateAfterModification populates our DateAfterModification from the provided source DateAfterModification +func (modification *DateAfterModification) AssignProperties_From_DateAfterModification(source *v20230101s.DateAfterModification) error { + + // DaysAfterCreationGreaterThan + if source.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *source.DaysAfterCreationGreaterThan + modification.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + modification.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastAccessTimeGreaterThan + if source.DaysAfterLastAccessTimeGreaterThan != nil { + daysAfterLastAccessTimeGreaterThan := *source.DaysAfterLastAccessTimeGreaterThan + modification.DaysAfterLastAccessTimeGreaterThan = &daysAfterLastAccessTimeGreaterThan + } else { + modification.DaysAfterLastAccessTimeGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if source.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *source.DaysAfterLastTierChangeGreaterThan + modification.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + modification.DaysAfterLastTierChangeGreaterThan = nil + } + + // DaysAfterModificationGreaterThan + if source.DaysAfterModificationGreaterThan != nil { + daysAfterModificationGreaterThan := *source.DaysAfterModificationGreaterThan + modification.DaysAfterModificationGreaterThan = &daysAfterModificationGreaterThan + } else { + modification.DaysAfterModificationGreaterThan = nil + } + + // No error + return nil +} + +// AssignProperties_To_DateAfterModification populates the provided destination DateAfterModification from our DateAfterModification +func (modification *DateAfterModification) AssignProperties_To_DateAfterModification(destination *v20230101s.DateAfterModification) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // DaysAfterCreationGreaterThan + if modification.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *modification.DaysAfterCreationGreaterThan + destination.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + destination.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastAccessTimeGreaterThan + if modification.DaysAfterLastAccessTimeGreaterThan != nil { + daysAfterLastAccessTimeGreaterThan := *modification.DaysAfterLastAccessTimeGreaterThan + destination.DaysAfterLastAccessTimeGreaterThan = &daysAfterLastAccessTimeGreaterThan + } else { + destination.DaysAfterLastAccessTimeGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if modification.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *modification.DaysAfterLastTierChangeGreaterThan + destination.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + destination.DaysAfterLastTierChangeGreaterThan = nil + } + + // DaysAfterModificationGreaterThan + if modification.DaysAfterModificationGreaterThan != nil { + daysAfterModificationGreaterThan := *modification.DaysAfterModificationGreaterThan + destination.DaysAfterModificationGreaterThan = &daysAfterModificationGreaterThan + } else { + destination.DaysAfterModificationGreaterThan = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_DateAfterModification_STATUS populates our DateAfterModification from the provided source DateAfterModification_STATUS +func (modification *DateAfterModification) Initialize_From_DateAfterModification_STATUS(source *DateAfterModification_STATUS) error { + + // DaysAfterCreationGreaterThan + if source.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := genruntime.GetIntFromFloat(*source.DaysAfterCreationGreaterThan) + modification.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + modification.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastAccessTimeGreaterThan + if source.DaysAfterLastAccessTimeGreaterThan != nil { + daysAfterLastAccessTimeGreaterThan := genruntime.GetIntFromFloat(*source.DaysAfterLastAccessTimeGreaterThan) + modification.DaysAfterLastAccessTimeGreaterThan = &daysAfterLastAccessTimeGreaterThan + } else { + modification.DaysAfterLastAccessTimeGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if source.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := genruntime.GetIntFromFloat(*source.DaysAfterLastTierChangeGreaterThan) + modification.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + modification.DaysAfterLastTierChangeGreaterThan = nil + } + + // DaysAfterModificationGreaterThan + if source.DaysAfterModificationGreaterThan != nil { + daysAfterModificationGreaterThan := genruntime.GetIntFromFloat(*source.DaysAfterModificationGreaterThan) + modification.DaysAfterModificationGreaterThan = &daysAfterModificationGreaterThan + } else { + modification.DaysAfterModificationGreaterThan = nil + } + + // No error + return nil +} + +// Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, +// daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The +// daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires +// daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with +// daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan. +type DateAfterModification_STATUS struct { + // DaysAfterCreationGreaterThan: Value indicating the age in days after blob creation. + DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` + + // DaysAfterLastAccessTimeGreaterThan: Value indicating the age in days after last blob access. This property can only be + // used in conjunction with last access time tracking policy + DaysAfterLastAccessTimeGreaterThan *float64 `json:"daysAfterLastAccessTimeGreaterThan,omitempty"` + + // DaysAfterLastTierChangeGreaterThan: Value indicating the age in days after last blob tier change time. This property is + // only applicable for tierToArchive actions and requires daysAfterModificationGreaterThan to be set for baseBlobs based + // actions. The blob will be archived if both the conditions are satisfied. + DaysAfterLastTierChangeGreaterThan *float64 `json:"daysAfterLastTierChangeGreaterThan,omitempty"` + + // DaysAfterModificationGreaterThan: Value indicating the age in days after last modification + DaysAfterModificationGreaterThan *float64 `json:"daysAfterModificationGreaterThan,omitempty"` +} + +var _ genruntime.FromARMConverter = &DateAfterModification_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (modification *DateAfterModification_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &DateAfterModification_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (modification *DateAfterModification_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(DateAfterModification_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected DateAfterModification_STATUS_ARM, got %T", armInput) + } + + // Set property "DaysAfterCreationGreaterThan": + if typedInput.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *typedInput.DaysAfterCreationGreaterThan + modification.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } + + // Set property "DaysAfterLastAccessTimeGreaterThan": + if typedInput.DaysAfterLastAccessTimeGreaterThan != nil { + daysAfterLastAccessTimeGreaterThan := *typedInput.DaysAfterLastAccessTimeGreaterThan + modification.DaysAfterLastAccessTimeGreaterThan = &daysAfterLastAccessTimeGreaterThan + } + + // Set property "DaysAfterLastTierChangeGreaterThan": + if typedInput.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *typedInput.DaysAfterLastTierChangeGreaterThan + modification.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } + + // Set property "DaysAfterModificationGreaterThan": + if typedInput.DaysAfterModificationGreaterThan != nil { + daysAfterModificationGreaterThan := *typedInput.DaysAfterModificationGreaterThan + modification.DaysAfterModificationGreaterThan = &daysAfterModificationGreaterThan + } + + // No error + return nil +} + +// AssignProperties_From_DateAfterModification_STATUS populates our DateAfterModification_STATUS from the provided source DateAfterModification_STATUS +func (modification *DateAfterModification_STATUS) AssignProperties_From_DateAfterModification_STATUS(source *v20230101s.DateAfterModification_STATUS) error { + + // DaysAfterCreationGreaterThan + if source.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *source.DaysAfterCreationGreaterThan + modification.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + modification.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastAccessTimeGreaterThan + if source.DaysAfterLastAccessTimeGreaterThan != nil { + daysAfterLastAccessTimeGreaterThan := *source.DaysAfterLastAccessTimeGreaterThan + modification.DaysAfterLastAccessTimeGreaterThan = &daysAfterLastAccessTimeGreaterThan + } else { + modification.DaysAfterLastAccessTimeGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if source.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *source.DaysAfterLastTierChangeGreaterThan + modification.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + modification.DaysAfterLastTierChangeGreaterThan = nil + } + + // DaysAfterModificationGreaterThan + if source.DaysAfterModificationGreaterThan != nil { + daysAfterModificationGreaterThan := *source.DaysAfterModificationGreaterThan + modification.DaysAfterModificationGreaterThan = &daysAfterModificationGreaterThan + } else { + modification.DaysAfterModificationGreaterThan = nil + } + + // No error + return nil +} + +// AssignProperties_To_DateAfterModification_STATUS populates the provided destination DateAfterModification_STATUS from our DateAfterModification_STATUS +func (modification *DateAfterModification_STATUS) AssignProperties_To_DateAfterModification_STATUS(destination *v20230101s.DateAfterModification_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // DaysAfterCreationGreaterThan + if modification.DaysAfterCreationGreaterThan != nil { + daysAfterCreationGreaterThan := *modification.DaysAfterCreationGreaterThan + destination.DaysAfterCreationGreaterThan = &daysAfterCreationGreaterThan + } else { + destination.DaysAfterCreationGreaterThan = nil + } + + // DaysAfterLastAccessTimeGreaterThan + if modification.DaysAfterLastAccessTimeGreaterThan != nil { + daysAfterLastAccessTimeGreaterThan := *modification.DaysAfterLastAccessTimeGreaterThan + destination.DaysAfterLastAccessTimeGreaterThan = &daysAfterLastAccessTimeGreaterThan + } else { + destination.DaysAfterLastAccessTimeGreaterThan = nil + } + + // DaysAfterLastTierChangeGreaterThan + if modification.DaysAfterLastTierChangeGreaterThan != nil { + daysAfterLastTierChangeGreaterThan := *modification.DaysAfterLastTierChangeGreaterThan + destination.DaysAfterLastTierChangeGreaterThan = &daysAfterLastTierChangeGreaterThan + } else { + destination.DaysAfterLastTierChangeGreaterThan = nil + } + + // DaysAfterModificationGreaterThan + if modification.DaysAfterModificationGreaterThan != nil { + daysAfterModificationGreaterThan := *modification.DaysAfterModificationGreaterThan + destination.DaysAfterModificationGreaterThan = &daysAfterModificationGreaterThan + } else { + destination.DaysAfterModificationGreaterThan = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&StorageAccountsManagementPolicy{}, &StorageAccountsManagementPolicyList{}) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_management_policy_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_management_policy_types_gen_test.go new file mode 100644 index 00000000000..6dd45607bcd --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_management_policy_types_gen_test.go @@ -0,0 +1,2784 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsManagementPolicy_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsManagementPolicy to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsManagementPolicy, StorageAccountsManagementPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsManagementPolicy tests if a specific instance of StorageAccountsManagementPolicy round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsManagementPolicy(subject StorageAccountsManagementPolicy) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsManagementPolicy + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsManagementPolicy + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsManagementPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsManagementPolicy to StorageAccountsManagementPolicy via AssignProperties_To_StorageAccountsManagementPolicy & AssignProperties_From_StorageAccountsManagementPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsManagementPolicy, StorageAccountsManagementPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsManagementPolicy tests if a specific instance of StorageAccountsManagementPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsManagementPolicy(subject StorageAccountsManagementPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsManagementPolicy + err := copied.AssignProperties_To_StorageAccountsManagementPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsManagementPolicy + err = actual.AssignProperties_From_StorageAccountsManagementPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsManagementPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsManagementPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsManagementPolicy, StorageAccountsManagementPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsManagementPolicy runs a test to see if a specific instance of StorageAccountsManagementPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsManagementPolicy(subject StorageAccountsManagementPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsManagementPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsManagementPolicy instances for property testing - lazily instantiated by +// StorageAccountsManagementPolicyGenerator() +var storageAccountsManagementPolicyGenerator gopter.Gen + +// StorageAccountsManagementPolicyGenerator returns a generator of StorageAccountsManagementPolicy instances for property testing. +func StorageAccountsManagementPolicyGenerator() gopter.Gen { + if storageAccountsManagementPolicyGenerator != nil { + return storageAccountsManagementPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsManagementPolicy(generators) + storageAccountsManagementPolicyGenerator = gen.Struct(reflect.TypeOf(StorageAccountsManagementPolicy{}), generators) + + return storageAccountsManagementPolicyGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsManagementPolicy is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsManagementPolicy(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_ManagementPolicy_SpecGenerator() + gens["Status"] = StorageAccounts_ManagementPolicy_STATUSGenerator() +} + +func Test_StorageAccounts_ManagementPolicy_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_ManagementPolicy_Spec to StorageAccounts_ManagementPolicy_Spec via AssignProperties_To_StorageAccounts_ManagementPolicy_Spec & AssignProperties_From_StorageAccounts_ManagementPolicy_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_ManagementPolicy_Spec, StorageAccounts_ManagementPolicy_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_ManagementPolicy_Spec tests if a specific instance of StorageAccounts_ManagementPolicy_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_ManagementPolicy_Spec(subject StorageAccounts_ManagementPolicy_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_ManagementPolicy_Spec + err := copied.AssignProperties_To_StorageAccounts_ManagementPolicy_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_ManagementPolicy_Spec + err = actual.AssignProperties_From_StorageAccounts_ManagementPolicy_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_ManagementPolicy_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_ManagementPolicy_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_ManagementPolicy_Spec, StorageAccounts_ManagementPolicy_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_ManagementPolicy_Spec runs a test to see if a specific instance of StorageAccounts_ManagementPolicy_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_ManagementPolicy_Spec(subject StorageAccounts_ManagementPolicy_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_ManagementPolicy_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_ManagementPolicy_Spec instances for property testing - lazily instantiated by +// StorageAccounts_ManagementPolicy_SpecGenerator() +var storageAccounts_ManagementPolicy_SpecGenerator gopter.Gen + +// StorageAccounts_ManagementPolicy_SpecGenerator returns a generator of StorageAccounts_ManagementPolicy_Spec instances for property testing. +func StorageAccounts_ManagementPolicy_SpecGenerator() gopter.Gen { + if storageAccounts_ManagementPolicy_SpecGenerator != nil { + return storageAccounts_ManagementPolicy_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec(generators) + storageAccounts_ManagementPolicy_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_ManagementPolicy_Spec{}), generators) + + return storageAccounts_ManagementPolicy_SpecGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_Spec(gens map[string]gopter.Gen) { + gens["Policy"] = gen.PtrOf(ManagementPolicySchemaGenerator()) +} + +func Test_StorageAccounts_ManagementPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_ManagementPolicy_STATUS to StorageAccounts_ManagementPolicy_STATUS via AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS & AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_ManagementPolicy_STATUS, StorageAccounts_ManagementPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_ManagementPolicy_STATUS tests if a specific instance of StorageAccounts_ManagementPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_ManagementPolicy_STATUS(subject StorageAccounts_ManagementPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_ManagementPolicy_STATUS + err := copied.AssignProperties_To_StorageAccounts_ManagementPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_ManagementPolicy_STATUS + err = actual.AssignProperties_From_StorageAccounts_ManagementPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_ManagementPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_ManagementPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_ManagementPolicy_STATUS, StorageAccounts_ManagementPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_ManagementPolicy_STATUS runs a test to see if a specific instance of StorageAccounts_ManagementPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_ManagementPolicy_STATUS(subject StorageAccounts_ManagementPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_ManagementPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_ManagementPolicy_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_ManagementPolicy_STATUSGenerator() +var storageAccounts_ManagementPolicy_STATUSGenerator gopter.Gen + +// StorageAccounts_ManagementPolicy_STATUSGenerator returns a generator of StorageAccounts_ManagementPolicy_STATUS instances for property testing. +// We first initialize storageAccounts_ManagementPolicy_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_ManagementPolicy_STATUSGenerator() gopter.Gen { + if storageAccounts_ManagementPolicy_STATUSGenerator != nil { + return storageAccounts_ManagementPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS(generators) + storageAccounts_ManagementPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_ManagementPolicy_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS(generators) + storageAccounts_ManagementPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_ManagementPolicy_STATUS{}), generators) + + return storageAccounts_ManagementPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedTime"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_ManagementPolicy_STATUS(gens map[string]gopter.Gen) { + gens["Policy"] = gen.PtrOf(ManagementPolicySchema_STATUSGenerator()) +} + +func Test_ManagementPolicySchema_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicySchema to ManagementPolicySchema via AssignProperties_To_ManagementPolicySchema & AssignProperties_From_ManagementPolicySchema returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicySchema, ManagementPolicySchemaGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicySchema tests if a specific instance of ManagementPolicySchema can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicySchema(subject ManagementPolicySchema) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicySchema + err := copied.AssignProperties_To_ManagementPolicySchema(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicySchema + err = actual.AssignProperties_From_ManagementPolicySchema(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicySchema_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicySchema via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicySchema, ManagementPolicySchemaGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicySchema runs a test to see if a specific instance of ManagementPolicySchema round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicySchema(subject ManagementPolicySchema) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicySchema + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicySchema instances for property testing - lazily instantiated by +// ManagementPolicySchemaGenerator() +var managementPolicySchemaGenerator gopter.Gen + +// ManagementPolicySchemaGenerator returns a generator of ManagementPolicySchema instances for property testing. +func ManagementPolicySchemaGenerator() gopter.Gen { + if managementPolicySchemaGenerator != nil { + return managementPolicySchemaGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicySchema(generators) + managementPolicySchemaGenerator = gen.Struct(reflect.TypeOf(ManagementPolicySchema{}), generators) + + return managementPolicySchemaGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicySchema is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicySchema(gens map[string]gopter.Gen) { + gens["Rules"] = gen.SliceOf(ManagementPolicyRuleGenerator()) +} + +func Test_ManagementPolicySchema_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicySchema_STATUS to ManagementPolicySchema_STATUS via AssignProperties_To_ManagementPolicySchema_STATUS & AssignProperties_From_ManagementPolicySchema_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicySchema_STATUS, ManagementPolicySchema_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicySchema_STATUS tests if a specific instance of ManagementPolicySchema_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicySchema_STATUS(subject ManagementPolicySchema_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicySchema_STATUS + err := copied.AssignProperties_To_ManagementPolicySchema_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicySchema_STATUS + err = actual.AssignProperties_From_ManagementPolicySchema_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicySchema_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicySchema_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicySchema_STATUS, ManagementPolicySchema_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicySchema_STATUS runs a test to see if a specific instance of ManagementPolicySchema_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicySchema_STATUS(subject ManagementPolicySchema_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicySchema_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicySchema_STATUS instances for property testing - lazily instantiated by +// ManagementPolicySchema_STATUSGenerator() +var managementPolicySchema_STATUSGenerator gopter.Gen + +// ManagementPolicySchema_STATUSGenerator returns a generator of ManagementPolicySchema_STATUS instances for property testing. +func ManagementPolicySchema_STATUSGenerator() gopter.Gen { + if managementPolicySchema_STATUSGenerator != nil { + return managementPolicySchema_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicySchema_STATUS(generators) + managementPolicySchema_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicySchema_STATUS{}), generators) + + return managementPolicySchema_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicySchema_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicySchema_STATUS(gens map[string]gopter.Gen) { + gens["Rules"] = gen.SliceOf(ManagementPolicyRule_STATUSGenerator()) +} + +func Test_ManagementPolicyRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyRule to ManagementPolicyRule via AssignProperties_To_ManagementPolicyRule & AssignProperties_From_ManagementPolicyRule returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyRule, ManagementPolicyRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyRule tests if a specific instance of ManagementPolicyRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyRule(subject ManagementPolicyRule) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyRule + err := copied.AssignProperties_To_ManagementPolicyRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyRule + err = actual.AssignProperties_From_ManagementPolicyRule(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicyRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyRule, ManagementPolicyRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyRule runs a test to see if a specific instance of ManagementPolicyRule round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyRule(subject ManagementPolicyRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyRule instances for property testing - lazily instantiated by +// ManagementPolicyRuleGenerator() +var managementPolicyRuleGenerator gopter.Gen + +// ManagementPolicyRuleGenerator returns a generator of ManagementPolicyRule instances for property testing. +// We first initialize managementPolicyRuleGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyRuleGenerator() gopter.Gen { + if managementPolicyRuleGenerator != nil { + return managementPolicyRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyRule(generators) + managementPolicyRuleGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyRule(generators) + AddRelatedPropertyGeneratorsForManagementPolicyRule(generators) + managementPolicyRuleGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule{}), generators) + + return managementPolicyRuleGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyRule(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf(ManagementPolicyRule_Type_Lifecycle)) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyRule is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyRule(gens map[string]gopter.Gen) { + gens["Definition"] = gen.PtrOf(ManagementPolicyDefinitionGenerator()) +} + +func Test_ManagementPolicyRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyRule_STATUS to ManagementPolicyRule_STATUS via AssignProperties_To_ManagementPolicyRule_STATUS & AssignProperties_From_ManagementPolicyRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyRule_STATUS, ManagementPolicyRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyRule_STATUS tests if a specific instance of ManagementPolicyRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyRule_STATUS(subject ManagementPolicyRule_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyRule_STATUS + err := copied.AssignProperties_To_ManagementPolicyRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyRule_STATUS + err = actual.AssignProperties_From_ManagementPolicyRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicyRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyRule_STATUS, ManagementPolicyRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyRule_STATUS runs a test to see if a specific instance of ManagementPolicyRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyRule_STATUS(subject ManagementPolicyRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyRule_STATUS instances for property testing - lazily instantiated by +// ManagementPolicyRule_STATUSGenerator() +var managementPolicyRule_STATUSGenerator gopter.Gen + +// ManagementPolicyRule_STATUSGenerator returns a generator of ManagementPolicyRule_STATUS instances for property testing. +// We first initialize managementPolicyRule_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyRule_STATUSGenerator() gopter.Gen { + if managementPolicyRule_STATUSGenerator != nil { + return managementPolicyRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS(generators) + managementPolicyRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS(generators) + AddRelatedPropertyGeneratorsForManagementPolicyRule_STATUS(generators) + managementPolicyRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule_STATUS{}), generators) + + return managementPolicyRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS(gens map[string]gopter.Gen) { + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf(ManagementPolicyRule_Type_STATUS_Lifecycle)) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyRule_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyRule_STATUS(gens map[string]gopter.Gen) { + gens["Definition"] = gen.PtrOf(ManagementPolicyDefinition_STATUSGenerator()) +} + +func Test_ManagementPolicyDefinition_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyDefinition to ManagementPolicyDefinition via AssignProperties_To_ManagementPolicyDefinition & AssignProperties_From_ManagementPolicyDefinition returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyDefinition, ManagementPolicyDefinitionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyDefinition tests if a specific instance of ManagementPolicyDefinition can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyDefinition(subject ManagementPolicyDefinition) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyDefinition + err := copied.AssignProperties_To_ManagementPolicyDefinition(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyDefinition + err = actual.AssignProperties_From_ManagementPolicyDefinition(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicyDefinition_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyDefinition via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyDefinition, ManagementPolicyDefinitionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyDefinition runs a test to see if a specific instance of ManagementPolicyDefinition round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyDefinition(subject ManagementPolicyDefinition) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyDefinition + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyDefinition instances for property testing - lazily instantiated by +// ManagementPolicyDefinitionGenerator() +var managementPolicyDefinitionGenerator gopter.Gen + +// ManagementPolicyDefinitionGenerator returns a generator of ManagementPolicyDefinition instances for property testing. +func ManagementPolicyDefinitionGenerator() gopter.Gen { + if managementPolicyDefinitionGenerator != nil { + return managementPolicyDefinitionGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyDefinition(generators) + managementPolicyDefinitionGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyDefinition{}), generators) + + return managementPolicyDefinitionGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyDefinition is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyDefinition(gens map[string]gopter.Gen) { + gens["Actions"] = gen.PtrOf(ManagementPolicyActionGenerator()) + gens["Filters"] = gen.PtrOf(ManagementPolicyFilterGenerator()) +} + +func Test_ManagementPolicyDefinition_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyDefinition_STATUS to ManagementPolicyDefinition_STATUS via AssignProperties_To_ManagementPolicyDefinition_STATUS & AssignProperties_From_ManagementPolicyDefinition_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyDefinition_STATUS, ManagementPolicyDefinition_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyDefinition_STATUS tests if a specific instance of ManagementPolicyDefinition_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyDefinition_STATUS(subject ManagementPolicyDefinition_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyDefinition_STATUS + err := copied.AssignProperties_To_ManagementPolicyDefinition_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyDefinition_STATUS + err = actual.AssignProperties_From_ManagementPolicyDefinition_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicyDefinition_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyDefinition_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyDefinition_STATUS, ManagementPolicyDefinition_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyDefinition_STATUS runs a test to see if a specific instance of ManagementPolicyDefinition_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyDefinition_STATUS(subject ManagementPolicyDefinition_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyDefinition_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyDefinition_STATUS instances for property testing - lazily instantiated by +// ManagementPolicyDefinition_STATUSGenerator() +var managementPolicyDefinition_STATUSGenerator gopter.Gen + +// ManagementPolicyDefinition_STATUSGenerator returns a generator of ManagementPolicyDefinition_STATUS instances for property testing. +func ManagementPolicyDefinition_STATUSGenerator() gopter.Gen { + if managementPolicyDefinition_STATUSGenerator != nil { + return managementPolicyDefinition_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyDefinition_STATUS(generators) + managementPolicyDefinition_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyDefinition_STATUS{}), generators) + + return managementPolicyDefinition_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyDefinition_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyDefinition_STATUS(gens map[string]gopter.Gen) { + gens["Actions"] = gen.PtrOf(ManagementPolicyAction_STATUSGenerator()) + gens["Filters"] = gen.PtrOf(ManagementPolicyFilter_STATUSGenerator()) +} + +func Test_ManagementPolicyAction_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyAction to ManagementPolicyAction via AssignProperties_To_ManagementPolicyAction & AssignProperties_From_ManagementPolicyAction returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyAction, ManagementPolicyActionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyAction tests if a specific instance of ManagementPolicyAction can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyAction(subject ManagementPolicyAction) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyAction + err := copied.AssignProperties_To_ManagementPolicyAction(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyAction + err = actual.AssignProperties_From_ManagementPolicyAction(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicyAction_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyAction via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyAction, ManagementPolicyActionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyAction runs a test to see if a specific instance of ManagementPolicyAction round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyAction(subject ManagementPolicyAction) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyAction + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyAction instances for property testing - lazily instantiated by +// ManagementPolicyActionGenerator() +var managementPolicyActionGenerator gopter.Gen + +// ManagementPolicyActionGenerator returns a generator of ManagementPolicyAction instances for property testing. +func ManagementPolicyActionGenerator() gopter.Gen { + if managementPolicyActionGenerator != nil { + return managementPolicyActionGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyAction(generators) + managementPolicyActionGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyAction{}), generators) + + return managementPolicyActionGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyAction is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyAction(gens map[string]gopter.Gen) { + gens["BaseBlob"] = gen.PtrOf(ManagementPolicyBaseBlobGenerator()) + gens["Snapshot"] = gen.PtrOf(ManagementPolicySnapShotGenerator()) + gens["Version"] = gen.PtrOf(ManagementPolicyVersionGenerator()) +} + +func Test_ManagementPolicyAction_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyAction_STATUS to ManagementPolicyAction_STATUS via AssignProperties_To_ManagementPolicyAction_STATUS & AssignProperties_From_ManagementPolicyAction_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyAction_STATUS, ManagementPolicyAction_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyAction_STATUS tests if a specific instance of ManagementPolicyAction_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyAction_STATUS(subject ManagementPolicyAction_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyAction_STATUS + err := copied.AssignProperties_To_ManagementPolicyAction_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyAction_STATUS + err = actual.AssignProperties_From_ManagementPolicyAction_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicyAction_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyAction_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyAction_STATUS, ManagementPolicyAction_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyAction_STATUS runs a test to see if a specific instance of ManagementPolicyAction_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyAction_STATUS(subject ManagementPolicyAction_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyAction_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyAction_STATUS instances for property testing - lazily instantiated by +// ManagementPolicyAction_STATUSGenerator() +var managementPolicyAction_STATUSGenerator gopter.Gen + +// ManagementPolicyAction_STATUSGenerator returns a generator of ManagementPolicyAction_STATUS instances for property testing. +func ManagementPolicyAction_STATUSGenerator() gopter.Gen { + if managementPolicyAction_STATUSGenerator != nil { + return managementPolicyAction_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyAction_STATUS(generators) + managementPolicyAction_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyAction_STATUS{}), generators) + + return managementPolicyAction_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyAction_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyAction_STATUS(gens map[string]gopter.Gen) { + gens["BaseBlob"] = gen.PtrOf(ManagementPolicyBaseBlob_STATUSGenerator()) + gens["Snapshot"] = gen.PtrOf(ManagementPolicySnapShot_STATUSGenerator()) + gens["Version"] = gen.PtrOf(ManagementPolicyVersion_STATUSGenerator()) +} + +func Test_ManagementPolicyFilter_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyFilter to ManagementPolicyFilter via AssignProperties_To_ManagementPolicyFilter & AssignProperties_From_ManagementPolicyFilter returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyFilter, ManagementPolicyFilterGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyFilter tests if a specific instance of ManagementPolicyFilter can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyFilter(subject ManagementPolicyFilter) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyFilter + err := copied.AssignProperties_To_ManagementPolicyFilter(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyFilter + err = actual.AssignProperties_From_ManagementPolicyFilter(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicyFilter_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyFilter via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyFilter, ManagementPolicyFilterGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyFilter runs a test to see if a specific instance of ManagementPolicyFilter round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyFilter(subject ManagementPolicyFilter) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyFilter + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyFilter instances for property testing - lazily instantiated by +// ManagementPolicyFilterGenerator() +var managementPolicyFilterGenerator gopter.Gen + +// ManagementPolicyFilterGenerator returns a generator of ManagementPolicyFilter instances for property testing. +// We first initialize managementPolicyFilterGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyFilterGenerator() gopter.Gen { + if managementPolicyFilterGenerator != nil { + return managementPolicyFilterGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyFilter(generators) + managementPolicyFilterGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyFilter(generators) + AddRelatedPropertyGeneratorsForManagementPolicyFilter(generators) + managementPolicyFilterGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter{}), generators) + + return managementPolicyFilterGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyFilter is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyFilter(gens map[string]gopter.Gen) { + gens["BlobTypes"] = gen.SliceOf(gen.AlphaString()) + gens["PrefixMatch"] = gen.SliceOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyFilter is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyFilter(gens map[string]gopter.Gen) { + gens["BlobIndexMatch"] = gen.SliceOf(TagFilterGenerator()) +} + +func Test_ManagementPolicyFilter_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyFilter_STATUS to ManagementPolicyFilter_STATUS via AssignProperties_To_ManagementPolicyFilter_STATUS & AssignProperties_From_ManagementPolicyFilter_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyFilter_STATUS, ManagementPolicyFilter_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyFilter_STATUS tests if a specific instance of ManagementPolicyFilter_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyFilter_STATUS(subject ManagementPolicyFilter_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyFilter_STATUS + err := copied.AssignProperties_To_ManagementPolicyFilter_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyFilter_STATUS + err = actual.AssignProperties_From_ManagementPolicyFilter_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicyFilter_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyFilter_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyFilter_STATUS, ManagementPolicyFilter_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyFilter_STATUS runs a test to see if a specific instance of ManagementPolicyFilter_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyFilter_STATUS(subject ManagementPolicyFilter_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyFilter_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyFilter_STATUS instances for property testing - lazily instantiated by +// ManagementPolicyFilter_STATUSGenerator() +var managementPolicyFilter_STATUSGenerator gopter.Gen + +// ManagementPolicyFilter_STATUSGenerator returns a generator of ManagementPolicyFilter_STATUS instances for property testing. +// We first initialize managementPolicyFilter_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyFilter_STATUSGenerator() gopter.Gen { + if managementPolicyFilter_STATUSGenerator != nil { + return managementPolicyFilter_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS(generators) + managementPolicyFilter_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS(generators) + AddRelatedPropertyGeneratorsForManagementPolicyFilter_STATUS(generators) + managementPolicyFilter_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter_STATUS{}), generators) + + return managementPolicyFilter_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS(gens map[string]gopter.Gen) { + gens["BlobTypes"] = gen.SliceOf(gen.AlphaString()) + gens["PrefixMatch"] = gen.SliceOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyFilter_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyFilter_STATUS(gens map[string]gopter.Gen) { + gens["BlobIndexMatch"] = gen.SliceOf(TagFilter_STATUSGenerator()) +} + +func Test_ManagementPolicyBaseBlob_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyBaseBlob to ManagementPolicyBaseBlob via AssignProperties_To_ManagementPolicyBaseBlob & AssignProperties_From_ManagementPolicyBaseBlob returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyBaseBlob, ManagementPolicyBaseBlobGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyBaseBlob tests if a specific instance of ManagementPolicyBaseBlob can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyBaseBlob(subject ManagementPolicyBaseBlob) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyBaseBlob + err := copied.AssignProperties_To_ManagementPolicyBaseBlob(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyBaseBlob + err = actual.AssignProperties_From_ManagementPolicyBaseBlob(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicyBaseBlob_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyBaseBlob via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyBaseBlob, ManagementPolicyBaseBlobGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyBaseBlob runs a test to see if a specific instance of ManagementPolicyBaseBlob round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyBaseBlob(subject ManagementPolicyBaseBlob) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyBaseBlob + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyBaseBlob instances for property testing - lazily instantiated by +// ManagementPolicyBaseBlobGenerator() +var managementPolicyBaseBlobGenerator gopter.Gen + +// ManagementPolicyBaseBlobGenerator returns a generator of ManagementPolicyBaseBlob instances for property testing. +// We first initialize managementPolicyBaseBlobGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyBaseBlobGenerator() gopter.Gen { + if managementPolicyBaseBlobGenerator != nil { + return managementPolicyBaseBlobGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob(generators) + managementPolicyBaseBlobGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob(generators) + AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob(generators) + managementPolicyBaseBlobGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob{}), generators) + + return managementPolicyBaseBlobGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob(gens map[string]gopter.Gen) { + gens["EnableAutoTierToHotFromCool"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterModificationGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterModificationGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterModificationGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterModificationGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterModificationGenerator()) +} + +func Test_ManagementPolicyBaseBlob_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyBaseBlob_STATUS to ManagementPolicyBaseBlob_STATUS via AssignProperties_To_ManagementPolicyBaseBlob_STATUS & AssignProperties_From_ManagementPolicyBaseBlob_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyBaseBlob_STATUS, ManagementPolicyBaseBlob_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyBaseBlob_STATUS tests if a specific instance of ManagementPolicyBaseBlob_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyBaseBlob_STATUS(subject ManagementPolicyBaseBlob_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyBaseBlob_STATUS + err := copied.AssignProperties_To_ManagementPolicyBaseBlob_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyBaseBlob_STATUS + err = actual.AssignProperties_From_ManagementPolicyBaseBlob_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicyBaseBlob_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyBaseBlob_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyBaseBlob_STATUS, ManagementPolicyBaseBlob_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyBaseBlob_STATUS runs a test to see if a specific instance of ManagementPolicyBaseBlob_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyBaseBlob_STATUS(subject ManagementPolicyBaseBlob_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyBaseBlob_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyBaseBlob_STATUS instances for property testing - lazily instantiated by +// ManagementPolicyBaseBlob_STATUSGenerator() +var managementPolicyBaseBlob_STATUSGenerator gopter.Gen + +// ManagementPolicyBaseBlob_STATUSGenerator returns a generator of ManagementPolicyBaseBlob_STATUS instances for property testing. +// We first initialize managementPolicyBaseBlob_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagementPolicyBaseBlob_STATUSGenerator() gopter.Gen { + if managementPolicyBaseBlob_STATUSGenerator != nil { + return managementPolicyBaseBlob_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(generators) + managementPolicyBaseBlob_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(generators) + AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(generators) + managementPolicyBaseBlob_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob_STATUS{}), generators) + + return managementPolicyBaseBlob_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(gens map[string]gopter.Gen) { + gens["EnableAutoTierToHotFromCool"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterModification_STATUSGenerator()) +} + +func Test_ManagementPolicySnapShot_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicySnapShot to ManagementPolicySnapShot via AssignProperties_To_ManagementPolicySnapShot & AssignProperties_From_ManagementPolicySnapShot returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicySnapShot, ManagementPolicySnapShotGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicySnapShot tests if a specific instance of ManagementPolicySnapShot can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicySnapShot(subject ManagementPolicySnapShot) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicySnapShot + err := copied.AssignProperties_To_ManagementPolicySnapShot(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicySnapShot + err = actual.AssignProperties_From_ManagementPolicySnapShot(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicySnapShot_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicySnapShot via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicySnapShot, ManagementPolicySnapShotGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicySnapShot runs a test to see if a specific instance of ManagementPolicySnapShot round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicySnapShot(subject ManagementPolicySnapShot) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicySnapShot + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicySnapShot instances for property testing - lazily instantiated by +// ManagementPolicySnapShotGenerator() +var managementPolicySnapShotGenerator gopter.Gen + +// ManagementPolicySnapShotGenerator returns a generator of ManagementPolicySnapShot instances for property testing. +func ManagementPolicySnapShotGenerator() gopter.Gen { + if managementPolicySnapShotGenerator != nil { + return managementPolicySnapShotGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicySnapShot(generators) + managementPolicySnapShotGenerator = gen.Struct(reflect.TypeOf(ManagementPolicySnapShot{}), generators) + + return managementPolicySnapShotGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicySnapShot is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicySnapShot(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterCreationGenerator()) +} + +func Test_ManagementPolicySnapShot_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicySnapShot_STATUS to ManagementPolicySnapShot_STATUS via AssignProperties_To_ManagementPolicySnapShot_STATUS & AssignProperties_From_ManagementPolicySnapShot_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicySnapShot_STATUS, ManagementPolicySnapShot_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicySnapShot_STATUS tests if a specific instance of ManagementPolicySnapShot_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicySnapShot_STATUS(subject ManagementPolicySnapShot_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicySnapShot_STATUS + err := copied.AssignProperties_To_ManagementPolicySnapShot_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicySnapShot_STATUS + err = actual.AssignProperties_From_ManagementPolicySnapShot_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicySnapShot_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicySnapShot_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicySnapShot_STATUS, ManagementPolicySnapShot_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicySnapShot_STATUS runs a test to see if a specific instance of ManagementPolicySnapShot_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicySnapShot_STATUS(subject ManagementPolicySnapShot_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicySnapShot_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicySnapShot_STATUS instances for property testing - lazily instantiated by +// ManagementPolicySnapShot_STATUSGenerator() +var managementPolicySnapShot_STATUSGenerator gopter.Gen + +// ManagementPolicySnapShot_STATUSGenerator returns a generator of ManagementPolicySnapShot_STATUS instances for property testing. +func ManagementPolicySnapShot_STATUSGenerator() gopter.Gen { + if managementPolicySnapShot_STATUSGenerator != nil { + return managementPolicySnapShot_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicySnapShot_STATUS(generators) + managementPolicySnapShot_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicySnapShot_STATUS{}), generators) + + return managementPolicySnapShot_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicySnapShot_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicySnapShot_STATUS(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) +} + +func Test_ManagementPolicyVersion_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyVersion to ManagementPolicyVersion via AssignProperties_To_ManagementPolicyVersion & AssignProperties_From_ManagementPolicyVersion returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyVersion, ManagementPolicyVersionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyVersion tests if a specific instance of ManagementPolicyVersion can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyVersion(subject ManagementPolicyVersion) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyVersion + err := copied.AssignProperties_To_ManagementPolicyVersion(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyVersion + err = actual.AssignProperties_From_ManagementPolicyVersion(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicyVersion_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyVersion via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyVersion, ManagementPolicyVersionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyVersion runs a test to see if a specific instance of ManagementPolicyVersion round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyVersion(subject ManagementPolicyVersion) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyVersion + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyVersion instances for property testing - lazily instantiated by +// ManagementPolicyVersionGenerator() +var managementPolicyVersionGenerator gopter.Gen + +// ManagementPolicyVersionGenerator returns a generator of ManagementPolicyVersion instances for property testing. +func ManagementPolicyVersionGenerator() gopter.Gen { + if managementPolicyVersionGenerator != nil { + return managementPolicyVersionGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyVersion(generators) + managementPolicyVersionGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyVersion{}), generators) + + return managementPolicyVersionGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyVersion is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyVersion(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterCreationGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterCreationGenerator()) +} + +func Test_ManagementPolicyVersion_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagementPolicyVersion_STATUS to ManagementPolicyVersion_STATUS via AssignProperties_To_ManagementPolicyVersion_STATUS & AssignProperties_From_ManagementPolicyVersion_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagementPolicyVersion_STATUS, ManagementPolicyVersion_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagementPolicyVersion_STATUS tests if a specific instance of ManagementPolicyVersion_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForManagementPolicyVersion_STATUS(subject ManagementPolicyVersion_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.ManagementPolicyVersion_STATUS + err := copied.AssignProperties_To_ManagementPolicyVersion_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagementPolicyVersion_STATUS + err = actual.AssignProperties_From_ManagementPolicyVersion_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ManagementPolicyVersion_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagementPolicyVersion_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagementPolicyVersion_STATUS, ManagementPolicyVersion_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagementPolicyVersion_STATUS runs a test to see if a specific instance of ManagementPolicyVersion_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagementPolicyVersion_STATUS(subject ManagementPolicyVersion_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagementPolicyVersion_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ManagementPolicyVersion_STATUS instances for property testing - lazily instantiated by +// ManagementPolicyVersion_STATUSGenerator() +var managementPolicyVersion_STATUSGenerator gopter.Gen + +// ManagementPolicyVersion_STATUSGenerator returns a generator of ManagementPolicyVersion_STATUS instances for property testing. +func ManagementPolicyVersion_STATUSGenerator() gopter.Gen { + if managementPolicyVersion_STATUSGenerator != nil { + return managementPolicyVersion_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForManagementPolicyVersion_STATUS(generators) + managementPolicyVersion_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyVersion_STATUS{}), generators) + + return managementPolicyVersion_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForManagementPolicyVersion_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagementPolicyVersion_STATUS(gens map[string]gopter.Gen) { + gens["Delete"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToArchive"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToCold"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToCool"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) + gens["TierToHot"] = gen.PtrOf(DateAfterCreation_STATUSGenerator()) +} + +func Test_TagFilter_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TagFilter to TagFilter via AssignProperties_To_TagFilter & AssignProperties_From_TagFilter returns original", + prop.ForAll(RunPropertyAssignmentTestForTagFilter, TagFilterGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTagFilter tests if a specific instance of TagFilter can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTagFilter(subject TagFilter) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TagFilter + err := copied.AssignProperties_To_TagFilter(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TagFilter + err = actual.AssignProperties_From_TagFilter(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_TagFilter_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TagFilter via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTagFilter, TagFilterGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTagFilter runs a test to see if a specific instance of TagFilter round trips to JSON and back losslessly +func RunJSONSerializationTestForTagFilter(subject TagFilter) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TagFilter + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TagFilter instances for property testing - lazily instantiated by TagFilterGenerator() +var tagFilterGenerator gopter.Gen + +// TagFilterGenerator returns a generator of TagFilter instances for property testing. +func TagFilterGenerator() gopter.Gen { + if tagFilterGenerator != nil { + return tagFilterGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTagFilter(generators) + tagFilterGenerator = gen.Struct(reflect.TypeOf(TagFilter{}), generators) + + return tagFilterGenerator +} + +// AddIndependentPropertyGeneratorsForTagFilter is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTagFilter(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Op"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_TagFilter_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TagFilter_STATUS to TagFilter_STATUS via AssignProperties_To_TagFilter_STATUS & AssignProperties_From_TagFilter_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForTagFilter_STATUS, TagFilter_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTagFilter_STATUS tests if a specific instance of TagFilter_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTagFilter_STATUS(subject TagFilter_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TagFilter_STATUS + err := copied.AssignProperties_To_TagFilter_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TagFilter_STATUS + err = actual.AssignProperties_From_TagFilter_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_TagFilter_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TagFilter_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTagFilter_STATUS, TagFilter_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTagFilter_STATUS runs a test to see if a specific instance of TagFilter_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForTagFilter_STATUS(subject TagFilter_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TagFilter_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TagFilter_STATUS instances for property testing - lazily instantiated by TagFilter_STATUSGenerator() +var tagFilter_STATUSGenerator gopter.Gen + +// TagFilter_STATUSGenerator returns a generator of TagFilter_STATUS instances for property testing. +func TagFilter_STATUSGenerator() gopter.Gen { + if tagFilter_STATUSGenerator != nil { + return tagFilter_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTagFilter_STATUS(generators) + tagFilter_STATUSGenerator = gen.Struct(reflect.TypeOf(TagFilter_STATUS{}), generators) + + return tagFilter_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForTagFilter_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTagFilter_STATUS(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Op"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_DateAfterCreation_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DateAfterCreation to DateAfterCreation via AssignProperties_To_DateAfterCreation & AssignProperties_From_DateAfterCreation returns original", + prop.ForAll(RunPropertyAssignmentTestForDateAfterCreation, DateAfterCreationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDateAfterCreation tests if a specific instance of DateAfterCreation can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDateAfterCreation(subject DateAfterCreation) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.DateAfterCreation + err := copied.AssignProperties_To_DateAfterCreation(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DateAfterCreation + err = actual.AssignProperties_From_DateAfterCreation(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_DateAfterCreation_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DateAfterCreation via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDateAfterCreation, DateAfterCreationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDateAfterCreation runs a test to see if a specific instance of DateAfterCreation round trips to JSON and back losslessly +func RunJSONSerializationTestForDateAfterCreation(subject DateAfterCreation) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DateAfterCreation + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DateAfterCreation instances for property testing - lazily instantiated by DateAfterCreationGenerator() +var dateAfterCreationGenerator gopter.Gen + +// DateAfterCreationGenerator returns a generator of DateAfterCreation instances for property testing. +func DateAfterCreationGenerator() gopter.Gen { + if dateAfterCreationGenerator != nil { + return dateAfterCreationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDateAfterCreation(generators) + dateAfterCreationGenerator = gen.Struct(reflect.TypeOf(DateAfterCreation{}), generators) + + return dateAfterCreationGenerator +} + +// AddIndependentPropertyGeneratorsForDateAfterCreation is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDateAfterCreation(gens map[string]gopter.Gen) { + gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Int()) + gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Int()) +} + +func Test_DateAfterCreation_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DateAfterCreation_STATUS to DateAfterCreation_STATUS via AssignProperties_To_DateAfterCreation_STATUS & AssignProperties_From_DateAfterCreation_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForDateAfterCreation_STATUS, DateAfterCreation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDateAfterCreation_STATUS tests if a specific instance of DateAfterCreation_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDateAfterCreation_STATUS(subject DateAfterCreation_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.DateAfterCreation_STATUS + err := copied.AssignProperties_To_DateAfterCreation_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DateAfterCreation_STATUS + err = actual.AssignProperties_From_DateAfterCreation_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_DateAfterCreation_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DateAfterCreation_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDateAfterCreation_STATUS, DateAfterCreation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDateAfterCreation_STATUS runs a test to see if a specific instance of DateAfterCreation_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForDateAfterCreation_STATUS(subject DateAfterCreation_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DateAfterCreation_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DateAfterCreation_STATUS instances for property testing - lazily instantiated by +// DateAfterCreation_STATUSGenerator() +var dateAfterCreation_STATUSGenerator gopter.Gen + +// DateAfterCreation_STATUSGenerator returns a generator of DateAfterCreation_STATUS instances for property testing. +func DateAfterCreation_STATUSGenerator() gopter.Gen { + if dateAfterCreation_STATUSGenerator != nil { + return dateAfterCreation_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDateAfterCreation_STATUS(generators) + dateAfterCreation_STATUSGenerator = gen.Struct(reflect.TypeOf(DateAfterCreation_STATUS{}), generators) + + return dateAfterCreation_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForDateAfterCreation_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDateAfterCreation_STATUS(gens map[string]gopter.Gen) { + gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Float64()) + gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Float64()) +} + +func Test_DateAfterModification_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DateAfterModification to DateAfterModification via AssignProperties_To_DateAfterModification & AssignProperties_From_DateAfterModification returns original", + prop.ForAll(RunPropertyAssignmentTestForDateAfterModification, DateAfterModificationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDateAfterModification tests if a specific instance of DateAfterModification can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDateAfterModification(subject DateAfterModification) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.DateAfterModification + err := copied.AssignProperties_To_DateAfterModification(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DateAfterModification + err = actual.AssignProperties_From_DateAfterModification(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_DateAfterModification_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DateAfterModification via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDateAfterModification, DateAfterModificationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDateAfterModification runs a test to see if a specific instance of DateAfterModification round trips to JSON and back losslessly +func RunJSONSerializationTestForDateAfterModification(subject DateAfterModification) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DateAfterModification + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DateAfterModification instances for property testing - lazily instantiated by +// DateAfterModificationGenerator() +var dateAfterModificationGenerator gopter.Gen + +// DateAfterModificationGenerator returns a generator of DateAfterModification instances for property testing. +func DateAfterModificationGenerator() gopter.Gen { + if dateAfterModificationGenerator != nil { + return dateAfterModificationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDateAfterModification(generators) + dateAfterModificationGenerator = gen.Struct(reflect.TypeOf(DateAfterModification{}), generators) + + return dateAfterModificationGenerator +} + +// AddIndependentPropertyGeneratorsForDateAfterModification is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDateAfterModification(gens map[string]gopter.Gen) { + gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Int()) + gens["DaysAfterLastAccessTimeGreaterThan"] = gen.PtrOf(gen.Int()) + gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Int()) + gens["DaysAfterModificationGreaterThan"] = gen.PtrOf(gen.Int()) +} + +func Test_DateAfterModification_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DateAfterModification_STATUS to DateAfterModification_STATUS via AssignProperties_To_DateAfterModification_STATUS & AssignProperties_From_DateAfterModification_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForDateAfterModification_STATUS, DateAfterModification_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDateAfterModification_STATUS tests if a specific instance of DateAfterModification_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDateAfterModification_STATUS(subject DateAfterModification_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.DateAfterModification_STATUS + err := copied.AssignProperties_To_DateAfterModification_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DateAfterModification_STATUS + err = actual.AssignProperties_From_DateAfterModification_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_DateAfterModification_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DateAfterModification_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDateAfterModification_STATUS, DateAfterModification_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDateAfterModification_STATUS runs a test to see if a specific instance of DateAfterModification_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForDateAfterModification_STATUS(subject DateAfterModification_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DateAfterModification_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DateAfterModification_STATUS instances for property testing - lazily instantiated by +// DateAfterModification_STATUSGenerator() +var dateAfterModification_STATUSGenerator gopter.Gen + +// DateAfterModification_STATUSGenerator returns a generator of DateAfterModification_STATUS instances for property testing. +func DateAfterModification_STATUSGenerator() gopter.Gen { + if dateAfterModification_STATUSGenerator != nil { + return dateAfterModification_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDateAfterModification_STATUS(generators) + dateAfterModification_STATUSGenerator = gen.Struct(reflect.TypeOf(DateAfterModification_STATUS{}), generators) + + return dateAfterModification_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForDateAfterModification_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDateAfterModification_STATUS(gens map[string]gopter.Gen) { + gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Float64()) + gens["DaysAfterLastAccessTimeGreaterThan"] = gen.PtrOf(gen.Float64()) + gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Float64()) + gens["DaysAfterModificationGreaterThan"] = gen.PtrOf(gen.Float64()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_queue_service_spec_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_queue_service_spec_arm_types_gen.go new file mode 100644 index 00000000000..89505a77751 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_queue_service_spec_arm_types_gen.go @@ -0,0 +1,37 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type StorageAccounts_QueueService_Spec_ARM struct { + Name string `json:"name,omitempty"` + + // Properties: The properties of a storage account’s Queue service. + Properties *StorageAccounts_QueueService_Properties_Spec_ARM `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &StorageAccounts_QueueService_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (service StorageAccounts_QueueService_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (service *StorageAccounts_QueueService_Spec_ARM) GetName() string { + return service.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/queueServices" +func (service *StorageAccounts_QueueService_Spec_ARM) GetType() string { + return "Microsoft.Storage/storageAccounts/queueServices" +} + +type StorageAccounts_QueueService_Properties_Spec_ARM struct { + // Cors: Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // Queue service. + Cors *CorsRules_ARM `json:"cors,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_queue_service_spec_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_queue_service_spec_arm_types_gen_test.go new file mode 100644 index 00000000000..95c83bb2892 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_queue_service_spec_arm_types_gen_test.go @@ -0,0 +1,154 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_QueueService_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueService_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueService_Spec_ARM, StorageAccounts_QueueService_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueService_Spec_ARM runs a test to see if a specific instance of StorageAccounts_QueueService_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueService_Spec_ARM(subject StorageAccounts_QueueService_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueService_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueService_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_QueueService_Spec_ARMGenerator() +var storageAccounts_QueueService_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_QueueService_Spec_ARMGenerator returns a generator of StorageAccounts_QueueService_Spec_ARM instances for property testing. +// We first initialize storageAccounts_QueueService_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_QueueService_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_QueueService_Spec_ARMGenerator != nil { + return storageAccounts_QueueService_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_Spec_ARM(generators) + storageAccounts_QueueService_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Spec_ARM(generators) + storageAccounts_QueueService_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_Spec_ARM{}), generators) + + return storageAccounts_QueueService_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_Spec_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Spec_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(StorageAccounts_QueueService_Properties_Spec_ARMGenerator()) +} + +func Test_StorageAccounts_QueueService_Properties_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueService_Properties_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueService_Properties_Spec_ARM, StorageAccounts_QueueService_Properties_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueService_Properties_Spec_ARM runs a test to see if a specific instance of StorageAccounts_QueueService_Properties_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueService_Properties_Spec_ARM(subject StorageAccounts_QueueService_Properties_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueService_Properties_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueService_Properties_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_QueueService_Properties_Spec_ARMGenerator() +var storageAccounts_QueueService_Properties_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_QueueService_Properties_Spec_ARMGenerator returns a generator of StorageAccounts_QueueService_Properties_Spec_ARM instances for property testing. +func StorageAccounts_QueueService_Properties_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_QueueService_Properties_Spec_ARMGenerator != nil { + return storageAccounts_QueueService_Properties_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Properties_Spec_ARM(generators) + storageAccounts_QueueService_Properties_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_Properties_Spec_ARM{}), generators) + + return storageAccounts_QueueService_Properties_Spec_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Properties_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Properties_Spec_ARM(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRules_ARMGenerator()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_queue_service_status_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_queue_service_status_arm_types_gen.go new file mode 100644 index 00000000000..cfe1eb3f968 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_queue_service_status_arm_types_gen.go @@ -0,0 +1,26 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +type StorageAccounts_QueueService_STATUS_ARM struct { + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Properties: The properties of a storage account’s Queue service. + Properties *StorageAccounts_QueueService_Properties_STATUS_ARM `json:"properties,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +type StorageAccounts_QueueService_Properties_STATUS_ARM struct { + // Cors: Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // Queue service. + Cors *CorsRules_STATUS_ARM `json:"cors,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_queue_service_status_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_queue_service_status_arm_types_gen_test.go new file mode 100644 index 00000000000..7dfcbb37270 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_queue_service_status_arm_types_gen_test.go @@ -0,0 +1,156 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_QueueService_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueService_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueService_STATUS_ARM, StorageAccounts_QueueService_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueService_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_QueueService_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueService_STATUS_ARM(subject StorageAccounts_QueueService_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueService_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueService_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccounts_QueueService_STATUS_ARMGenerator() +var storageAccounts_QueueService_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_QueueService_STATUS_ARMGenerator returns a generator of StorageAccounts_QueueService_STATUS_ARM instances for property testing. +// We first initialize storageAccounts_QueueService_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_QueueService_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_QueueService_STATUS_ARMGenerator != nil { + return storageAccounts_QueueService_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_STATUS_ARM(generators) + storageAccounts_QueueService_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_STATUS_ARM(generators) + storageAccounts_QueueService_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_STATUS_ARM{}), generators) + + return storageAccounts_QueueService_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(StorageAccounts_QueueService_Properties_STATUS_ARMGenerator()) +} + +func Test_StorageAccounts_QueueService_Properties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueService_Properties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueService_Properties_STATUS_ARM, StorageAccounts_QueueService_Properties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueService_Properties_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_QueueService_Properties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueService_Properties_STATUS_ARM(subject StorageAccounts_QueueService_Properties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueService_Properties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueService_Properties_STATUS_ARM instances for property testing - lazily instantiated +// by StorageAccounts_QueueService_Properties_STATUS_ARMGenerator() +var storageAccounts_QueueService_Properties_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_QueueService_Properties_STATUS_ARMGenerator returns a generator of StorageAccounts_QueueService_Properties_STATUS_ARM instances for property testing. +func StorageAccounts_QueueService_Properties_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_QueueService_Properties_STATUS_ARMGenerator != nil { + return storageAccounts_QueueService_Properties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Properties_STATUS_ARM(generators) + storageAccounts_QueueService_Properties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_Properties_STATUS_ARM{}), generators) + + return storageAccounts_QueueService_Properties_STATUS_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Properties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Properties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRules_STATUS_ARMGenerator()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_queue_service_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_queue_service_types_gen.go new file mode 100644 index 00000000000..680588ffef1 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_queue_service_types_gen.go @@ -0,0 +1,730 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/queue.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default +type StorageAccountsQueueService struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_QueueService_Spec `json:"spec,omitempty"` + Status StorageAccounts_QueueService_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsQueueService{} + +// GetConditions returns the conditions of the resource +func (service *StorageAccountsQueueService) GetConditions() conditions.Conditions { + return service.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (service *StorageAccountsQueueService) SetConditions(conditions conditions.Conditions) { + service.Status.Conditions = conditions +} + +var _ conversion.Convertible = &StorageAccountsQueueService{} + +// ConvertFrom populates our StorageAccountsQueueService from the provided hub StorageAccountsQueueService +func (service *StorageAccountsQueueService) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsQueueService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsQueueService but received %T instead", hub) + } + + return service.AssignProperties_From_StorageAccountsQueueService(source) +} + +// ConvertTo populates the provided hub StorageAccountsQueueService from our StorageAccountsQueueService +func (service *StorageAccountsQueueService) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsQueueService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsQueueService but received %T instead", hub) + } + + return service.AssignProperties_To_StorageAccountsQueueService(destination) +} + +// +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20230101-storageaccountsqueueservice,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsqueueservices,verbs=create;update,versions=v1api20230101,name=default.v1api20230101.storageaccountsqueueservices.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &StorageAccountsQueueService{} + +// Default applies defaults to the StorageAccountsQueueService resource +func (service *StorageAccountsQueueService) Default() { + service.defaultImpl() + var temp any = service + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultImpl applies the code generated defaults to the StorageAccountsQueueService resource +func (service *StorageAccountsQueueService) defaultImpl() {} + +var _ genruntime.ImportableResource = &StorageAccountsQueueService{} + +// InitializeSpec initializes the spec for this resource from the given status +func (service *StorageAccountsQueueService) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*StorageAccounts_QueueService_STATUS); ok { + return service.Spec.Initialize_From_StorageAccounts_QueueService_STATUS(s) + } + + return fmt.Errorf("expected Status of type StorageAccounts_QueueService_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &StorageAccountsQueueService{} + +// AzureName returns the Azure name of the resource (always "default") +func (service *StorageAccountsQueueService) AzureName() string { + return "default" +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (service StorageAccountsQueueService) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (service *StorageAccountsQueueService) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (service *StorageAccountsQueueService) GetSpec() genruntime.ConvertibleSpec { + return &service.Spec +} + +// GetStatus returns the status of this resource +func (service *StorageAccountsQueueService) GetStatus() genruntime.ConvertibleStatus { + return &service.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (service *StorageAccountsQueueService) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/queueServices" +func (service *StorageAccountsQueueService) GetType() string { + return "Microsoft.Storage/storageAccounts/queueServices" +} + +// NewEmptyStatus returns a new empty (blank) status +func (service *StorageAccountsQueueService) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_QueueService_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (service *StorageAccountsQueueService) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(service.Spec) + return service.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (service *StorageAccountsQueueService) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_QueueService_STATUS); ok { + service.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_QueueService_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + service.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-storage-azure-com-v1api20230101-storageaccountsqueueservice,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsqueueservices,verbs=create;update,versions=v1api20230101,name=validate.v1api20230101.storageaccountsqueueservices.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &StorageAccountsQueueService{} + +// ValidateCreate validates the creation of the resource +func (service *StorageAccountsQueueService) ValidateCreate() (admission.Warnings, error) { + validations := service.createValidations() + var temp any = service + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (service *StorageAccountsQueueService) ValidateDelete() (admission.Warnings, error) { + validations := service.deleteValidations() + var temp any = service + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (service *StorageAccountsQueueService) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := service.updateValidations() + var temp any = service + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (service *StorageAccountsQueueService) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){service.validateResourceReferences, service.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (service *StorageAccountsQueueService) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (service *StorageAccountsQueueService) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return service.validateResourceReferences() + }, + service.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return service.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (service *StorageAccountsQueueService) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(service) +} + +// validateResourceReferences validates all resource references +func (service *StorageAccountsQueueService) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&service.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (service *StorageAccountsQueueService) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*StorageAccountsQueueService) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, service) +} + +// AssignProperties_From_StorageAccountsQueueService populates our StorageAccountsQueueService from the provided source StorageAccountsQueueService +func (service *StorageAccountsQueueService) AssignProperties_From_StorageAccountsQueueService(source *v20230101s.StorageAccountsQueueService) error { + + // ObjectMeta + service.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_QueueService_Spec + err := spec.AssignProperties_From_StorageAccounts_QueueService_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_QueueService_Spec() to populate field Spec") + } + service.Spec = spec + + // Status + var status StorageAccounts_QueueService_STATUS + err = status.AssignProperties_From_StorageAccounts_QueueService_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_QueueService_STATUS() to populate field Status") + } + service.Status = status + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsQueueService populates the provided destination StorageAccountsQueueService from our StorageAccountsQueueService +func (service *StorageAccountsQueueService) AssignProperties_To_StorageAccountsQueueService(destination *v20230101s.StorageAccountsQueueService) error { + + // ObjectMeta + destination.ObjectMeta = *service.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_QueueService_Spec + err := service.Spec.AssignProperties_To_StorageAccounts_QueueService_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_QueueService_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_QueueService_STATUS + err = service.Status.AssignProperties_To_StorageAccounts_QueueService_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_QueueService_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (service *StorageAccountsQueueService) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: service.Spec.OriginalVersion(), + Kind: "StorageAccountsQueueService", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/queue.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default +type StorageAccountsQueueServiceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsQueueService `json:"items"` +} + +type StorageAccounts_QueueService_Spec struct { + // Cors: Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // Queue service. + Cors *CorsRules `json:"cors,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccount resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccount"` +} + +var _ genruntime.ARMTransformer = &StorageAccounts_QueueService_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (service *StorageAccounts_QueueService_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if service == nil { + return nil, nil + } + result := &StorageAccounts_QueueService_Spec_ARM{} + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if service.Cors != nil { + result.Properties = &StorageAccounts_QueueService_Properties_Spec_ARM{} + } + if service.Cors != nil { + cors_ARM, err := (*service.Cors).ConvertToARM(resolved) + if err != nil { + return nil, err + } + cors := *cors_ARM.(*CorsRules_ARM) + result.Properties.Cors = &cors + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (service *StorageAccounts_QueueService_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_QueueService_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (service *StorageAccounts_QueueService_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_QueueService_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_QueueService_Spec_ARM, got %T", armInput) + } + + // Set property "Cors": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Cors != nil { + var cors1 CorsRules + err := cors1.PopulateFromARM(owner, *typedInput.Properties.Cors) + if err != nil { + return err + } + cors := cors1 + service.Cors = &cors + } + } + + // Set property "Owner": + service.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_QueueService_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_QueueService_Spec from the provided source +func (service *StorageAccounts_QueueService_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20230101s.StorageAccounts_QueueService_Spec) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_QueueService_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_QueueService_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_QueueService_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_QueueService_Spec +func (service *StorageAccounts_QueueService_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20230101s.StorageAccounts_QueueService_Spec) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_QueueService_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_QueueService_Spec{} + err := service.AssignProperties_To_StorageAccounts_QueueService_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_QueueService_Spec populates our StorageAccounts_QueueService_Spec from the provided source StorageAccounts_QueueService_Spec +func (service *StorageAccounts_QueueService_Spec) AssignProperties_From_StorageAccounts_QueueService_Spec(source *v20230101s.StorageAccounts_QueueService_Spec) error { + + // Cors + if source.Cors != nil { + var cor CorsRules + err := cor.AssignProperties_From_CorsRules(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + service.Owner = &owner + } else { + service.Owner = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_QueueService_Spec populates the provided destination StorageAccounts_QueueService_Spec from our StorageAccounts_QueueService_Spec +func (service *StorageAccounts_QueueService_Spec) AssignProperties_To_StorageAccounts_QueueService_Spec(destination *v20230101s.StorageAccounts_QueueService_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules + err := service.Cors.AssignProperties_To_CorsRules(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // OriginalVersion + destination.OriginalVersion = service.OriginalVersion() + + // Owner + if service.Owner != nil { + owner := service.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_StorageAccounts_QueueService_STATUS populates our StorageAccounts_QueueService_Spec from the provided source StorageAccounts_QueueService_STATUS +func (service *StorageAccounts_QueueService_Spec) Initialize_From_StorageAccounts_QueueService_STATUS(source *StorageAccounts_QueueService_STATUS) error { + + // Cors + if source.Cors != nil { + var cor CorsRules + err := cor.Initialize_From_CorsRules_STATUS(source.Cors) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_CorsRules_STATUS() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (service *StorageAccounts_QueueService_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +type StorageAccounts_QueueService_STATUS struct { + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // Cors: Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // Queue service. + Cors *CorsRules_STATUS `json:"cors,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_QueueService_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_QueueService_STATUS from the provided source +func (service *StorageAccounts_QueueService_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20230101s.StorageAccounts_QueueService_STATUS) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_QueueService_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_QueueService_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_QueueService_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_QueueService_STATUS +func (service *StorageAccounts_QueueService_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20230101s.StorageAccounts_QueueService_STATUS) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_QueueService_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_QueueService_STATUS{} + err := service.AssignProperties_To_StorageAccounts_QueueService_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &StorageAccounts_QueueService_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (service *StorageAccounts_QueueService_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_QueueService_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (service *StorageAccounts_QueueService_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_QueueService_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_QueueService_STATUS_ARM, got %T", armInput) + } + + // no assignment for property "Conditions" + + // Set property "Cors": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Cors != nil { + var cors1 CorsRules_STATUS + err := cors1.PopulateFromARM(owner, *typedInput.Properties.Cors) + if err != nil { + return err + } + cors := cors1 + service.Cors = &cors + } + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + service.Id = &id + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + service.Name = &name + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + service.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccounts_QueueService_STATUS populates our StorageAccounts_QueueService_STATUS from the provided source StorageAccounts_QueueService_STATUS +func (service *StorageAccounts_QueueService_STATUS) AssignProperties_From_StorageAccounts_QueueService_STATUS(source *v20230101s.StorageAccounts_QueueService_STATUS) error { + + // Conditions + service.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Cors + if source.Cors != nil { + var cor CorsRules_STATUS + err := cor.AssignProperties_From_CorsRules_STATUS(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules_STATUS() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // Id + service.Id = genruntime.ClonePointerToString(source.Id) + + // Name + service.Name = genruntime.ClonePointerToString(source.Name) + + // Type + service.Type = genruntime.ClonePointerToString(source.Type) + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_QueueService_STATUS populates the provided destination StorageAccounts_QueueService_STATUS from our StorageAccounts_QueueService_STATUS +func (service *StorageAccounts_QueueService_STATUS) AssignProperties_To_StorageAccounts_QueueService_STATUS(destination *v20230101s.StorageAccounts_QueueService_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(service.Conditions) + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules_STATUS + err := service.Cors.AssignProperties_To_CorsRules_STATUS(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules_STATUS() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(service.Id) + + // Name + destination.Name = genruntime.ClonePointerToString(service.Name) + + // Type + destination.Type = genruntime.ClonePointerToString(service.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&StorageAccountsQueueService{}, &StorageAccountsQueueServiceList{}) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_queue_service_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_queue_service_types_gen_test.go new file mode 100644 index 00000000000..238e38f65fc --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_queue_service_types_gen_test.go @@ -0,0 +1,388 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsQueueService_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsQueueService to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsQueueService, StorageAccountsQueueServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsQueueService tests if a specific instance of StorageAccountsQueueService round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsQueueService(subject StorageAccountsQueueService) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsQueueService + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsQueueService + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsQueueService_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsQueueService to StorageAccountsQueueService via AssignProperties_To_StorageAccountsQueueService & AssignProperties_From_StorageAccountsQueueService returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsQueueService, StorageAccountsQueueServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsQueueService tests if a specific instance of StorageAccountsQueueService can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsQueueService(subject StorageAccountsQueueService) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsQueueService + err := copied.AssignProperties_To_StorageAccountsQueueService(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsQueueService + err = actual.AssignProperties_From_StorageAccountsQueueService(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsQueueService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsQueueService via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsQueueService, StorageAccountsQueueServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsQueueService runs a test to see if a specific instance of StorageAccountsQueueService round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsQueueService(subject StorageAccountsQueueService) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsQueueService + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsQueueService instances for property testing - lazily instantiated by +// StorageAccountsQueueServiceGenerator() +var storageAccountsQueueServiceGenerator gopter.Gen + +// StorageAccountsQueueServiceGenerator returns a generator of StorageAccountsQueueService instances for property testing. +func StorageAccountsQueueServiceGenerator() gopter.Gen { + if storageAccountsQueueServiceGenerator != nil { + return storageAccountsQueueServiceGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsQueueService(generators) + storageAccountsQueueServiceGenerator = gen.Struct(reflect.TypeOf(StorageAccountsQueueService{}), generators) + + return storageAccountsQueueServiceGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsQueueService is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsQueueService(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_QueueService_SpecGenerator() + gens["Status"] = StorageAccounts_QueueService_STATUSGenerator() +} + +func Test_StorageAccounts_QueueService_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_QueueService_Spec to StorageAccounts_QueueService_Spec via AssignProperties_To_StorageAccounts_QueueService_Spec & AssignProperties_From_StorageAccounts_QueueService_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_QueueService_Spec, StorageAccounts_QueueService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_QueueService_Spec tests if a specific instance of StorageAccounts_QueueService_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_QueueService_Spec(subject StorageAccounts_QueueService_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_QueueService_Spec + err := copied.AssignProperties_To_StorageAccounts_QueueService_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_QueueService_Spec + err = actual.AssignProperties_From_StorageAccounts_QueueService_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_QueueService_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueService_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueService_Spec, StorageAccounts_QueueService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueService_Spec runs a test to see if a specific instance of StorageAccounts_QueueService_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueService_Spec(subject StorageAccounts_QueueService_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueService_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueService_Spec instances for property testing - lazily instantiated by +// StorageAccounts_QueueService_SpecGenerator() +var storageAccounts_QueueService_SpecGenerator gopter.Gen + +// StorageAccounts_QueueService_SpecGenerator returns a generator of StorageAccounts_QueueService_Spec instances for property testing. +func StorageAccounts_QueueService_SpecGenerator() gopter.Gen { + if storageAccounts_QueueService_SpecGenerator != nil { + return storageAccounts_QueueService_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Spec(generators) + storageAccounts_QueueService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_Spec{}), generators) + + return storageAccounts_QueueService_SpecGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_Spec(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRulesGenerator()) +} + +func Test_StorageAccounts_QueueService_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_QueueService_STATUS to StorageAccounts_QueueService_STATUS via AssignProperties_To_StorageAccounts_QueueService_STATUS & AssignProperties_From_StorageAccounts_QueueService_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_QueueService_STATUS, StorageAccounts_QueueService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_QueueService_STATUS tests if a specific instance of StorageAccounts_QueueService_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_QueueService_STATUS(subject StorageAccounts_QueueService_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_QueueService_STATUS + err := copied.AssignProperties_To_StorageAccounts_QueueService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_QueueService_STATUS + err = actual.AssignProperties_From_StorageAccounts_QueueService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_QueueService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueService_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueService_STATUS, StorageAccounts_QueueService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueService_STATUS runs a test to see if a specific instance of StorageAccounts_QueueService_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueService_STATUS(subject StorageAccounts_QueueService_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueService_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueService_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_QueueService_STATUSGenerator() +var storageAccounts_QueueService_STATUSGenerator gopter.Gen + +// StorageAccounts_QueueService_STATUSGenerator returns a generator of StorageAccounts_QueueService_STATUS instances for property testing. +// We first initialize storageAccounts_QueueService_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_QueueService_STATUSGenerator() gopter.Gen { + if storageAccounts_QueueService_STATUSGenerator != nil { + return storageAccounts_QueueService_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_STATUS(generators) + storageAccounts_QueueService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_STATUS(generators) + storageAccounts_QueueService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueService_STATUS{}), generators) + + return storageAccounts_QueueService_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_QueueService_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_QueueService_STATUS(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRules_STATUSGenerator()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_spec_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_spec_arm_types_gen.go new file mode 100644 index 00000000000..747c9c66d90 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_spec_arm_types_gen.go @@ -0,0 +1,35 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type StorageAccounts_QueueServices_Queue_Spec_ARM struct { + Name string `json:"name,omitempty"` + + // Properties: Queue resource properties. + Properties *QueueProperties_ARM `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &StorageAccounts_QueueServices_Queue_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (queue StorageAccounts_QueueServices_Queue_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (queue *StorageAccounts_QueueServices_Queue_Spec_ARM) GetName() string { + return queue.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/queueServices/queues" +func (queue *StorageAccounts_QueueServices_Queue_Spec_ARM) GetType() string { + return "Microsoft.Storage/storageAccounts/queueServices/queues" +} + +type QueueProperties_ARM struct { + // Metadata: A name-value pair that represents queue metadata. + Metadata map[string]string `json:"metadata"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_spec_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_spec_arm_types_gen_test.go new file mode 100644 index 00000000000..e131ecac2cb --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_spec_arm_types_gen_test.go @@ -0,0 +1,154 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_QueueServices_Queue_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueServices_Queue_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_Spec_ARM, StorageAccounts_QueueServices_Queue_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_Spec_ARM runs a test to see if a specific instance of StorageAccounts_QueueServices_Queue_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_Spec_ARM(subject StorageAccounts_QueueServices_Queue_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueServices_Queue_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueServices_Queue_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_QueueServices_Queue_Spec_ARMGenerator() +var storageAccounts_QueueServices_Queue_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_QueueServices_Queue_Spec_ARMGenerator returns a generator of StorageAccounts_QueueServices_Queue_Spec_ARM instances for property testing. +// We first initialize storageAccounts_QueueServices_Queue_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_QueueServices_Queue_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_QueueServices_Queue_Spec_ARMGenerator != nil { + return storageAccounts_QueueServices_Queue_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec_ARM(generators) + storageAccounts_QueueServices_Queue_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueServices_Queue_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec_ARM(generators) + storageAccounts_QueueServices_Queue_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueServices_Queue_Spec_ARM{}), generators) + + return storageAccounts_QueueServices_Queue_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(QueueProperties_ARMGenerator()) +} + +func Test_QueueProperties_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of QueueProperties_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForQueueProperties_ARM, QueueProperties_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForQueueProperties_ARM runs a test to see if a specific instance of QueueProperties_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForQueueProperties_ARM(subject QueueProperties_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual QueueProperties_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of QueueProperties_ARM instances for property testing - lazily instantiated by +// QueueProperties_ARMGenerator() +var queueProperties_ARMGenerator gopter.Gen + +// QueueProperties_ARMGenerator returns a generator of QueueProperties_ARM instances for property testing. +func QueueProperties_ARMGenerator() gopter.Gen { + if queueProperties_ARMGenerator != nil { + return queueProperties_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForQueueProperties_ARM(generators) + queueProperties_ARMGenerator = gen.Struct(reflect.TypeOf(QueueProperties_ARM{}), generators) + + return queueProperties_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForQueueProperties_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForQueueProperties_ARM(gens map[string]gopter.Gen) { + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_status_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_status_arm_types_gen.go new file mode 100644 index 00000000000..6affc86a335 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_status_arm_types_gen.go @@ -0,0 +1,28 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +type StorageAccounts_QueueServices_Queue_STATUS_ARM struct { + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Properties: Queue resource properties. + Properties *QueueProperties_STATUS_ARM `json:"properties,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +type QueueProperties_STATUS_ARM struct { + // ApproximateMessageCount: Integer indicating an approximate number of messages in the queue. This number is not lower + // than the actual number of messages in the queue, but could be higher. + ApproximateMessageCount *int `json:"approximateMessageCount,omitempty"` + + // Metadata: A name-value pair that represents queue metadata. + Metadata map[string]string `json:"metadata"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_status_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_status_arm_types_gen_test.go new file mode 100644 index 00000000000..9f2f937a894 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_status_arm_types_gen_test.go @@ -0,0 +1,157 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_QueueServices_Queue_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueServices_Queue_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_STATUS_ARM, StorageAccounts_QueueServices_Queue_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_QueueServices_Queue_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_STATUS_ARM(subject StorageAccounts_QueueServices_Queue_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueServices_Queue_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueServices_Queue_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccounts_QueueServices_Queue_STATUS_ARMGenerator() +var storageAccounts_QueueServices_Queue_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_QueueServices_Queue_STATUS_ARMGenerator returns a generator of StorageAccounts_QueueServices_Queue_STATUS_ARM instances for property testing. +// We first initialize storageAccounts_QueueServices_Queue_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_QueueServices_Queue_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_QueueServices_Queue_STATUS_ARMGenerator != nil { + return storageAccounts_QueueServices_Queue_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS_ARM(generators) + storageAccounts_QueueServices_Queue_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueServices_Queue_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS_ARM(generators) + storageAccounts_QueueServices_Queue_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueServices_Queue_STATUS_ARM{}), generators) + + return storageAccounts_QueueServices_Queue_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(QueueProperties_STATUS_ARMGenerator()) +} + +func Test_QueueProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of QueueProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForQueueProperties_STATUS_ARM, QueueProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForQueueProperties_STATUS_ARM runs a test to see if a specific instance of QueueProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForQueueProperties_STATUS_ARM(subject QueueProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual QueueProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of QueueProperties_STATUS_ARM instances for property testing - lazily instantiated by +// QueueProperties_STATUS_ARMGenerator() +var queueProperties_STATUS_ARMGenerator gopter.Gen + +// QueueProperties_STATUS_ARMGenerator returns a generator of QueueProperties_STATUS_ARM instances for property testing. +func QueueProperties_STATUS_ARMGenerator() gopter.Gen { + if queueProperties_STATUS_ARMGenerator != nil { + return queueProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForQueueProperties_STATUS_ARM(generators) + queueProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(QueueProperties_STATUS_ARM{}), generators) + + return queueProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForQueueProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForQueueProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ApproximateMessageCount"] = gen.PtrOf(gen.Int()) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_types_gen.go new file mode 100644 index 00000000000..f040e5c3aa2 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_types_gen.go @@ -0,0 +1,720 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/queue.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName} +type StorageAccountsQueueServicesQueue struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_QueueServices_Queue_Spec `json:"spec,omitempty"` + Status StorageAccounts_QueueServices_Queue_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsQueueServicesQueue{} + +// GetConditions returns the conditions of the resource +func (queue *StorageAccountsQueueServicesQueue) GetConditions() conditions.Conditions { + return queue.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (queue *StorageAccountsQueueServicesQueue) SetConditions(conditions conditions.Conditions) { + queue.Status.Conditions = conditions +} + +var _ conversion.Convertible = &StorageAccountsQueueServicesQueue{} + +// ConvertFrom populates our StorageAccountsQueueServicesQueue from the provided hub StorageAccountsQueueServicesQueue +func (queue *StorageAccountsQueueServicesQueue) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsQueueServicesQueue) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsQueueServicesQueue but received %T instead", hub) + } + + return queue.AssignProperties_From_StorageAccountsQueueServicesQueue(source) +} + +// ConvertTo populates the provided hub StorageAccountsQueueServicesQueue from our StorageAccountsQueueServicesQueue +func (queue *StorageAccountsQueueServicesQueue) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsQueueServicesQueue) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsQueueServicesQueue but received %T instead", hub) + } + + return queue.AssignProperties_To_StorageAccountsQueueServicesQueue(destination) +} + +// +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20230101-storageaccountsqueueservicesqueue,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsqueueservicesqueues,verbs=create;update,versions=v1api20230101,name=default.v1api20230101.storageaccountsqueueservicesqueues.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &StorageAccountsQueueServicesQueue{} + +// Default applies defaults to the StorageAccountsQueueServicesQueue resource +func (queue *StorageAccountsQueueServicesQueue) Default() { + queue.defaultImpl() + var temp any = queue + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (queue *StorageAccountsQueueServicesQueue) defaultAzureName() { + if queue.Spec.AzureName == "" { + queue.Spec.AzureName = queue.Name + } +} + +// defaultImpl applies the code generated defaults to the StorageAccountsQueueServicesQueue resource +func (queue *StorageAccountsQueueServicesQueue) defaultImpl() { queue.defaultAzureName() } + +var _ genruntime.ImportableResource = &StorageAccountsQueueServicesQueue{} + +// InitializeSpec initializes the spec for this resource from the given status +func (queue *StorageAccountsQueueServicesQueue) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*StorageAccounts_QueueServices_Queue_STATUS); ok { + return queue.Spec.Initialize_From_StorageAccounts_QueueServices_Queue_STATUS(s) + } + + return fmt.Errorf("expected Status of type StorageAccounts_QueueServices_Queue_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &StorageAccountsQueueServicesQueue{} + +// AzureName returns the Azure name of the resource +func (queue *StorageAccountsQueueServicesQueue) AzureName() string { + return queue.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (queue StorageAccountsQueueServicesQueue) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (queue *StorageAccountsQueueServicesQueue) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (queue *StorageAccountsQueueServicesQueue) GetSpec() genruntime.ConvertibleSpec { + return &queue.Spec +} + +// GetStatus returns the status of this resource +func (queue *StorageAccountsQueueServicesQueue) GetStatus() genruntime.ConvertibleStatus { + return &queue.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (queue *StorageAccountsQueueServicesQueue) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/queueServices/queues" +func (queue *StorageAccountsQueueServicesQueue) GetType() string { + return "Microsoft.Storage/storageAccounts/queueServices/queues" +} + +// NewEmptyStatus returns a new empty (blank) status +func (queue *StorageAccountsQueueServicesQueue) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_QueueServices_Queue_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (queue *StorageAccountsQueueServicesQueue) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(queue.Spec) + return queue.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (queue *StorageAccountsQueueServicesQueue) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_QueueServices_Queue_STATUS); ok { + queue.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_QueueServices_Queue_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + queue.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-storage-azure-com-v1api20230101-storageaccountsqueueservicesqueue,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountsqueueservicesqueues,verbs=create;update,versions=v1api20230101,name=validate.v1api20230101.storageaccountsqueueservicesqueues.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &StorageAccountsQueueServicesQueue{} + +// ValidateCreate validates the creation of the resource +func (queue *StorageAccountsQueueServicesQueue) ValidateCreate() (admission.Warnings, error) { + validations := queue.createValidations() + var temp any = queue + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (queue *StorageAccountsQueueServicesQueue) ValidateDelete() (admission.Warnings, error) { + validations := queue.deleteValidations() + var temp any = queue + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (queue *StorageAccountsQueueServicesQueue) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := queue.updateValidations() + var temp any = queue + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (queue *StorageAccountsQueueServicesQueue) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){queue.validateResourceReferences, queue.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (queue *StorageAccountsQueueServicesQueue) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (queue *StorageAccountsQueueServicesQueue) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return queue.validateResourceReferences() + }, + queue.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return queue.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (queue *StorageAccountsQueueServicesQueue) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(queue) +} + +// validateResourceReferences validates all resource references +func (queue *StorageAccountsQueueServicesQueue) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&queue.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (queue *StorageAccountsQueueServicesQueue) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*StorageAccountsQueueServicesQueue) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, queue) +} + +// AssignProperties_From_StorageAccountsQueueServicesQueue populates our StorageAccountsQueueServicesQueue from the provided source StorageAccountsQueueServicesQueue +func (queue *StorageAccountsQueueServicesQueue) AssignProperties_From_StorageAccountsQueueServicesQueue(source *v20230101s.StorageAccountsQueueServicesQueue) error { + + // ObjectMeta + queue.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_QueueServices_Queue_Spec + err := spec.AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec() to populate field Spec") + } + queue.Spec = spec + + // Status + var status StorageAccounts_QueueServices_Queue_STATUS + err = status.AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS() to populate field Status") + } + queue.Status = status + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsQueueServicesQueue populates the provided destination StorageAccountsQueueServicesQueue from our StorageAccountsQueueServicesQueue +func (queue *StorageAccountsQueueServicesQueue) AssignProperties_To_StorageAccountsQueueServicesQueue(destination *v20230101s.StorageAccountsQueueServicesQueue) error { + + // ObjectMeta + destination.ObjectMeta = *queue.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_QueueServices_Queue_Spec + err := queue.Spec.AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_QueueServices_Queue_STATUS + err = queue.Status.AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (queue *StorageAccountsQueueServicesQueue) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: queue.Spec.OriginalVersion(), + Kind: "StorageAccountsQueueServicesQueue", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/queue.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName} +type StorageAccountsQueueServicesQueueList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsQueueServicesQueue `json:"items"` +} + +type StorageAccounts_QueueServices_Queue_Spec struct { + // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:MinLength=3 + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // Metadata: A name-value pair that represents queue metadata. + Metadata map[string]string `json:"metadata,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccountsQueueService resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccountsQueueService"` +} + +var _ genruntime.ARMTransformer = &StorageAccounts_QueueServices_Queue_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (queue *StorageAccounts_QueueServices_Queue_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if queue == nil { + return nil, nil + } + result := &StorageAccounts_QueueServices_Queue_Spec_ARM{} + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if queue.Metadata != nil { + result.Properties = &QueueProperties_ARM{} + } + if queue.Metadata != nil { + result.Properties.Metadata = make(map[string]string, len(queue.Metadata)) + for key, value := range queue.Metadata { + result.Properties.Metadata[key] = value + } + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (queue *StorageAccounts_QueueServices_Queue_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_QueueServices_Queue_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (queue *StorageAccounts_QueueServices_Queue_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_QueueServices_Queue_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_QueueServices_Queue_Spec_ARM, got %T", armInput) + } + + // Set property "AzureName": + queue.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Metadata": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Metadata != nil { + queue.Metadata = make(map[string]string, len(typedInput.Properties.Metadata)) + for key, value := range typedInput.Properties.Metadata { + queue.Metadata[key] = value + } + } + } + + // Set property "Owner": + queue.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_QueueServices_Queue_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_QueueServices_Queue_Spec from the provided source +func (queue *StorageAccounts_QueueServices_Queue_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20230101s.StorageAccounts_QueueServices_Queue_Spec) + if ok { + // Populate our instance from source + return queue.AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_QueueServices_Queue_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = queue.AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_QueueServices_Queue_Spec +func (queue *StorageAccounts_QueueServices_Queue_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20230101s.StorageAccounts_QueueServices_Queue_Spec) + if ok { + // Populate destination from our instance + return queue.AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_QueueServices_Queue_Spec{} + err := queue.AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec populates our StorageAccounts_QueueServices_Queue_Spec from the provided source StorageAccounts_QueueServices_Queue_Spec +func (queue *StorageAccounts_QueueServices_Queue_Spec) AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec(source *v20230101s.StorageAccounts_QueueServices_Queue_Spec) error { + + // AzureName + queue.AzureName = source.AzureName + + // Metadata + queue.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + queue.Owner = &owner + } else { + queue.Owner = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec populates the provided destination StorageAccounts_QueueServices_Queue_Spec from our StorageAccounts_QueueServices_Queue_Spec +func (queue *StorageAccounts_QueueServices_Queue_Spec) AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec(destination *v20230101s.StorageAccounts_QueueServices_Queue_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AzureName + destination.AzureName = queue.AzureName + + // Metadata + destination.Metadata = genruntime.CloneMapOfStringToString(queue.Metadata) + + // OriginalVersion + destination.OriginalVersion = queue.OriginalVersion() + + // Owner + if queue.Owner != nil { + owner := queue.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_StorageAccounts_QueueServices_Queue_STATUS populates our StorageAccounts_QueueServices_Queue_Spec from the provided source StorageAccounts_QueueServices_Queue_STATUS +func (queue *StorageAccounts_QueueServices_Queue_Spec) Initialize_From_StorageAccounts_QueueServices_Queue_STATUS(source *StorageAccounts_QueueServices_Queue_STATUS) error { + + // Metadata + queue.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (queue *StorageAccounts_QueueServices_Queue_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (queue *StorageAccounts_QueueServices_Queue_Spec) SetAzureName(azureName string) { + queue.AzureName = azureName +} + +type StorageAccounts_QueueServices_Queue_STATUS struct { + // ApproximateMessageCount: Integer indicating an approximate number of messages in the queue. This number is not lower + // than the actual number of messages in the queue, but could be higher. + ApproximateMessageCount *int `json:"approximateMessageCount,omitempty"` + + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Metadata: A name-value pair that represents queue metadata. + Metadata map[string]string `json:"metadata,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_QueueServices_Queue_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_QueueServices_Queue_STATUS from the provided source +func (queue *StorageAccounts_QueueServices_Queue_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20230101s.StorageAccounts_QueueServices_Queue_STATUS) + if ok { + // Populate our instance from source + return queue.AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_QueueServices_Queue_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = queue.AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_QueueServices_Queue_STATUS +func (queue *StorageAccounts_QueueServices_Queue_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20230101s.StorageAccounts_QueueServices_Queue_STATUS) + if ok { + // Populate destination from our instance + return queue.AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_QueueServices_Queue_STATUS{} + err := queue.AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &StorageAccounts_QueueServices_Queue_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (queue *StorageAccounts_QueueServices_Queue_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_QueueServices_Queue_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (queue *StorageAccounts_QueueServices_Queue_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_QueueServices_Queue_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_QueueServices_Queue_STATUS_ARM, got %T", armInput) + } + + // Set property "ApproximateMessageCount": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ApproximateMessageCount != nil { + approximateMessageCount := *typedInput.Properties.ApproximateMessageCount + queue.ApproximateMessageCount = &approximateMessageCount + } + } + + // no assignment for property "Conditions" + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + queue.Id = &id + } + + // Set property "Metadata": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Metadata != nil { + queue.Metadata = make(map[string]string, len(typedInput.Properties.Metadata)) + for key, value := range typedInput.Properties.Metadata { + queue.Metadata[key] = value + } + } + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + queue.Name = &name + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + queue.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS populates our StorageAccounts_QueueServices_Queue_STATUS from the provided source StorageAccounts_QueueServices_Queue_STATUS +func (queue *StorageAccounts_QueueServices_Queue_STATUS) AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS(source *v20230101s.StorageAccounts_QueueServices_Queue_STATUS) error { + + // ApproximateMessageCount + queue.ApproximateMessageCount = genruntime.ClonePointerToInt(source.ApproximateMessageCount) + + // Conditions + queue.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Id + queue.Id = genruntime.ClonePointerToString(source.Id) + + // Metadata + queue.Metadata = genruntime.CloneMapOfStringToString(source.Metadata) + + // Name + queue.Name = genruntime.ClonePointerToString(source.Name) + + // Type + queue.Type = genruntime.ClonePointerToString(source.Type) + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS populates the provided destination StorageAccounts_QueueServices_Queue_STATUS from our StorageAccounts_QueueServices_Queue_STATUS +func (queue *StorageAccounts_QueueServices_Queue_STATUS) AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS(destination *v20230101s.StorageAccounts_QueueServices_Queue_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ApproximateMessageCount + destination.ApproximateMessageCount = genruntime.ClonePointerToInt(queue.ApproximateMessageCount) + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(queue.Conditions) + + // Id + destination.Id = genruntime.ClonePointerToString(queue.Id) + + // Metadata + destination.Metadata = genruntime.CloneMapOfStringToString(queue.Metadata) + + // Name + destination.Name = genruntime.ClonePointerToString(queue.Name) + + // Type + destination.Type = genruntime.ClonePointerToString(queue.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&StorageAccountsQueueServicesQueue{}, &StorageAccountsQueueServicesQueueList{}) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_types_gen_test.go new file mode 100644 index 00000000000..9ef3edc9e75 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_queue_services_queue_types_gen_test.go @@ -0,0 +1,377 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsQueueServicesQueue_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsQueueServicesQueue to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsQueueServicesQueue, StorageAccountsQueueServicesQueueGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsQueueServicesQueue tests if a specific instance of StorageAccountsQueueServicesQueue round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsQueueServicesQueue(subject StorageAccountsQueueServicesQueue) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsQueueServicesQueue + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsQueueServicesQueue + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsQueueServicesQueue_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsQueueServicesQueue to StorageAccountsQueueServicesQueue via AssignProperties_To_StorageAccountsQueueServicesQueue & AssignProperties_From_StorageAccountsQueueServicesQueue returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsQueueServicesQueue, StorageAccountsQueueServicesQueueGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsQueueServicesQueue tests if a specific instance of StorageAccountsQueueServicesQueue can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsQueueServicesQueue(subject StorageAccountsQueueServicesQueue) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsQueueServicesQueue + err := copied.AssignProperties_To_StorageAccountsQueueServicesQueue(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsQueueServicesQueue + err = actual.AssignProperties_From_StorageAccountsQueueServicesQueue(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsQueueServicesQueue_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsQueueServicesQueue via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsQueueServicesQueue, StorageAccountsQueueServicesQueueGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsQueueServicesQueue runs a test to see if a specific instance of StorageAccountsQueueServicesQueue round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsQueueServicesQueue(subject StorageAccountsQueueServicesQueue) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsQueueServicesQueue + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsQueueServicesQueue instances for property testing - lazily instantiated by +// StorageAccountsQueueServicesQueueGenerator() +var storageAccountsQueueServicesQueueGenerator gopter.Gen + +// StorageAccountsQueueServicesQueueGenerator returns a generator of StorageAccountsQueueServicesQueue instances for property testing. +func StorageAccountsQueueServicesQueueGenerator() gopter.Gen { + if storageAccountsQueueServicesQueueGenerator != nil { + return storageAccountsQueueServicesQueueGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsQueueServicesQueue(generators) + storageAccountsQueueServicesQueueGenerator = gen.Struct(reflect.TypeOf(StorageAccountsQueueServicesQueue{}), generators) + + return storageAccountsQueueServicesQueueGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsQueueServicesQueue is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsQueueServicesQueue(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_QueueServices_Queue_SpecGenerator() + gens["Status"] = StorageAccounts_QueueServices_Queue_STATUSGenerator() +} + +func Test_StorageAccounts_QueueServices_Queue_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_QueueServices_Queue_Spec to StorageAccounts_QueueServices_Queue_Spec via AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec & AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_QueueServices_Queue_Spec, StorageAccounts_QueueServices_Queue_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_QueueServices_Queue_Spec tests if a specific instance of StorageAccounts_QueueServices_Queue_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_QueueServices_Queue_Spec(subject StorageAccounts_QueueServices_Queue_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_QueueServices_Queue_Spec + err := copied.AssignProperties_To_StorageAccounts_QueueServices_Queue_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_QueueServices_Queue_Spec + err = actual.AssignProperties_From_StorageAccounts_QueueServices_Queue_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_QueueServices_Queue_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueServices_Queue_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_Spec, StorageAccounts_QueueServices_Queue_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_Spec runs a test to see if a specific instance of StorageAccounts_QueueServices_Queue_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_Spec(subject StorageAccounts_QueueServices_Queue_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueServices_Queue_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueServices_Queue_Spec instances for property testing - lazily instantiated by +// StorageAccounts_QueueServices_Queue_SpecGenerator() +var storageAccounts_QueueServices_Queue_SpecGenerator gopter.Gen + +// StorageAccounts_QueueServices_Queue_SpecGenerator returns a generator of StorageAccounts_QueueServices_Queue_Spec instances for property testing. +func StorageAccounts_QueueServices_Queue_SpecGenerator() gopter.Gen { + if storageAccounts_QueueServices_Queue_SpecGenerator != nil { + return storageAccounts_QueueServices_Queue_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec(generators) + storageAccounts_QueueServices_Queue_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueServices_Queue_Spec{}), generators) + + return storageAccounts_QueueServices_Queue_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_Spec(gens map[string]gopter.Gen) { + gens["AzureName"] = gen.AlphaString() + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) +} + +func Test_StorageAccounts_QueueServices_Queue_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_QueueServices_Queue_STATUS to StorageAccounts_QueueServices_Queue_STATUS via AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS & AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_QueueServices_Queue_STATUS, StorageAccounts_QueueServices_Queue_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_QueueServices_Queue_STATUS tests if a specific instance of StorageAccounts_QueueServices_Queue_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_QueueServices_Queue_STATUS(subject StorageAccounts_QueueServices_Queue_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_QueueServices_Queue_STATUS + err := copied.AssignProperties_To_StorageAccounts_QueueServices_Queue_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_QueueServices_Queue_STATUS + err = actual.AssignProperties_From_StorageAccounts_QueueServices_Queue_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_QueueServices_Queue_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_QueueServices_Queue_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_STATUS, StorageAccounts_QueueServices_Queue_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_STATUS runs a test to see if a specific instance of StorageAccounts_QueueServices_Queue_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_QueueServices_Queue_STATUS(subject StorageAccounts_QueueServices_Queue_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_QueueServices_Queue_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_QueueServices_Queue_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_QueueServices_Queue_STATUSGenerator() +var storageAccounts_QueueServices_Queue_STATUSGenerator gopter.Gen + +// StorageAccounts_QueueServices_Queue_STATUSGenerator returns a generator of StorageAccounts_QueueServices_Queue_STATUS instances for property testing. +func StorageAccounts_QueueServices_Queue_STATUSGenerator() gopter.Gen { + if storageAccounts_QueueServices_Queue_STATUSGenerator != nil { + return storageAccounts_QueueServices_Queue_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS(generators) + storageAccounts_QueueServices_Queue_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_QueueServices_Queue_STATUS{}), generators) + + return storageAccounts_QueueServices_Queue_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_QueueServices_Queue_STATUS(gens map[string]gopter.Gen) { + gens["ApproximateMessageCount"] = gen.PtrOf(gen.Int()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Metadata"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_table_service_spec_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_table_service_spec_arm_types_gen.go new file mode 100644 index 00000000000..a51c6c5739b --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_table_service_spec_arm_types_gen.go @@ -0,0 +1,37 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type StorageAccounts_TableService_Spec_ARM struct { + Name string `json:"name,omitempty"` + + // Properties: The properties of a storage account’s Table service. + Properties *StorageAccounts_TableService_Properties_Spec_ARM `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &StorageAccounts_TableService_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (service StorageAccounts_TableService_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (service *StorageAccounts_TableService_Spec_ARM) GetName() string { + return service.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/tableServices" +func (service *StorageAccounts_TableService_Spec_ARM) GetType() string { + return "Microsoft.Storage/storageAccounts/tableServices" +} + +type StorageAccounts_TableService_Properties_Spec_ARM struct { + // Cors: Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // Table service. + Cors *CorsRules_ARM `json:"cors,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_table_service_spec_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_table_service_spec_arm_types_gen_test.go new file mode 100644 index 00000000000..545d4abc746 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_table_service_spec_arm_types_gen_test.go @@ -0,0 +1,154 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_TableService_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableService_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableService_Spec_ARM, StorageAccounts_TableService_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableService_Spec_ARM runs a test to see if a specific instance of StorageAccounts_TableService_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableService_Spec_ARM(subject StorageAccounts_TableService_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableService_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableService_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_TableService_Spec_ARMGenerator() +var storageAccounts_TableService_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_TableService_Spec_ARMGenerator returns a generator of StorageAccounts_TableService_Spec_ARM instances for property testing. +// We first initialize storageAccounts_TableService_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_TableService_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_TableService_Spec_ARMGenerator != nil { + return storageAccounts_TableService_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableService_Spec_ARM(generators) + storageAccounts_TableService_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableService_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Spec_ARM(generators) + storageAccounts_TableService_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_Spec_ARM{}), generators) + + return storageAccounts_TableService_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_TableService_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_TableService_Spec_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Spec_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(StorageAccounts_TableService_Properties_Spec_ARMGenerator()) +} + +func Test_StorageAccounts_TableService_Properties_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableService_Properties_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableService_Properties_Spec_ARM, StorageAccounts_TableService_Properties_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableService_Properties_Spec_ARM runs a test to see if a specific instance of StorageAccounts_TableService_Properties_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableService_Properties_Spec_ARM(subject StorageAccounts_TableService_Properties_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableService_Properties_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableService_Properties_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_TableService_Properties_Spec_ARMGenerator() +var storageAccounts_TableService_Properties_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_TableService_Properties_Spec_ARMGenerator returns a generator of StorageAccounts_TableService_Properties_Spec_ARM instances for property testing. +func StorageAccounts_TableService_Properties_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_TableService_Properties_Spec_ARMGenerator != nil { + return storageAccounts_TableService_Properties_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Properties_Spec_ARM(generators) + storageAccounts_TableService_Properties_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_Properties_Spec_ARM{}), generators) + + return storageAccounts_TableService_Properties_Spec_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Properties_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Properties_Spec_ARM(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRules_ARMGenerator()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_table_service_status_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_table_service_status_arm_types_gen.go new file mode 100644 index 00000000000..fbf3763d81e --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_table_service_status_arm_types_gen.go @@ -0,0 +1,26 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +type StorageAccounts_TableService_STATUS_ARM struct { + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Properties: The properties of a storage account’s Table service. + Properties *StorageAccounts_TableService_Properties_STATUS_ARM `json:"properties,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +type StorageAccounts_TableService_Properties_STATUS_ARM struct { + // Cors: Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // Table service. + Cors *CorsRules_STATUS_ARM `json:"cors,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_table_service_status_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_table_service_status_arm_types_gen_test.go new file mode 100644 index 00000000000..eec3b9fa05c --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_table_service_status_arm_types_gen_test.go @@ -0,0 +1,156 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_TableService_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableService_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableService_STATUS_ARM, StorageAccounts_TableService_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableService_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_TableService_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableService_STATUS_ARM(subject StorageAccounts_TableService_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableService_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableService_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccounts_TableService_STATUS_ARMGenerator() +var storageAccounts_TableService_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_TableService_STATUS_ARMGenerator returns a generator of StorageAccounts_TableService_STATUS_ARM instances for property testing. +// We first initialize storageAccounts_TableService_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_TableService_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_TableService_STATUS_ARMGenerator != nil { + return storageAccounts_TableService_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableService_STATUS_ARM(generators) + storageAccounts_TableService_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableService_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_TableService_STATUS_ARM(generators) + storageAccounts_TableService_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_STATUS_ARM{}), generators) + + return storageAccounts_TableService_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_TableService_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_TableService_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableService_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableService_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(StorageAccounts_TableService_Properties_STATUS_ARMGenerator()) +} + +func Test_StorageAccounts_TableService_Properties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableService_Properties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableService_Properties_STATUS_ARM, StorageAccounts_TableService_Properties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableService_Properties_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_TableService_Properties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableService_Properties_STATUS_ARM(subject StorageAccounts_TableService_Properties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableService_Properties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableService_Properties_STATUS_ARM instances for property testing - lazily instantiated +// by StorageAccounts_TableService_Properties_STATUS_ARMGenerator() +var storageAccounts_TableService_Properties_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_TableService_Properties_STATUS_ARMGenerator returns a generator of StorageAccounts_TableService_Properties_STATUS_ARM instances for property testing. +func StorageAccounts_TableService_Properties_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_TableService_Properties_STATUS_ARMGenerator != nil { + return storageAccounts_TableService_Properties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Properties_STATUS_ARM(generators) + storageAccounts_TableService_Properties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_Properties_STATUS_ARM{}), generators) + + return storageAccounts_TableService_Properties_STATUS_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Properties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Properties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRules_STATUS_ARMGenerator()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_table_service_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_table_service_types_gen.go new file mode 100644 index 00000000000..31cbd192122 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_table_service_types_gen.go @@ -0,0 +1,730 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/table.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default +type StorageAccountsTableService struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_TableService_Spec `json:"spec,omitempty"` + Status StorageAccounts_TableService_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsTableService{} + +// GetConditions returns the conditions of the resource +func (service *StorageAccountsTableService) GetConditions() conditions.Conditions { + return service.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (service *StorageAccountsTableService) SetConditions(conditions conditions.Conditions) { + service.Status.Conditions = conditions +} + +var _ conversion.Convertible = &StorageAccountsTableService{} + +// ConvertFrom populates our StorageAccountsTableService from the provided hub StorageAccountsTableService +func (service *StorageAccountsTableService) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsTableService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsTableService but received %T instead", hub) + } + + return service.AssignProperties_From_StorageAccountsTableService(source) +} + +// ConvertTo populates the provided hub StorageAccountsTableService from our StorageAccountsTableService +func (service *StorageAccountsTableService) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsTableService) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsTableService but received %T instead", hub) + } + + return service.AssignProperties_To_StorageAccountsTableService(destination) +} + +// +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20230101-storageaccountstableservice,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountstableservices,verbs=create;update,versions=v1api20230101,name=default.v1api20230101.storageaccountstableservices.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &StorageAccountsTableService{} + +// Default applies defaults to the StorageAccountsTableService resource +func (service *StorageAccountsTableService) Default() { + service.defaultImpl() + var temp any = service + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultImpl applies the code generated defaults to the StorageAccountsTableService resource +func (service *StorageAccountsTableService) defaultImpl() {} + +var _ genruntime.ImportableResource = &StorageAccountsTableService{} + +// InitializeSpec initializes the spec for this resource from the given status +func (service *StorageAccountsTableService) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*StorageAccounts_TableService_STATUS); ok { + return service.Spec.Initialize_From_StorageAccounts_TableService_STATUS(s) + } + + return fmt.Errorf("expected Status of type StorageAccounts_TableService_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &StorageAccountsTableService{} + +// AzureName returns the Azure name of the resource (always "default") +func (service *StorageAccountsTableService) AzureName() string { + return "default" +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (service StorageAccountsTableService) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (service *StorageAccountsTableService) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (service *StorageAccountsTableService) GetSpec() genruntime.ConvertibleSpec { + return &service.Spec +} + +// GetStatus returns the status of this resource +func (service *StorageAccountsTableService) GetStatus() genruntime.ConvertibleStatus { + return &service.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (service *StorageAccountsTableService) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/tableServices" +func (service *StorageAccountsTableService) GetType() string { + return "Microsoft.Storage/storageAccounts/tableServices" +} + +// NewEmptyStatus returns a new empty (blank) status +func (service *StorageAccountsTableService) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_TableService_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (service *StorageAccountsTableService) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(service.Spec) + return service.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (service *StorageAccountsTableService) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_TableService_STATUS); ok { + service.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_TableService_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + service.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-storage-azure-com-v1api20230101-storageaccountstableservice,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountstableservices,verbs=create;update,versions=v1api20230101,name=validate.v1api20230101.storageaccountstableservices.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &StorageAccountsTableService{} + +// ValidateCreate validates the creation of the resource +func (service *StorageAccountsTableService) ValidateCreate() (admission.Warnings, error) { + validations := service.createValidations() + var temp any = service + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (service *StorageAccountsTableService) ValidateDelete() (admission.Warnings, error) { + validations := service.deleteValidations() + var temp any = service + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (service *StorageAccountsTableService) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := service.updateValidations() + var temp any = service + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (service *StorageAccountsTableService) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){service.validateResourceReferences, service.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (service *StorageAccountsTableService) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (service *StorageAccountsTableService) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return service.validateResourceReferences() + }, + service.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return service.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (service *StorageAccountsTableService) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(service) +} + +// validateResourceReferences validates all resource references +func (service *StorageAccountsTableService) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&service.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (service *StorageAccountsTableService) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*StorageAccountsTableService) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, service) +} + +// AssignProperties_From_StorageAccountsTableService populates our StorageAccountsTableService from the provided source StorageAccountsTableService +func (service *StorageAccountsTableService) AssignProperties_From_StorageAccountsTableService(source *v20230101s.StorageAccountsTableService) error { + + // ObjectMeta + service.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_TableService_Spec + err := spec.AssignProperties_From_StorageAccounts_TableService_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_TableService_Spec() to populate field Spec") + } + service.Spec = spec + + // Status + var status StorageAccounts_TableService_STATUS + err = status.AssignProperties_From_StorageAccounts_TableService_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_TableService_STATUS() to populate field Status") + } + service.Status = status + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsTableService populates the provided destination StorageAccountsTableService from our StorageAccountsTableService +func (service *StorageAccountsTableService) AssignProperties_To_StorageAccountsTableService(destination *v20230101s.StorageAccountsTableService) error { + + // ObjectMeta + destination.ObjectMeta = *service.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_TableService_Spec + err := service.Spec.AssignProperties_To_StorageAccounts_TableService_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_TableService_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_TableService_STATUS + err = service.Status.AssignProperties_To_StorageAccounts_TableService_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_TableService_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (service *StorageAccountsTableService) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: service.Spec.OriginalVersion(), + Kind: "StorageAccountsTableService", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/table.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default +type StorageAccountsTableServiceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsTableService `json:"items"` +} + +type StorageAccounts_TableService_Spec struct { + // Cors: Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // Table service. + Cors *CorsRules `json:"cors,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccount resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccount"` +} + +var _ genruntime.ARMTransformer = &StorageAccounts_TableService_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (service *StorageAccounts_TableService_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if service == nil { + return nil, nil + } + result := &StorageAccounts_TableService_Spec_ARM{} + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if service.Cors != nil { + result.Properties = &StorageAccounts_TableService_Properties_Spec_ARM{} + } + if service.Cors != nil { + cors_ARM, err := (*service.Cors).ConvertToARM(resolved) + if err != nil { + return nil, err + } + cors := *cors_ARM.(*CorsRules_ARM) + result.Properties.Cors = &cors + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (service *StorageAccounts_TableService_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_TableService_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (service *StorageAccounts_TableService_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_TableService_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_TableService_Spec_ARM, got %T", armInput) + } + + // Set property "Cors": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Cors != nil { + var cors1 CorsRules + err := cors1.PopulateFromARM(owner, *typedInput.Properties.Cors) + if err != nil { + return err + } + cors := cors1 + service.Cors = &cors + } + } + + // Set property "Owner": + service.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_TableService_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_TableService_Spec from the provided source +func (service *StorageAccounts_TableService_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20230101s.StorageAccounts_TableService_Spec) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_TableService_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_TableService_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_TableService_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_TableService_Spec +func (service *StorageAccounts_TableService_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20230101s.StorageAccounts_TableService_Spec) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_TableService_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_TableService_Spec{} + err := service.AssignProperties_To_StorageAccounts_TableService_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_TableService_Spec populates our StorageAccounts_TableService_Spec from the provided source StorageAccounts_TableService_Spec +func (service *StorageAccounts_TableService_Spec) AssignProperties_From_StorageAccounts_TableService_Spec(source *v20230101s.StorageAccounts_TableService_Spec) error { + + // Cors + if source.Cors != nil { + var cor CorsRules + err := cor.AssignProperties_From_CorsRules(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + service.Owner = &owner + } else { + service.Owner = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_TableService_Spec populates the provided destination StorageAccounts_TableService_Spec from our StorageAccounts_TableService_Spec +func (service *StorageAccounts_TableService_Spec) AssignProperties_To_StorageAccounts_TableService_Spec(destination *v20230101s.StorageAccounts_TableService_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules + err := service.Cors.AssignProperties_To_CorsRules(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // OriginalVersion + destination.OriginalVersion = service.OriginalVersion() + + // Owner + if service.Owner != nil { + owner := service.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_StorageAccounts_TableService_STATUS populates our StorageAccounts_TableService_Spec from the provided source StorageAccounts_TableService_STATUS +func (service *StorageAccounts_TableService_Spec) Initialize_From_StorageAccounts_TableService_STATUS(source *StorageAccounts_TableService_STATUS) error { + + // Cors + if source.Cors != nil { + var cor CorsRules + err := cor.Initialize_From_CorsRules_STATUS(source.Cors) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_CorsRules_STATUS() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (service *StorageAccounts_TableService_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +type StorageAccounts_TableService_STATUS struct { + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // Cors: Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no + // CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the + // Table service. + Cors *CorsRules_STATUS `json:"cors,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_TableService_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_TableService_STATUS from the provided source +func (service *StorageAccounts_TableService_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20230101s.StorageAccounts_TableService_STATUS) + if ok { + // Populate our instance from source + return service.AssignProperties_From_StorageAccounts_TableService_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_TableService_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = service.AssignProperties_From_StorageAccounts_TableService_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_TableService_STATUS +func (service *StorageAccounts_TableService_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20230101s.StorageAccounts_TableService_STATUS) + if ok { + // Populate destination from our instance + return service.AssignProperties_To_StorageAccounts_TableService_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_TableService_STATUS{} + err := service.AssignProperties_To_StorageAccounts_TableService_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &StorageAccounts_TableService_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (service *StorageAccounts_TableService_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_TableService_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (service *StorageAccounts_TableService_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_TableService_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_TableService_STATUS_ARM, got %T", armInput) + } + + // no assignment for property "Conditions" + + // Set property "Cors": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Cors != nil { + var cors1 CorsRules_STATUS + err := cors1.PopulateFromARM(owner, *typedInput.Properties.Cors) + if err != nil { + return err + } + cors := cors1 + service.Cors = &cors + } + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + service.Id = &id + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + service.Name = &name + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + service.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccounts_TableService_STATUS populates our StorageAccounts_TableService_STATUS from the provided source StorageAccounts_TableService_STATUS +func (service *StorageAccounts_TableService_STATUS) AssignProperties_From_StorageAccounts_TableService_STATUS(source *v20230101s.StorageAccounts_TableService_STATUS) error { + + // Conditions + service.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Cors + if source.Cors != nil { + var cor CorsRules_STATUS + err := cor.AssignProperties_From_CorsRules_STATUS(source.Cors) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_CorsRules_STATUS() to populate field Cors") + } + service.Cors = &cor + } else { + service.Cors = nil + } + + // Id + service.Id = genruntime.ClonePointerToString(source.Id) + + // Name + service.Name = genruntime.ClonePointerToString(source.Name) + + // Type + service.Type = genruntime.ClonePointerToString(source.Type) + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_TableService_STATUS populates the provided destination StorageAccounts_TableService_STATUS from our StorageAccounts_TableService_STATUS +func (service *StorageAccounts_TableService_STATUS) AssignProperties_To_StorageAccounts_TableService_STATUS(destination *v20230101s.StorageAccounts_TableService_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(service.Conditions) + + // Cors + if service.Cors != nil { + var cor v20230101s.CorsRules_STATUS + err := service.Cors.AssignProperties_To_CorsRules_STATUS(&cor) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_CorsRules_STATUS() to populate field Cors") + } + destination.Cors = &cor + } else { + destination.Cors = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(service.Id) + + // Name + destination.Name = genruntime.ClonePointerToString(service.Name) + + // Type + destination.Type = genruntime.ClonePointerToString(service.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&StorageAccountsTableService{}, &StorageAccountsTableServiceList{}) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_table_service_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_table_service_types_gen_test.go new file mode 100644 index 00000000000..38907dfcc99 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_table_service_types_gen_test.go @@ -0,0 +1,388 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsTableService_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsTableService to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsTableService, StorageAccountsTableServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsTableService tests if a specific instance of StorageAccountsTableService round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsTableService(subject StorageAccountsTableService) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsTableService + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsTableService + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsTableService_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsTableService to StorageAccountsTableService via AssignProperties_To_StorageAccountsTableService & AssignProperties_From_StorageAccountsTableService returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsTableService, StorageAccountsTableServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsTableService tests if a specific instance of StorageAccountsTableService can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsTableService(subject StorageAccountsTableService) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsTableService + err := copied.AssignProperties_To_StorageAccountsTableService(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsTableService + err = actual.AssignProperties_From_StorageAccountsTableService(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsTableService_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsTableService via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsTableService, StorageAccountsTableServiceGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsTableService runs a test to see if a specific instance of StorageAccountsTableService round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsTableService(subject StorageAccountsTableService) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsTableService + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsTableService instances for property testing - lazily instantiated by +// StorageAccountsTableServiceGenerator() +var storageAccountsTableServiceGenerator gopter.Gen + +// StorageAccountsTableServiceGenerator returns a generator of StorageAccountsTableService instances for property testing. +func StorageAccountsTableServiceGenerator() gopter.Gen { + if storageAccountsTableServiceGenerator != nil { + return storageAccountsTableServiceGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsTableService(generators) + storageAccountsTableServiceGenerator = gen.Struct(reflect.TypeOf(StorageAccountsTableService{}), generators) + + return storageAccountsTableServiceGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsTableService is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsTableService(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_TableService_SpecGenerator() + gens["Status"] = StorageAccounts_TableService_STATUSGenerator() +} + +func Test_StorageAccounts_TableService_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_TableService_Spec to StorageAccounts_TableService_Spec via AssignProperties_To_StorageAccounts_TableService_Spec & AssignProperties_From_StorageAccounts_TableService_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_TableService_Spec, StorageAccounts_TableService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_TableService_Spec tests if a specific instance of StorageAccounts_TableService_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_TableService_Spec(subject StorageAccounts_TableService_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_TableService_Spec + err := copied.AssignProperties_To_StorageAccounts_TableService_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_TableService_Spec + err = actual.AssignProperties_From_StorageAccounts_TableService_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_TableService_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableService_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableService_Spec, StorageAccounts_TableService_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableService_Spec runs a test to see if a specific instance of StorageAccounts_TableService_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableService_Spec(subject StorageAccounts_TableService_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableService_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableService_Spec instances for property testing - lazily instantiated by +// StorageAccounts_TableService_SpecGenerator() +var storageAccounts_TableService_SpecGenerator gopter.Gen + +// StorageAccounts_TableService_SpecGenerator returns a generator of StorageAccounts_TableService_Spec instances for property testing. +func StorageAccounts_TableService_SpecGenerator() gopter.Gen { + if storageAccounts_TableService_SpecGenerator != nil { + return storageAccounts_TableService_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Spec(generators) + storageAccounts_TableService_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_Spec{}), generators) + + return storageAccounts_TableService_SpecGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableService_Spec(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRulesGenerator()) +} + +func Test_StorageAccounts_TableService_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_TableService_STATUS to StorageAccounts_TableService_STATUS via AssignProperties_To_StorageAccounts_TableService_STATUS & AssignProperties_From_StorageAccounts_TableService_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_TableService_STATUS, StorageAccounts_TableService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_TableService_STATUS tests if a specific instance of StorageAccounts_TableService_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_TableService_STATUS(subject StorageAccounts_TableService_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_TableService_STATUS + err := copied.AssignProperties_To_StorageAccounts_TableService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_TableService_STATUS + err = actual.AssignProperties_From_StorageAccounts_TableService_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_TableService_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableService_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableService_STATUS, StorageAccounts_TableService_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableService_STATUS runs a test to see if a specific instance of StorageAccounts_TableService_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableService_STATUS(subject StorageAccounts_TableService_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableService_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableService_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_TableService_STATUSGenerator() +var storageAccounts_TableService_STATUSGenerator gopter.Gen + +// StorageAccounts_TableService_STATUSGenerator returns a generator of StorageAccounts_TableService_STATUS instances for property testing. +// We first initialize storageAccounts_TableService_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_TableService_STATUSGenerator() gopter.Gen { + if storageAccounts_TableService_STATUSGenerator != nil { + return storageAccounts_TableService_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableService_STATUS(generators) + storageAccounts_TableService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableService_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_TableService_STATUS(generators) + storageAccounts_TableService_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableService_STATUS{}), generators) + + return storageAccounts_TableService_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_TableService_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_TableService_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableService_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableService_STATUS(gens map[string]gopter.Gen) { + gens["Cors"] = gen.PtrOf(CorsRules_STATUSGenerator()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_table_services_table_spec_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_table_services_table_spec_arm_types_gen.go new file mode 100644 index 00000000000..d5079ba6871 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_table_services_table_spec_arm_types_gen.go @@ -0,0 +1,54 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type StorageAccounts_TableServices_Table_Spec_ARM struct { + Name string `json:"name,omitempty"` + + // Properties: Table resource properties. + Properties *TableProperties_ARM `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &StorageAccounts_TableServices_Table_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (table StorageAccounts_TableServices_Table_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (table *StorageAccounts_TableServices_Table_Spec_ARM) GetName() string { + return table.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/tableServices/tables" +func (table *StorageAccounts_TableServices_Table_Spec_ARM) GetType() string { + return "Microsoft.Storage/storageAccounts/tableServices/tables" +} + +type TableProperties_ARM struct { + // SignedIdentifiers: List of stored access policies specified on the table. + SignedIdentifiers []TableSignedIdentifier_ARM `json:"signedIdentifiers"` +} + +// Object to set Table Access Policy. +type TableSignedIdentifier_ARM struct { + // AccessPolicy: Access policy + AccessPolicy *TableAccessPolicy_ARM `json:"accessPolicy,omitempty"` + Id *string `json:"id,omitempty"` +} + +// Table Access Policy Properties Object. +type TableAccessPolicy_ARM struct { + // ExpiryTime: Expiry time of the access policy + ExpiryTime *string `json:"expiryTime,omitempty"` + + // Permission: Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d' + Permission *string `json:"permission,omitempty"` + + // StartTime: Start time of the access policy + StartTime *string `json:"startTime,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_table_services_table_spec_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_table_services_table_spec_arm_types_gen_test.go new file mode 100644 index 00000000000..a4ef9985a81 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_table_services_table_spec_arm_types_gen_test.go @@ -0,0 +1,292 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_TableServices_Table_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableServices_Table_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableServices_Table_Spec_ARM, StorageAccounts_TableServices_Table_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableServices_Table_Spec_ARM runs a test to see if a specific instance of StorageAccounts_TableServices_Table_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableServices_Table_Spec_ARM(subject StorageAccounts_TableServices_Table_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableServices_Table_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableServices_Table_Spec_ARM instances for property testing - lazily instantiated by +// StorageAccounts_TableServices_Table_Spec_ARMGenerator() +var storageAccounts_TableServices_Table_Spec_ARMGenerator gopter.Gen + +// StorageAccounts_TableServices_Table_Spec_ARMGenerator returns a generator of StorageAccounts_TableServices_Table_Spec_ARM instances for property testing. +// We first initialize storageAccounts_TableServices_Table_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_TableServices_Table_Spec_ARMGenerator() gopter.Gen { + if storageAccounts_TableServices_Table_Spec_ARMGenerator != nil { + return storageAccounts_TableServices_Table_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec_ARM(generators) + storageAccounts_TableServices_Table_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableServices_Table_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec_ARM(generators) + storageAccounts_TableServices_Table_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableServices_Table_Spec_ARM{}), generators) + + return storageAccounts_TableServices_Table_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(TableProperties_ARMGenerator()) +} + +func Test_TableProperties_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableProperties_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableProperties_ARM, TableProperties_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableProperties_ARM runs a test to see if a specific instance of TableProperties_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForTableProperties_ARM(subject TableProperties_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableProperties_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableProperties_ARM instances for property testing - lazily instantiated by +// TableProperties_ARMGenerator() +var tableProperties_ARMGenerator gopter.Gen + +// TableProperties_ARMGenerator returns a generator of TableProperties_ARM instances for property testing. +func TableProperties_ARMGenerator() gopter.Gen { + if tableProperties_ARMGenerator != nil { + return tableProperties_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForTableProperties_ARM(generators) + tableProperties_ARMGenerator = gen.Struct(reflect.TypeOf(TableProperties_ARM{}), generators) + + return tableProperties_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForTableProperties_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForTableProperties_ARM(gens map[string]gopter.Gen) { + gens["SignedIdentifiers"] = gen.SliceOf(TableSignedIdentifier_ARMGenerator()) +} + +func Test_TableSignedIdentifier_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableSignedIdentifier_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableSignedIdentifier_ARM, TableSignedIdentifier_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableSignedIdentifier_ARM runs a test to see if a specific instance of TableSignedIdentifier_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForTableSignedIdentifier_ARM(subject TableSignedIdentifier_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableSignedIdentifier_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableSignedIdentifier_ARM instances for property testing - lazily instantiated by +// TableSignedIdentifier_ARMGenerator() +var tableSignedIdentifier_ARMGenerator gopter.Gen + +// TableSignedIdentifier_ARMGenerator returns a generator of TableSignedIdentifier_ARM instances for property testing. +// We first initialize tableSignedIdentifier_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func TableSignedIdentifier_ARMGenerator() gopter.Gen { + if tableSignedIdentifier_ARMGenerator != nil { + return tableSignedIdentifier_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableSignedIdentifier_ARM(generators) + tableSignedIdentifier_ARMGenerator = gen.Struct(reflect.TypeOf(TableSignedIdentifier_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableSignedIdentifier_ARM(generators) + AddRelatedPropertyGeneratorsForTableSignedIdentifier_ARM(generators) + tableSignedIdentifier_ARMGenerator = gen.Struct(reflect.TypeOf(TableSignedIdentifier_ARM{}), generators) + + return tableSignedIdentifier_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForTableSignedIdentifier_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTableSignedIdentifier_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForTableSignedIdentifier_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForTableSignedIdentifier_ARM(gens map[string]gopter.Gen) { + gens["AccessPolicy"] = gen.PtrOf(TableAccessPolicy_ARMGenerator()) +} + +func Test_TableAccessPolicy_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableAccessPolicy_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableAccessPolicy_ARM, TableAccessPolicy_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableAccessPolicy_ARM runs a test to see if a specific instance of TableAccessPolicy_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForTableAccessPolicy_ARM(subject TableAccessPolicy_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableAccessPolicy_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableAccessPolicy_ARM instances for property testing - lazily instantiated by +// TableAccessPolicy_ARMGenerator() +var tableAccessPolicy_ARMGenerator gopter.Gen + +// TableAccessPolicy_ARMGenerator returns a generator of TableAccessPolicy_ARM instances for property testing. +func TableAccessPolicy_ARMGenerator() gopter.Gen { + if tableAccessPolicy_ARMGenerator != nil { + return tableAccessPolicy_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableAccessPolicy_ARM(generators) + tableAccessPolicy_ARMGenerator = gen.Struct(reflect.TypeOf(TableAccessPolicy_ARM{}), generators) + + return tableAccessPolicy_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForTableAccessPolicy_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTableAccessPolicy_ARM(gens map[string]gopter.Gen) { + gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString()) + gens["Permission"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_table_services_table_status_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_table_services_table_status_arm_types_gen.go new file mode 100644 index 00000000000..3cb13c8082f --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_table_services_table_status_arm_types_gen.go @@ -0,0 +1,48 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +type StorageAccounts_TableServices_Table_STATUS_ARM struct { + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Properties: Table resource properties. + Properties *TableProperties_STATUS_ARM `json:"properties,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +type TableProperties_STATUS_ARM struct { + // SignedIdentifiers: List of stored access policies specified on the table. + SignedIdentifiers []TableSignedIdentifier_STATUS_ARM `json:"signedIdentifiers"` + + // TableName: Table name under the specified account + TableName *string `json:"tableName,omitempty"` +} + +// Object to set Table Access Policy. +type TableSignedIdentifier_STATUS_ARM struct { + // AccessPolicy: Access policy + AccessPolicy *TableAccessPolicy_STATUS_ARM `json:"accessPolicy,omitempty"` + + // Id: unique-64-character-value of the stored access policy. + Id *string `json:"id,omitempty"` +} + +// Table Access Policy Properties Object. +type TableAccessPolicy_STATUS_ARM struct { + // ExpiryTime: Expiry time of the access policy + ExpiryTime *string `json:"expiryTime,omitempty"` + + // Permission: Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d' + Permission *string `json:"permission,omitempty"` + + // StartTime: Start time of the access policy + StartTime *string `json:"startTime,omitempty"` +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_table_services_table_status_arm_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_table_services_table_status_arm_types_gen_test.go new file mode 100644 index 00000000000..fee015f817f --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_table_services_table_status_arm_types_gen_test.go @@ -0,0 +1,308 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccounts_TableServices_Table_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableServices_Table_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableServices_Table_STATUS_ARM, StorageAccounts_TableServices_Table_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableServices_Table_STATUS_ARM runs a test to see if a specific instance of StorageAccounts_TableServices_Table_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableServices_Table_STATUS_ARM(subject StorageAccounts_TableServices_Table_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableServices_Table_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableServices_Table_STATUS_ARM instances for property testing - lazily instantiated by +// StorageAccounts_TableServices_Table_STATUS_ARMGenerator() +var storageAccounts_TableServices_Table_STATUS_ARMGenerator gopter.Gen + +// StorageAccounts_TableServices_Table_STATUS_ARMGenerator returns a generator of StorageAccounts_TableServices_Table_STATUS_ARM instances for property testing. +// We first initialize storageAccounts_TableServices_Table_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_TableServices_Table_STATUS_ARMGenerator() gopter.Gen { + if storageAccounts_TableServices_Table_STATUS_ARMGenerator != nil { + return storageAccounts_TableServices_Table_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS_ARM(generators) + storageAccounts_TableServices_Table_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableServices_Table_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS_ARM(generators) + storageAccounts_TableServices_Table_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableServices_Table_STATUS_ARM{}), generators) + + return storageAccounts_TableServices_Table_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(TableProperties_STATUS_ARMGenerator()) +} + +func Test_TableProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableProperties_STATUS_ARM, TableProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableProperties_STATUS_ARM runs a test to see if a specific instance of TableProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForTableProperties_STATUS_ARM(subject TableProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableProperties_STATUS_ARM instances for property testing - lazily instantiated by +// TableProperties_STATUS_ARMGenerator() +var tableProperties_STATUS_ARMGenerator gopter.Gen + +// TableProperties_STATUS_ARMGenerator returns a generator of TableProperties_STATUS_ARM instances for property testing. +// We first initialize tableProperties_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func TableProperties_STATUS_ARMGenerator() gopter.Gen { + if tableProperties_STATUS_ARMGenerator != nil { + return tableProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableProperties_STATUS_ARM(generators) + tableProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(TableProperties_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableProperties_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForTableProperties_STATUS_ARM(generators) + tableProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(TableProperties_STATUS_ARM{}), generators) + + return tableProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForTableProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTableProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["TableName"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForTableProperties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForTableProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["SignedIdentifiers"] = gen.SliceOf(TableSignedIdentifier_STATUS_ARMGenerator()) +} + +func Test_TableSignedIdentifier_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableSignedIdentifier_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableSignedIdentifier_STATUS_ARM, TableSignedIdentifier_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableSignedIdentifier_STATUS_ARM runs a test to see if a specific instance of TableSignedIdentifier_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForTableSignedIdentifier_STATUS_ARM(subject TableSignedIdentifier_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableSignedIdentifier_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableSignedIdentifier_STATUS_ARM instances for property testing - lazily instantiated by +// TableSignedIdentifier_STATUS_ARMGenerator() +var tableSignedIdentifier_STATUS_ARMGenerator gopter.Gen + +// TableSignedIdentifier_STATUS_ARMGenerator returns a generator of TableSignedIdentifier_STATUS_ARM instances for property testing. +// We first initialize tableSignedIdentifier_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func TableSignedIdentifier_STATUS_ARMGenerator() gopter.Gen { + if tableSignedIdentifier_STATUS_ARMGenerator != nil { + return tableSignedIdentifier_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableSignedIdentifier_STATUS_ARM(generators) + tableSignedIdentifier_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(TableSignedIdentifier_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableSignedIdentifier_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForTableSignedIdentifier_STATUS_ARM(generators) + tableSignedIdentifier_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(TableSignedIdentifier_STATUS_ARM{}), generators) + + return tableSignedIdentifier_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForTableSignedIdentifier_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTableSignedIdentifier_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForTableSignedIdentifier_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForTableSignedIdentifier_STATUS_ARM(gens map[string]gopter.Gen) { + gens["AccessPolicy"] = gen.PtrOf(TableAccessPolicy_STATUS_ARMGenerator()) +} + +func Test_TableAccessPolicy_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableAccessPolicy_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableAccessPolicy_STATUS_ARM, TableAccessPolicy_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableAccessPolicy_STATUS_ARM runs a test to see if a specific instance of TableAccessPolicy_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForTableAccessPolicy_STATUS_ARM(subject TableAccessPolicy_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableAccessPolicy_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableAccessPolicy_STATUS_ARM instances for property testing - lazily instantiated by +// TableAccessPolicy_STATUS_ARMGenerator() +var tableAccessPolicy_STATUS_ARMGenerator gopter.Gen + +// TableAccessPolicy_STATUS_ARMGenerator returns a generator of TableAccessPolicy_STATUS_ARM instances for property testing. +func TableAccessPolicy_STATUS_ARMGenerator() gopter.Gen { + if tableAccessPolicy_STATUS_ARMGenerator != nil { + return tableAccessPolicy_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableAccessPolicy_STATUS_ARM(generators) + tableAccessPolicy_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(TableAccessPolicy_STATUS_ARM{}), generators) + + return tableAccessPolicy_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForTableAccessPolicy_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTableAccessPolicy_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString()) + gens["Permission"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_table_services_table_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_table_services_table_types_gen.go new file mode 100644 index 00000000000..d8c5a44c7b6 --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_table_services_table_types_gen.go @@ -0,0 +1,1279 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "fmt" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/table.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName} +type StorageAccountsTableServicesTable struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec StorageAccounts_TableServices_Table_Spec `json:"spec,omitempty"` + Status StorageAccounts_TableServices_Table_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &StorageAccountsTableServicesTable{} + +// GetConditions returns the conditions of the resource +func (table *StorageAccountsTableServicesTable) GetConditions() conditions.Conditions { + return table.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (table *StorageAccountsTableServicesTable) SetConditions(conditions conditions.Conditions) { + table.Status.Conditions = conditions +} + +var _ conversion.Convertible = &StorageAccountsTableServicesTable{} + +// ConvertFrom populates our StorageAccountsTableServicesTable from the provided hub StorageAccountsTableServicesTable +func (table *StorageAccountsTableServicesTable) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20230101s.StorageAccountsTableServicesTable) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsTableServicesTable but received %T instead", hub) + } + + return table.AssignProperties_From_StorageAccountsTableServicesTable(source) +} + +// ConvertTo populates the provided hub StorageAccountsTableServicesTable from our StorageAccountsTableServicesTable +func (table *StorageAccountsTableServicesTable) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20230101s.StorageAccountsTableServicesTable) + if !ok { + return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccountsTableServicesTable but received %T instead", hub) + } + + return table.AssignProperties_To_StorageAccountsTableServicesTable(destination) +} + +// +kubebuilder:webhook:path=/mutate-storage-azure-com-v1api20230101-storageaccountstableservicestable,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountstableservicestables,verbs=create;update,versions=v1api20230101,name=default.v1api20230101.storageaccountstableservicestables.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &StorageAccountsTableServicesTable{} + +// Default applies defaults to the StorageAccountsTableServicesTable resource +func (table *StorageAccountsTableServicesTable) Default() { + table.defaultImpl() + var temp any = table + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (table *StorageAccountsTableServicesTable) defaultAzureName() { + if table.Spec.AzureName == "" { + table.Spec.AzureName = table.Name + } +} + +// defaultImpl applies the code generated defaults to the StorageAccountsTableServicesTable resource +func (table *StorageAccountsTableServicesTable) defaultImpl() { table.defaultAzureName() } + +var _ genruntime.ImportableResource = &StorageAccountsTableServicesTable{} + +// InitializeSpec initializes the spec for this resource from the given status +func (table *StorageAccountsTableServicesTable) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*StorageAccounts_TableServices_Table_STATUS); ok { + return table.Spec.Initialize_From_StorageAccounts_TableServices_Table_STATUS(s) + } + + return fmt.Errorf("expected Status of type StorageAccounts_TableServices_Table_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &StorageAccountsTableServicesTable{} + +// AzureName returns the Azure name of the resource +func (table *StorageAccountsTableServicesTable) AzureName() string { + return table.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-01-01" +func (table StorageAccountsTableServicesTable) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (table *StorageAccountsTableServicesTable) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (table *StorageAccountsTableServicesTable) GetSpec() genruntime.ConvertibleSpec { + return &table.Spec +} + +// GetStatus returns the status of this resource +func (table *StorageAccountsTableServicesTable) GetStatus() genruntime.ConvertibleStatus { + return &table.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (table *StorageAccountsTableServicesTable) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/tableServices/tables" +func (table *StorageAccountsTableServicesTable) GetType() string { + return "Microsoft.Storage/storageAccounts/tableServices/tables" +} + +// NewEmptyStatus returns a new empty (blank) status +func (table *StorageAccountsTableServicesTable) NewEmptyStatus() genruntime.ConvertibleStatus { + return &StorageAccounts_TableServices_Table_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (table *StorageAccountsTableServicesTable) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(table.Spec) + return table.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (table *StorageAccountsTableServicesTable) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*StorageAccounts_TableServices_Table_STATUS); ok { + table.Status = *st + return nil + } + + // Convert status to required version + var st StorageAccounts_TableServices_Table_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + table.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-storage-azure-com-v1api20230101-storageaccountstableservicestable,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=storage.azure.com,resources=storageaccountstableservicestables,verbs=create;update,versions=v1api20230101,name=validate.v1api20230101.storageaccountstableservicestables.storage.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &StorageAccountsTableServicesTable{} + +// ValidateCreate validates the creation of the resource +func (table *StorageAccountsTableServicesTable) ValidateCreate() (admission.Warnings, error) { + validations := table.createValidations() + var temp any = table + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (table *StorageAccountsTableServicesTable) ValidateDelete() (admission.Warnings, error) { + validations := table.deleteValidations() + var temp any = table + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (table *StorageAccountsTableServicesTable) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := table.updateValidations() + var temp any = table + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (table *StorageAccountsTableServicesTable) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){table.validateResourceReferences, table.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (table *StorageAccountsTableServicesTable) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (table *StorageAccountsTableServicesTable) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return table.validateResourceReferences() + }, + table.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return table.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (table *StorageAccountsTableServicesTable) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(table) +} + +// validateResourceReferences validates all resource references +func (table *StorageAccountsTableServicesTable) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&table.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (table *StorageAccountsTableServicesTable) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*StorageAccountsTableServicesTable) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, table) +} + +// AssignProperties_From_StorageAccountsTableServicesTable populates our StorageAccountsTableServicesTable from the provided source StorageAccountsTableServicesTable +func (table *StorageAccountsTableServicesTable) AssignProperties_From_StorageAccountsTableServicesTable(source *v20230101s.StorageAccountsTableServicesTable) error { + + // ObjectMeta + table.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec StorageAccounts_TableServices_Table_Spec + err := spec.AssignProperties_From_StorageAccounts_TableServices_Table_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_TableServices_Table_Spec() to populate field Spec") + } + table.Spec = spec + + // Status + var status StorageAccounts_TableServices_Table_STATUS + err = status.AssignProperties_From_StorageAccounts_TableServices_Table_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_StorageAccounts_TableServices_Table_STATUS() to populate field Status") + } + table.Status = status + + // No error + return nil +} + +// AssignProperties_To_StorageAccountsTableServicesTable populates the provided destination StorageAccountsTableServicesTable from our StorageAccountsTableServicesTable +func (table *StorageAccountsTableServicesTable) AssignProperties_To_StorageAccountsTableServicesTable(destination *v20230101s.StorageAccountsTableServicesTable) error { + + // ObjectMeta + destination.ObjectMeta = *table.ObjectMeta.DeepCopy() + + // Spec + var spec v20230101s.StorageAccounts_TableServices_Table_Spec + err := table.Spec.AssignProperties_To_StorageAccounts_TableServices_Table_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_TableServices_Table_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20230101s.StorageAccounts_TableServices_Table_STATUS + err = table.Status.AssignProperties_To_StorageAccounts_TableServices_Table_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_StorageAccounts_TableServices_Table_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (table *StorageAccountsTableServicesTable) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: table.Spec.OriginalVersion(), + Kind: "StorageAccountsTableServicesTable", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/table.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName} +type StorageAccountsTableServicesTableList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageAccountsTableServicesTable `json:"items"` +} + +type StorageAccounts_TableServices_Table_Spec struct { + // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:MinLength=3 + // +kubebuilder:validation:Pattern="^[A-Za-z][A-Za-z0-9]{2,62}$" + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a storage.azure.com/StorageAccountsTableService resource + Owner *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccountsTableService"` + + // SignedIdentifiers: List of stored access policies specified on the table. + SignedIdentifiers []TableSignedIdentifier `json:"signedIdentifiers,omitempty"` +} + +var _ genruntime.ARMTransformer = &StorageAccounts_TableServices_Table_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (table *StorageAccounts_TableServices_Table_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if table == nil { + return nil, nil + } + result := &StorageAccounts_TableServices_Table_Spec_ARM{} + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if table.SignedIdentifiers != nil { + result.Properties = &TableProperties_ARM{} + } + for _, item := range table.SignedIdentifiers { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.Properties.SignedIdentifiers = append(result.Properties.SignedIdentifiers, *item_ARM.(*TableSignedIdentifier_ARM)) + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (table *StorageAccounts_TableServices_Table_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_TableServices_Table_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (table *StorageAccounts_TableServices_Table_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_TableServices_Table_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_TableServices_Table_Spec_ARM, got %T", armInput) + } + + // Set property "AzureName": + table.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Owner": + table.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "SignedIdentifiers": + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.SignedIdentifiers { + var item1 TableSignedIdentifier + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + table.SignedIdentifiers = append(table.SignedIdentifiers, item1) + } + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &StorageAccounts_TableServices_Table_Spec{} + +// ConvertSpecFrom populates our StorageAccounts_TableServices_Table_Spec from the provided source +func (table *StorageAccounts_TableServices_Table_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20230101s.StorageAccounts_TableServices_Table_Spec) + if ok { + // Populate our instance from source + return table.AssignProperties_From_StorageAccounts_TableServices_Table_Spec(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_TableServices_Table_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = table.AssignProperties_From_StorageAccounts_TableServices_Table_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our StorageAccounts_TableServices_Table_Spec +func (table *StorageAccounts_TableServices_Table_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20230101s.StorageAccounts_TableServices_Table_Spec) + if ok { + // Populate destination from our instance + return table.AssignProperties_To_StorageAccounts_TableServices_Table_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_TableServices_Table_Spec{} + err := table.AssignProperties_To_StorageAccounts_TableServices_Table_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_StorageAccounts_TableServices_Table_Spec populates our StorageAccounts_TableServices_Table_Spec from the provided source StorageAccounts_TableServices_Table_Spec +func (table *StorageAccounts_TableServices_Table_Spec) AssignProperties_From_StorageAccounts_TableServices_Table_Spec(source *v20230101s.StorageAccounts_TableServices_Table_Spec) error { + + // AzureName + table.AzureName = source.AzureName + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + table.Owner = &owner + } else { + table.Owner = nil + } + + // SignedIdentifiers + if source.SignedIdentifiers != nil { + signedIdentifierList := make([]TableSignedIdentifier, len(source.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range source.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier TableSignedIdentifier + err := signedIdentifier.AssignProperties_From_TableSignedIdentifier(&signedIdentifierItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TableSignedIdentifier() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + table.SignedIdentifiers = signedIdentifierList + } else { + table.SignedIdentifiers = nil + } + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_TableServices_Table_Spec populates the provided destination StorageAccounts_TableServices_Table_Spec from our StorageAccounts_TableServices_Table_Spec +func (table *StorageAccounts_TableServices_Table_Spec) AssignProperties_To_StorageAccounts_TableServices_Table_Spec(destination *v20230101s.StorageAccounts_TableServices_Table_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AzureName + destination.AzureName = table.AzureName + + // OriginalVersion + destination.OriginalVersion = table.OriginalVersion() + + // Owner + if table.Owner != nil { + owner := table.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // SignedIdentifiers + if table.SignedIdentifiers != nil { + signedIdentifierList := make([]v20230101s.TableSignedIdentifier, len(table.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range table.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier v20230101s.TableSignedIdentifier + err := signedIdentifierItem.AssignProperties_To_TableSignedIdentifier(&signedIdentifier) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TableSignedIdentifier() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + destination.SignedIdentifiers = signedIdentifierList + } else { + destination.SignedIdentifiers = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_StorageAccounts_TableServices_Table_STATUS populates our StorageAccounts_TableServices_Table_Spec from the provided source StorageAccounts_TableServices_Table_STATUS +func (table *StorageAccounts_TableServices_Table_Spec) Initialize_From_StorageAccounts_TableServices_Table_STATUS(source *StorageAccounts_TableServices_Table_STATUS) error { + + // SignedIdentifiers + if source.SignedIdentifiers != nil { + signedIdentifierList := make([]TableSignedIdentifier, len(source.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range source.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier TableSignedIdentifier + err := signedIdentifier.Initialize_From_TableSignedIdentifier_STATUS(&signedIdentifierItem) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_TableSignedIdentifier_STATUS() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + table.SignedIdentifiers = signedIdentifierList + } else { + table.SignedIdentifiers = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (table *StorageAccounts_TableServices_Table_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (table *StorageAccounts_TableServices_Table_Spec) SetAzureName(azureName string) { + table.AzureName = azureName +} + +type StorageAccounts_TableServices_Table_STATUS struct { + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // SignedIdentifiers: List of stored access policies specified on the table. + SignedIdentifiers []TableSignedIdentifier_STATUS `json:"signedIdentifiers,omitempty"` + + // TableName: Table name under the specified account + TableName *string `json:"tableName,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &StorageAccounts_TableServices_Table_STATUS{} + +// ConvertStatusFrom populates our StorageAccounts_TableServices_Table_STATUS from the provided source +func (table *StorageAccounts_TableServices_Table_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20230101s.StorageAccounts_TableServices_Table_STATUS) + if ok { + // Populate our instance from source + return table.AssignProperties_From_StorageAccounts_TableServices_Table_STATUS(src) + } + + // Convert to an intermediate form + src = &v20230101s.StorageAccounts_TableServices_Table_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = table.AssignProperties_From_StorageAccounts_TableServices_Table_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our StorageAccounts_TableServices_Table_STATUS +func (table *StorageAccounts_TableServices_Table_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20230101s.StorageAccounts_TableServices_Table_STATUS) + if ok { + // Populate destination from our instance + return table.AssignProperties_To_StorageAccounts_TableServices_Table_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20230101s.StorageAccounts_TableServices_Table_STATUS{} + err := table.AssignProperties_To_StorageAccounts_TableServices_Table_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &StorageAccounts_TableServices_Table_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (table *StorageAccounts_TableServices_Table_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &StorageAccounts_TableServices_Table_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (table *StorageAccounts_TableServices_Table_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(StorageAccounts_TableServices_Table_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected StorageAccounts_TableServices_Table_STATUS_ARM, got %T", armInput) + } + + // no assignment for property "Conditions" + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + table.Id = &id + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + table.Name = &name + } + + // Set property "SignedIdentifiers": + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.SignedIdentifiers { + var item1 TableSignedIdentifier_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + table.SignedIdentifiers = append(table.SignedIdentifiers, item1) + } + } + + // Set property "TableName": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.TableName != nil { + tableName := *typedInput.Properties.TableName + table.TableName = &tableName + } + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + table.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_StorageAccounts_TableServices_Table_STATUS populates our StorageAccounts_TableServices_Table_STATUS from the provided source StorageAccounts_TableServices_Table_STATUS +func (table *StorageAccounts_TableServices_Table_STATUS) AssignProperties_From_StorageAccounts_TableServices_Table_STATUS(source *v20230101s.StorageAccounts_TableServices_Table_STATUS) error { + + // Conditions + table.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Id + table.Id = genruntime.ClonePointerToString(source.Id) + + // Name + table.Name = genruntime.ClonePointerToString(source.Name) + + // SignedIdentifiers + if source.SignedIdentifiers != nil { + signedIdentifierList := make([]TableSignedIdentifier_STATUS, len(source.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range source.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier TableSignedIdentifier_STATUS + err := signedIdentifier.AssignProperties_From_TableSignedIdentifier_STATUS(&signedIdentifierItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TableSignedIdentifier_STATUS() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + table.SignedIdentifiers = signedIdentifierList + } else { + table.SignedIdentifiers = nil + } + + // TableName + table.TableName = genruntime.ClonePointerToString(source.TableName) + + // Type + table.Type = genruntime.ClonePointerToString(source.Type) + + // No error + return nil +} + +// AssignProperties_To_StorageAccounts_TableServices_Table_STATUS populates the provided destination StorageAccounts_TableServices_Table_STATUS from our StorageAccounts_TableServices_Table_STATUS +func (table *StorageAccounts_TableServices_Table_STATUS) AssignProperties_To_StorageAccounts_TableServices_Table_STATUS(destination *v20230101s.StorageAccounts_TableServices_Table_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(table.Conditions) + + // Id + destination.Id = genruntime.ClonePointerToString(table.Id) + + // Name + destination.Name = genruntime.ClonePointerToString(table.Name) + + // SignedIdentifiers + if table.SignedIdentifiers != nil { + signedIdentifierList := make([]v20230101s.TableSignedIdentifier_STATUS, len(table.SignedIdentifiers)) + for signedIdentifierIndex, signedIdentifierItem := range table.SignedIdentifiers { + // Shadow the loop variable to avoid aliasing + signedIdentifierItem := signedIdentifierItem + var signedIdentifier v20230101s.TableSignedIdentifier_STATUS + err := signedIdentifierItem.AssignProperties_To_TableSignedIdentifier_STATUS(&signedIdentifier) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TableSignedIdentifier_STATUS() to populate field SignedIdentifiers") + } + signedIdentifierList[signedIdentifierIndex] = signedIdentifier + } + destination.SignedIdentifiers = signedIdentifierList + } else { + destination.SignedIdentifiers = nil + } + + // TableName + destination.TableName = genruntime.ClonePointerToString(table.TableName) + + // Type + destination.Type = genruntime.ClonePointerToString(table.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Object to set Table Access Policy. +type TableSignedIdentifier struct { + // AccessPolicy: Access policy + AccessPolicy *TableAccessPolicy `json:"accessPolicy,omitempty"` + + // +kubebuilder:validation:Required + // Reference: unique-64-character-value of the stored access policy. + Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` +} + +var _ genruntime.ARMTransformer = &TableSignedIdentifier{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (identifier *TableSignedIdentifier) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if identifier == nil { + return nil, nil + } + result := &TableSignedIdentifier_ARM{} + + // Set property "AccessPolicy": + if identifier.AccessPolicy != nil { + accessPolicy_ARM, err := (*identifier.AccessPolicy).ConvertToARM(resolved) + if err != nil { + return nil, err + } + accessPolicy := *accessPolicy_ARM.(*TableAccessPolicy_ARM) + result.AccessPolicy = &accessPolicy + } + + // Set property "Id": + if identifier.Reference != nil { + referenceARMID, err := resolved.ResolvedReferences.Lookup(*identifier.Reference) + if err != nil { + return nil, err + } + reference := referenceARMID + result.Id = &reference + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identifier *TableSignedIdentifier) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &TableSignedIdentifier_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identifier *TableSignedIdentifier) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(TableSignedIdentifier_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected TableSignedIdentifier_ARM, got %T", armInput) + } + + // Set property "AccessPolicy": + if typedInput.AccessPolicy != nil { + var accessPolicy1 TableAccessPolicy + err := accessPolicy1.PopulateFromARM(owner, *typedInput.AccessPolicy) + if err != nil { + return err + } + accessPolicy := accessPolicy1 + identifier.AccessPolicy = &accessPolicy + } + + // no assignment for property "Reference" + + // No error + return nil +} + +// AssignProperties_From_TableSignedIdentifier populates our TableSignedIdentifier from the provided source TableSignedIdentifier +func (identifier *TableSignedIdentifier) AssignProperties_From_TableSignedIdentifier(source *v20230101s.TableSignedIdentifier) error { + + // AccessPolicy + if source.AccessPolicy != nil { + var accessPolicy TableAccessPolicy + err := accessPolicy.AssignProperties_From_TableAccessPolicy(source.AccessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TableAccessPolicy() to populate field AccessPolicy") + } + identifier.AccessPolicy = &accessPolicy + } else { + identifier.AccessPolicy = nil + } + + // Reference + if source.Reference != nil { + reference := source.Reference.Copy() + identifier.Reference = &reference + } else { + identifier.Reference = nil + } + + // No error + return nil +} + +// AssignProperties_To_TableSignedIdentifier populates the provided destination TableSignedIdentifier from our TableSignedIdentifier +func (identifier *TableSignedIdentifier) AssignProperties_To_TableSignedIdentifier(destination *v20230101s.TableSignedIdentifier) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AccessPolicy + if identifier.AccessPolicy != nil { + var accessPolicy v20230101s.TableAccessPolicy + err := identifier.AccessPolicy.AssignProperties_To_TableAccessPolicy(&accessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TableAccessPolicy() to populate field AccessPolicy") + } + destination.AccessPolicy = &accessPolicy + } else { + destination.AccessPolicy = nil + } + + // Reference + if identifier.Reference != nil { + reference := identifier.Reference.Copy() + destination.Reference = &reference + } else { + destination.Reference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_TableSignedIdentifier_STATUS populates our TableSignedIdentifier from the provided source TableSignedIdentifier_STATUS +func (identifier *TableSignedIdentifier) Initialize_From_TableSignedIdentifier_STATUS(source *TableSignedIdentifier_STATUS) error { + + // AccessPolicy + if source.AccessPolicy != nil { + var accessPolicy TableAccessPolicy + err := accessPolicy.Initialize_From_TableAccessPolicy_STATUS(source.AccessPolicy) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_TableAccessPolicy_STATUS() to populate field AccessPolicy") + } + identifier.AccessPolicy = &accessPolicy + } else { + identifier.AccessPolicy = nil + } + + // Reference + if source.Id != nil { + reference := genruntime.CreateResourceReferenceFromARMID(*source.Id) + identifier.Reference = &reference + } else { + identifier.Reference = nil + } + + // No error + return nil +} + +// Object to set Table Access Policy. +type TableSignedIdentifier_STATUS struct { + // AccessPolicy: Access policy + AccessPolicy *TableAccessPolicy_STATUS `json:"accessPolicy,omitempty"` + + // Id: unique-64-character-value of the stored access policy. + Id *string `json:"id,omitempty"` +} + +var _ genruntime.FromARMConverter = &TableSignedIdentifier_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identifier *TableSignedIdentifier_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &TableSignedIdentifier_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identifier *TableSignedIdentifier_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(TableSignedIdentifier_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected TableSignedIdentifier_STATUS_ARM, got %T", armInput) + } + + // Set property "AccessPolicy": + if typedInput.AccessPolicy != nil { + var accessPolicy1 TableAccessPolicy_STATUS + err := accessPolicy1.PopulateFromARM(owner, *typedInput.AccessPolicy) + if err != nil { + return err + } + accessPolicy := accessPolicy1 + identifier.AccessPolicy = &accessPolicy + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + identifier.Id = &id + } + + // No error + return nil +} + +// AssignProperties_From_TableSignedIdentifier_STATUS populates our TableSignedIdentifier_STATUS from the provided source TableSignedIdentifier_STATUS +func (identifier *TableSignedIdentifier_STATUS) AssignProperties_From_TableSignedIdentifier_STATUS(source *v20230101s.TableSignedIdentifier_STATUS) error { + + // AccessPolicy + if source.AccessPolicy != nil { + var accessPolicy TableAccessPolicy_STATUS + err := accessPolicy.AssignProperties_From_TableAccessPolicy_STATUS(source.AccessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_TableAccessPolicy_STATUS() to populate field AccessPolicy") + } + identifier.AccessPolicy = &accessPolicy + } else { + identifier.AccessPolicy = nil + } + + // Id + identifier.Id = genruntime.ClonePointerToString(source.Id) + + // No error + return nil +} + +// AssignProperties_To_TableSignedIdentifier_STATUS populates the provided destination TableSignedIdentifier_STATUS from our TableSignedIdentifier_STATUS +func (identifier *TableSignedIdentifier_STATUS) AssignProperties_To_TableSignedIdentifier_STATUS(destination *v20230101s.TableSignedIdentifier_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AccessPolicy + if identifier.AccessPolicy != nil { + var accessPolicy v20230101s.TableAccessPolicy_STATUS + err := identifier.AccessPolicy.AssignProperties_To_TableAccessPolicy_STATUS(&accessPolicy) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_TableAccessPolicy_STATUS() to populate field AccessPolicy") + } + destination.AccessPolicy = &accessPolicy + } else { + destination.AccessPolicy = nil + } + + // Id + destination.Id = genruntime.ClonePointerToString(identifier.Id) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Table Access Policy Properties Object. +type TableAccessPolicy struct { + // ExpiryTime: Expiry time of the access policy + ExpiryTime *string `json:"expiryTime,omitempty"` + + // +kubebuilder:validation:Required + // Permission: Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d' + Permission *string `json:"permission,omitempty"` + + // StartTime: Start time of the access policy + StartTime *string `json:"startTime,omitempty"` +} + +var _ genruntime.ARMTransformer = &TableAccessPolicy{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (policy *TableAccessPolicy) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if policy == nil { + return nil, nil + } + result := &TableAccessPolicy_ARM{} + + // Set property "ExpiryTime": + if policy.ExpiryTime != nil { + expiryTime := *policy.ExpiryTime + result.ExpiryTime = &expiryTime + } + + // Set property "Permission": + if policy.Permission != nil { + permission := *policy.Permission + result.Permission = &permission + } + + // Set property "StartTime": + if policy.StartTime != nil { + startTime := *policy.StartTime + result.StartTime = &startTime + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *TableAccessPolicy) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &TableAccessPolicy_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *TableAccessPolicy) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(TableAccessPolicy_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected TableAccessPolicy_ARM, got %T", armInput) + } + + // Set property "ExpiryTime": + if typedInput.ExpiryTime != nil { + expiryTime := *typedInput.ExpiryTime + policy.ExpiryTime = &expiryTime + } + + // Set property "Permission": + if typedInput.Permission != nil { + permission := *typedInput.Permission + policy.Permission = &permission + } + + // Set property "StartTime": + if typedInput.StartTime != nil { + startTime := *typedInput.StartTime + policy.StartTime = &startTime + } + + // No error + return nil +} + +// AssignProperties_From_TableAccessPolicy populates our TableAccessPolicy from the provided source TableAccessPolicy +func (policy *TableAccessPolicy) AssignProperties_From_TableAccessPolicy(source *v20230101s.TableAccessPolicy) error { + + // ExpiryTime + policy.ExpiryTime = genruntime.ClonePointerToString(source.ExpiryTime) + + // Permission + policy.Permission = genruntime.ClonePointerToString(source.Permission) + + // StartTime + policy.StartTime = genruntime.ClonePointerToString(source.StartTime) + + // No error + return nil +} + +// AssignProperties_To_TableAccessPolicy populates the provided destination TableAccessPolicy from our TableAccessPolicy +func (policy *TableAccessPolicy) AssignProperties_To_TableAccessPolicy(destination *v20230101s.TableAccessPolicy) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ExpiryTime + destination.ExpiryTime = genruntime.ClonePointerToString(policy.ExpiryTime) + + // Permission + destination.Permission = genruntime.ClonePointerToString(policy.Permission) + + // StartTime + destination.StartTime = genruntime.ClonePointerToString(policy.StartTime) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_TableAccessPolicy_STATUS populates our TableAccessPolicy from the provided source TableAccessPolicy_STATUS +func (policy *TableAccessPolicy) Initialize_From_TableAccessPolicy_STATUS(source *TableAccessPolicy_STATUS) error { + + // ExpiryTime + policy.ExpiryTime = genruntime.ClonePointerToString(source.ExpiryTime) + + // Permission + policy.Permission = genruntime.ClonePointerToString(source.Permission) + + // StartTime + policy.StartTime = genruntime.ClonePointerToString(source.StartTime) + + // No error + return nil +} + +// Table Access Policy Properties Object. +type TableAccessPolicy_STATUS struct { + // ExpiryTime: Expiry time of the access policy + ExpiryTime *string `json:"expiryTime,omitempty"` + + // Permission: Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d' + Permission *string `json:"permission,omitempty"` + + // StartTime: Start time of the access policy + StartTime *string `json:"startTime,omitempty"` +} + +var _ genruntime.FromARMConverter = &TableAccessPolicy_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (policy *TableAccessPolicy_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &TableAccessPolicy_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (policy *TableAccessPolicy_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(TableAccessPolicy_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected TableAccessPolicy_STATUS_ARM, got %T", armInput) + } + + // Set property "ExpiryTime": + if typedInput.ExpiryTime != nil { + expiryTime := *typedInput.ExpiryTime + policy.ExpiryTime = &expiryTime + } + + // Set property "Permission": + if typedInput.Permission != nil { + permission := *typedInput.Permission + policy.Permission = &permission + } + + // Set property "StartTime": + if typedInput.StartTime != nil { + startTime := *typedInput.StartTime + policy.StartTime = &startTime + } + + // No error + return nil +} + +// AssignProperties_From_TableAccessPolicy_STATUS populates our TableAccessPolicy_STATUS from the provided source TableAccessPolicy_STATUS +func (policy *TableAccessPolicy_STATUS) AssignProperties_From_TableAccessPolicy_STATUS(source *v20230101s.TableAccessPolicy_STATUS) error { + + // ExpiryTime + policy.ExpiryTime = genruntime.ClonePointerToString(source.ExpiryTime) + + // Permission + policy.Permission = genruntime.ClonePointerToString(source.Permission) + + // StartTime + policy.StartTime = genruntime.ClonePointerToString(source.StartTime) + + // No error + return nil +} + +// AssignProperties_To_TableAccessPolicy_STATUS populates the provided destination TableAccessPolicy_STATUS from our TableAccessPolicy_STATUS +func (policy *TableAccessPolicy_STATUS) AssignProperties_To_TableAccessPolicy_STATUS(destination *v20230101s.TableAccessPolicy_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ExpiryTime + destination.ExpiryTime = genruntime.ClonePointerToString(policy.ExpiryTime) + + // Permission + destination.Permission = genruntime.ClonePointerToString(policy.Permission) + + // StartTime + destination.StartTime = genruntime.ClonePointerToString(policy.StartTime) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&StorageAccountsTableServicesTable{}, &StorageAccountsTableServicesTableList{}) +} diff --git a/v2/api/storage/v1api20230101/storage_accounts_table_services_table_types_gen_test.go b/v2/api/storage/v1api20230101/storage_accounts_table_services_table_types_gen_test.go new file mode 100644 index 00000000000..2b7951c5aef --- /dev/null +++ b/v2/api/storage/v1api20230101/storage_accounts_table_services_table_types_gen_test.go @@ -0,0 +1,832 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230101 + +import ( + "encoding/json" + v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_StorageAccountsTableServicesTable_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsTableServicesTable to hub returns original", + prop.ForAll(RunResourceConversionTestForStorageAccountsTableServicesTable, StorageAccountsTableServicesTableGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForStorageAccountsTableServicesTable tests if a specific instance of StorageAccountsTableServicesTable round trips to the hub storage version and back losslessly +func RunResourceConversionTestForStorageAccountsTableServicesTable(subject StorageAccountsTableServicesTable) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20230101s.StorageAccountsTableServicesTable + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual StorageAccountsTableServicesTable + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsTableServicesTable_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccountsTableServicesTable to StorageAccountsTableServicesTable via AssignProperties_To_StorageAccountsTableServicesTable & AssignProperties_From_StorageAccountsTableServicesTable returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccountsTableServicesTable, StorageAccountsTableServicesTableGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccountsTableServicesTable tests if a specific instance of StorageAccountsTableServicesTable can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccountsTableServicesTable(subject StorageAccountsTableServicesTable) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccountsTableServicesTable + err := copied.AssignProperties_To_StorageAccountsTableServicesTable(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccountsTableServicesTable + err = actual.AssignProperties_From_StorageAccountsTableServicesTable(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccountsTableServicesTable_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccountsTableServicesTable via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccountsTableServicesTable, StorageAccountsTableServicesTableGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccountsTableServicesTable runs a test to see if a specific instance of StorageAccountsTableServicesTable round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccountsTableServicesTable(subject StorageAccountsTableServicesTable) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccountsTableServicesTable + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccountsTableServicesTable instances for property testing - lazily instantiated by +// StorageAccountsTableServicesTableGenerator() +var storageAccountsTableServicesTableGenerator gopter.Gen + +// StorageAccountsTableServicesTableGenerator returns a generator of StorageAccountsTableServicesTable instances for property testing. +func StorageAccountsTableServicesTableGenerator() gopter.Gen { + if storageAccountsTableServicesTableGenerator != nil { + return storageAccountsTableServicesTableGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForStorageAccountsTableServicesTable(generators) + storageAccountsTableServicesTableGenerator = gen.Struct(reflect.TypeOf(StorageAccountsTableServicesTable{}), generators) + + return storageAccountsTableServicesTableGenerator +} + +// AddRelatedPropertyGeneratorsForStorageAccountsTableServicesTable is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccountsTableServicesTable(gens map[string]gopter.Gen) { + gens["Spec"] = StorageAccounts_TableServices_Table_SpecGenerator() + gens["Status"] = StorageAccounts_TableServices_Table_STATUSGenerator() +} + +func Test_StorageAccounts_TableServices_Table_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_TableServices_Table_Spec to StorageAccounts_TableServices_Table_Spec via AssignProperties_To_StorageAccounts_TableServices_Table_Spec & AssignProperties_From_StorageAccounts_TableServices_Table_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_TableServices_Table_Spec, StorageAccounts_TableServices_Table_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_TableServices_Table_Spec tests if a specific instance of StorageAccounts_TableServices_Table_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_TableServices_Table_Spec(subject StorageAccounts_TableServices_Table_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_TableServices_Table_Spec + err := copied.AssignProperties_To_StorageAccounts_TableServices_Table_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_TableServices_Table_Spec + err = actual.AssignProperties_From_StorageAccounts_TableServices_Table_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_TableServices_Table_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableServices_Table_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableServices_Table_Spec, StorageAccounts_TableServices_Table_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableServices_Table_Spec runs a test to see if a specific instance of StorageAccounts_TableServices_Table_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableServices_Table_Spec(subject StorageAccounts_TableServices_Table_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableServices_Table_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableServices_Table_Spec instances for property testing - lazily instantiated by +// StorageAccounts_TableServices_Table_SpecGenerator() +var storageAccounts_TableServices_Table_SpecGenerator gopter.Gen + +// StorageAccounts_TableServices_Table_SpecGenerator returns a generator of StorageAccounts_TableServices_Table_Spec instances for property testing. +// We first initialize storageAccounts_TableServices_Table_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_TableServices_Table_SpecGenerator() gopter.Gen { + if storageAccounts_TableServices_Table_SpecGenerator != nil { + return storageAccounts_TableServices_Table_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec(generators) + storageAccounts_TableServices_Table_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableServices_Table_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec(generators) + storageAccounts_TableServices_Table_SpecGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableServices_Table_Spec{}), generators) + + return storageAccounts_TableServices_Table_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec(gens map[string]gopter.Gen) { + gens["AzureName"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_Spec(gens map[string]gopter.Gen) { + gens["SignedIdentifiers"] = gen.SliceOf(TableSignedIdentifierGenerator()) +} + +func Test_StorageAccounts_TableServices_Table_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from StorageAccounts_TableServices_Table_STATUS to StorageAccounts_TableServices_Table_STATUS via AssignProperties_To_StorageAccounts_TableServices_Table_STATUS & AssignProperties_From_StorageAccounts_TableServices_Table_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForStorageAccounts_TableServices_Table_STATUS, StorageAccounts_TableServices_Table_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForStorageAccounts_TableServices_Table_STATUS tests if a specific instance of StorageAccounts_TableServices_Table_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForStorageAccounts_TableServices_Table_STATUS(subject StorageAccounts_TableServices_Table_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.StorageAccounts_TableServices_Table_STATUS + err := copied.AssignProperties_To_StorageAccounts_TableServices_Table_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual StorageAccounts_TableServices_Table_STATUS + err = actual.AssignProperties_From_StorageAccounts_TableServices_Table_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_StorageAccounts_TableServices_Table_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of StorageAccounts_TableServices_Table_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForStorageAccounts_TableServices_Table_STATUS, StorageAccounts_TableServices_Table_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForStorageAccounts_TableServices_Table_STATUS runs a test to see if a specific instance of StorageAccounts_TableServices_Table_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForStorageAccounts_TableServices_Table_STATUS(subject StorageAccounts_TableServices_Table_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual StorageAccounts_TableServices_Table_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of StorageAccounts_TableServices_Table_STATUS instances for property testing - lazily instantiated by +// StorageAccounts_TableServices_Table_STATUSGenerator() +var storageAccounts_TableServices_Table_STATUSGenerator gopter.Gen + +// StorageAccounts_TableServices_Table_STATUSGenerator returns a generator of StorageAccounts_TableServices_Table_STATUS instances for property testing. +// We first initialize storageAccounts_TableServices_Table_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func StorageAccounts_TableServices_Table_STATUSGenerator() gopter.Gen { + if storageAccounts_TableServices_Table_STATUSGenerator != nil { + return storageAccounts_TableServices_Table_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS(generators) + storageAccounts_TableServices_Table_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableServices_Table_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS(generators) + AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS(generators) + storageAccounts_TableServices_Table_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccounts_TableServices_Table_STATUS{}), generators) + + return storageAccounts_TableServices_Table_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["TableName"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForStorageAccounts_TableServices_Table_STATUS(gens map[string]gopter.Gen) { + gens["SignedIdentifiers"] = gen.SliceOf(TableSignedIdentifier_STATUSGenerator()) +} + +func Test_TableSignedIdentifier_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TableSignedIdentifier to TableSignedIdentifier via AssignProperties_To_TableSignedIdentifier & AssignProperties_From_TableSignedIdentifier returns original", + prop.ForAll(RunPropertyAssignmentTestForTableSignedIdentifier, TableSignedIdentifierGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTableSignedIdentifier tests if a specific instance of TableSignedIdentifier can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTableSignedIdentifier(subject TableSignedIdentifier) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TableSignedIdentifier + err := copied.AssignProperties_To_TableSignedIdentifier(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TableSignedIdentifier + err = actual.AssignProperties_From_TableSignedIdentifier(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_TableSignedIdentifier_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableSignedIdentifier via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableSignedIdentifier, TableSignedIdentifierGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableSignedIdentifier runs a test to see if a specific instance of TableSignedIdentifier round trips to JSON and back losslessly +func RunJSONSerializationTestForTableSignedIdentifier(subject TableSignedIdentifier) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableSignedIdentifier + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableSignedIdentifier instances for property testing - lazily instantiated by +// TableSignedIdentifierGenerator() +var tableSignedIdentifierGenerator gopter.Gen + +// TableSignedIdentifierGenerator returns a generator of TableSignedIdentifier instances for property testing. +func TableSignedIdentifierGenerator() gopter.Gen { + if tableSignedIdentifierGenerator != nil { + return tableSignedIdentifierGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForTableSignedIdentifier(generators) + tableSignedIdentifierGenerator = gen.Struct(reflect.TypeOf(TableSignedIdentifier{}), generators) + + return tableSignedIdentifierGenerator +} + +// AddRelatedPropertyGeneratorsForTableSignedIdentifier is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForTableSignedIdentifier(gens map[string]gopter.Gen) { + gens["AccessPolicy"] = gen.PtrOf(TableAccessPolicyGenerator()) +} + +func Test_TableSignedIdentifier_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TableSignedIdentifier_STATUS to TableSignedIdentifier_STATUS via AssignProperties_To_TableSignedIdentifier_STATUS & AssignProperties_From_TableSignedIdentifier_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForTableSignedIdentifier_STATUS, TableSignedIdentifier_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTableSignedIdentifier_STATUS tests if a specific instance of TableSignedIdentifier_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTableSignedIdentifier_STATUS(subject TableSignedIdentifier_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TableSignedIdentifier_STATUS + err := copied.AssignProperties_To_TableSignedIdentifier_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TableSignedIdentifier_STATUS + err = actual.AssignProperties_From_TableSignedIdentifier_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_TableSignedIdentifier_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableSignedIdentifier_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableSignedIdentifier_STATUS, TableSignedIdentifier_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableSignedIdentifier_STATUS runs a test to see if a specific instance of TableSignedIdentifier_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForTableSignedIdentifier_STATUS(subject TableSignedIdentifier_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableSignedIdentifier_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableSignedIdentifier_STATUS instances for property testing - lazily instantiated by +// TableSignedIdentifier_STATUSGenerator() +var tableSignedIdentifier_STATUSGenerator gopter.Gen + +// TableSignedIdentifier_STATUSGenerator returns a generator of TableSignedIdentifier_STATUS instances for property testing. +// We first initialize tableSignedIdentifier_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func TableSignedIdentifier_STATUSGenerator() gopter.Gen { + if tableSignedIdentifier_STATUSGenerator != nil { + return tableSignedIdentifier_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableSignedIdentifier_STATUS(generators) + tableSignedIdentifier_STATUSGenerator = gen.Struct(reflect.TypeOf(TableSignedIdentifier_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableSignedIdentifier_STATUS(generators) + AddRelatedPropertyGeneratorsForTableSignedIdentifier_STATUS(generators) + tableSignedIdentifier_STATUSGenerator = gen.Struct(reflect.TypeOf(TableSignedIdentifier_STATUS{}), generators) + + return tableSignedIdentifier_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForTableSignedIdentifier_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTableSignedIdentifier_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForTableSignedIdentifier_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForTableSignedIdentifier_STATUS(gens map[string]gopter.Gen) { + gens["AccessPolicy"] = gen.PtrOf(TableAccessPolicy_STATUSGenerator()) +} + +func Test_TableAccessPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TableAccessPolicy to TableAccessPolicy via AssignProperties_To_TableAccessPolicy & AssignProperties_From_TableAccessPolicy returns original", + prop.ForAll(RunPropertyAssignmentTestForTableAccessPolicy, TableAccessPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTableAccessPolicy tests if a specific instance of TableAccessPolicy can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTableAccessPolicy(subject TableAccessPolicy) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TableAccessPolicy + err := copied.AssignProperties_To_TableAccessPolicy(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TableAccessPolicy + err = actual.AssignProperties_From_TableAccessPolicy(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_TableAccessPolicy_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableAccessPolicy via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableAccessPolicy, TableAccessPolicyGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableAccessPolicy runs a test to see if a specific instance of TableAccessPolicy round trips to JSON and back losslessly +func RunJSONSerializationTestForTableAccessPolicy(subject TableAccessPolicy) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableAccessPolicy + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableAccessPolicy instances for property testing - lazily instantiated by TableAccessPolicyGenerator() +var tableAccessPolicyGenerator gopter.Gen + +// TableAccessPolicyGenerator returns a generator of TableAccessPolicy instances for property testing. +func TableAccessPolicyGenerator() gopter.Gen { + if tableAccessPolicyGenerator != nil { + return tableAccessPolicyGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableAccessPolicy(generators) + tableAccessPolicyGenerator = gen.Struct(reflect.TypeOf(TableAccessPolicy{}), generators) + + return tableAccessPolicyGenerator +} + +// AddIndependentPropertyGeneratorsForTableAccessPolicy is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTableAccessPolicy(gens map[string]gopter.Gen) { + gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString()) + gens["Permission"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_TableAccessPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TableAccessPolicy_STATUS to TableAccessPolicy_STATUS via AssignProperties_To_TableAccessPolicy_STATUS & AssignProperties_From_TableAccessPolicy_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForTableAccessPolicy_STATUS, TableAccessPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTableAccessPolicy_STATUS tests if a specific instance of TableAccessPolicy_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForTableAccessPolicy_STATUS(subject TableAccessPolicy_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20230101s.TableAccessPolicy_STATUS + err := copied.AssignProperties_To_TableAccessPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TableAccessPolicy_STATUS + err = actual.AssignProperties_From_TableAccessPolicy_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_TableAccessPolicy_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TableAccessPolicy_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTableAccessPolicy_STATUS, TableAccessPolicy_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTableAccessPolicy_STATUS runs a test to see if a specific instance of TableAccessPolicy_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForTableAccessPolicy_STATUS(subject TableAccessPolicy_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TableAccessPolicy_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of TableAccessPolicy_STATUS instances for property testing - lazily instantiated by +// TableAccessPolicy_STATUSGenerator() +var tableAccessPolicy_STATUSGenerator gopter.Gen + +// TableAccessPolicy_STATUSGenerator returns a generator of TableAccessPolicy_STATUS instances for property testing. +func TableAccessPolicy_STATUSGenerator() gopter.Gen { + if tableAccessPolicy_STATUSGenerator != nil { + return tableAccessPolicy_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTableAccessPolicy_STATUS(generators) + tableAccessPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(TableAccessPolicy_STATUS{}), generators) + + return tableAccessPolicy_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForTableAccessPolicy_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTableAccessPolicy_STATUS(gens map[string]gopter.Gen) { + gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString()) + gens["Permission"] = gen.PtrOf(gen.AlphaString()) + gens["StartTime"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/storage/v1api20230101/structure.txt b/v2/api/storage/v1api20230101/structure.txt new file mode 100644 index 00000000000..f405d796189 --- /dev/null +++ b/v2/api/storage/v1api20230101/structure.txt @@ -0,0 +1,2278 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101 +├── APIVersion: Enum (1 value) +│ └── "2023-01-01" +├── StorageAccount: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup +│ ├── Spec: Object (32 properties) +│ │ ├── AccessTier: *Enum (3 values) +│ │ │ ├── "Cool" +│ │ │ ├── "Hot" +│ │ │ └── "Premium" +│ │ ├── AllowBlobPublicAccess: *bool +│ │ ├── AllowCrossTenantReplication: *bool +│ │ ├── AllowSharedKeyAccess: *bool +│ │ ├── AllowedCopyScope: *Enum (2 values) +│ │ │ ├── "AAD" +│ │ │ └── "PrivateLink" +│ │ ├── AzureFilesIdentityBasedAuthentication: *Object (3 properties) +│ │ │ ├── ActiveDirectoryProperties: *Object (8 properties) +│ │ │ │ ├── AccountType: *Enum (2 values) +│ │ │ │ │ ├── "Computer" +│ │ │ │ │ └── "User" +│ │ │ │ ├── AzureStorageSid: *string +│ │ │ │ ├── DomainGuid: *string +│ │ │ │ ├── DomainName: *string +│ │ │ │ ├── DomainSid: *string +│ │ │ │ ├── ForestName: *string +│ │ │ │ ├── NetBiosDomainName: *string +│ │ │ │ └── SamAccountName: *string +│ │ │ ├── DefaultSharePermission: *Enum (4 values) +│ │ │ │ ├── "None" +│ │ │ │ ├── "StorageFileDataSmbShareContributor" +│ │ │ │ ├── "StorageFileDataSmbShareElevatedContributor" +│ │ │ │ └── "StorageFileDataSmbShareReader" +│ │ │ └── DirectoryServiceOptions: *Enum (4 values) +│ │ │ ├── "AADDS" +│ │ │ ├── "AADKERB" +│ │ │ ├── "AD" +│ │ │ └── "None" +│ │ ├── AzureName: Validated (3 rules) +│ │ │ ├── Rule 0: MaxLength: 24 +│ │ │ ├── Rule 1: MinLength: 3 +│ │ │ └── Rule 2: Pattern: "^[a-z0-9]+$" +│ │ ├── CustomDomain: *Object (2 properties) +│ │ │ ├── Name: *string +│ │ │ └── UseSubDomainName: *bool +│ │ ├── DefaultToOAuthAuthentication: *bool +│ │ ├── DnsEndpointType: *Enum (2 values) +│ │ │ ├── "AzureDnsZone" +│ │ │ └── "Standard" +│ │ ├── Encryption: *Object (5 properties) +│ │ │ ├── Identity: *Object (2 properties) +│ │ │ │ ├── FederatedIdentityClientId: *string +│ │ │ │ └── UserAssignedIdentityReference: *genruntime.ResourceReference +│ │ │ ├── KeySource: *Enum (2 values) +│ │ │ │ ├── "Microsoft.Keyvault" +│ │ │ │ └── "Microsoft.Storage" +│ │ │ ├── Keyvaultproperties: *Object (3 properties) +│ │ │ │ ├── Keyname: *string +│ │ │ │ ├── Keyvaulturi: *string +│ │ │ │ └── Keyversion: *string +│ │ │ ├── RequireInfrastructureEncryption: *bool +│ │ │ └── Services: *Object (4 properties) +│ │ │ ├── Blob: *Object (2 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ └── KeyType: *Enum (2 values) +│ │ │ │ ├── "Account" +│ │ │ │ └── "Service" +│ │ │ ├── File: *Object (2 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ └── KeyType: *Enum (2 values) +│ │ │ │ ├── "Account" +│ │ │ │ └── "Service" +│ │ │ ├── Queue: *Object (2 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ └── KeyType: *Enum (2 values) +│ │ │ │ ├── "Account" +│ │ │ │ └── "Service" +│ │ │ └── Table: *Object (2 properties) +│ │ │ ├── Enabled: *bool +│ │ │ └── KeyType: *Enum (2 values) +│ │ │ ├── "Account" +│ │ │ └── "Service" +│ │ ├── ExtendedLocation: *Object (2 properties) +│ │ │ ├── Name: *string +│ │ │ └── Type: *Enum (1 value) +│ │ │ └── "EdgeZone" +│ │ ├── Identity: *Object (2 properties) +│ │ │ ├── Type: *Enum (4 values) +│ │ │ │ ├── "None" +│ │ │ │ ├── "SystemAssigned" +│ │ │ │ ├── "SystemAssigned,UserAssigned" +│ │ │ │ └── "UserAssigned" +│ │ │ └── UserAssignedIdentities: Object (1 property)[] +│ │ │ └── Reference: genruntime.ResourceReference +│ │ ├── ImmutableStorageWithVersioning: *Object (2 properties) +│ │ │ ├── Enabled: *bool +│ │ │ └── ImmutabilityPolicy: *Object (3 properties) +│ │ │ ├── AllowProtectedAppendWrites: *bool +│ │ │ ├── ImmutabilityPeriodSinceCreationInDays: Validated<*int> (2 rules) +│ │ │ │ ├── Rule 0: Maximum: 146000 +│ │ │ │ └── Rule 1: Minimum: 1 +│ │ │ └── State: *Enum (3 values) +│ │ │ ├── "Disabled" +│ │ │ ├── "Locked" +│ │ │ └── "Unlocked" +│ │ ├── IsHnsEnabled: *bool +│ │ ├── IsLocalUserEnabled: *bool +│ │ ├── IsNfsV3Enabled: *bool +│ │ ├── IsSftpEnabled: *bool +│ │ ├── KeyPolicy: *Object (1 property) +│ │ │ └── KeyExpirationPeriodInDays: *int +│ │ ├── Kind: *Enum (5 values) +│ │ │ ├── "BlobStorage" +│ │ │ ├── "BlockBlobStorage" +│ │ │ ├── "FileStorage" +│ │ │ ├── "Storage" +│ │ │ └── "StorageV2" +│ │ ├── LargeFileSharesState: *Enum (2 values) +│ │ │ ├── "Disabled" +│ │ │ └── "Enabled" +│ │ ├── Location: *string +│ │ ├── MinimumTlsVersion: *Enum (3 values) +│ │ │ ├── "TLS1_0" +│ │ │ ├── "TLS1_1" +│ │ │ └── "TLS1_2" +│ │ ├── NetworkAcls: *Object (5 properties) +│ │ │ ├── Bypass: *Enum (4 values) +│ │ │ │ ├── "AzureServices" +│ │ │ │ ├── "Logging" +│ │ │ │ ├── "Metrics" +│ │ │ │ └── "None" +│ │ │ ├── DefaultAction: *Enum (2 values) +│ │ │ │ ├── "Allow" +│ │ │ │ └── "Deny" +│ │ │ ├── IpRules: Object (2 properties)[] +│ │ │ │ ├── Action: *Enum (1 value) +│ │ │ │ │ └── "Allow" +│ │ │ │ └── Value: *string +│ │ │ ├── ResourceAccessRules: Object (2 properties)[] +│ │ │ │ ├── ResourceReference: *genruntime.ResourceReference +│ │ │ │ └── TenantId: *string +│ │ │ └── VirtualNetworkRules: Object (3 properties)[] +│ │ │ ├── Action: *Enum (1 value) +│ │ │ │ └── "Allow" +│ │ │ ├── Reference: *genruntime.ResourceReference +│ │ │ └── State: *Enum (5 values) +│ │ │ ├── "Deprovisioning" +│ │ │ ├── "Failed" +│ │ │ ├── "NetworkSourceDeleted" +│ │ │ ├── "Provisioning" +│ │ │ └── "Succeeded" +│ │ ├── OperatorSpec: *Object (2 properties) +│ │ │ ├── ConfigMaps: *Object (6 properties) +│ │ │ │ ├── BlobEndpoint: *genruntime.ConfigMapDestination +│ │ │ │ ├── DfsEndpoint: *genruntime.ConfigMapDestination +│ │ │ │ ├── FileEndpoint: *genruntime.ConfigMapDestination +│ │ │ │ ├── QueueEndpoint: *genruntime.ConfigMapDestination +│ │ │ │ ├── TableEndpoint: *genruntime.ConfigMapDestination +│ │ │ │ └── WebEndpoint: *genruntime.ConfigMapDestination +│ │ │ └── Secrets: *Object (8 properties) +│ │ │ ├── BlobEndpoint: *genruntime.SecretDestination +│ │ │ ├── DfsEndpoint: *genruntime.SecretDestination +│ │ │ ├── FileEndpoint: *genruntime.SecretDestination +│ │ │ ├── Key1: *genruntime.SecretDestination +│ │ │ ├── Key2: *genruntime.SecretDestination +│ │ │ ├── QueueEndpoint: *genruntime.SecretDestination +│ │ │ ├── TableEndpoint: *genruntime.SecretDestination +│ │ │ └── WebEndpoint: *genruntime.SecretDestination +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── PublicNetworkAccess: *Enum (2 values) +│ │ │ ├── "Disabled" +│ │ │ └── "Enabled" +│ │ ├── RoutingPreference: *Object (3 properties) +│ │ │ ├── PublishInternetEndpoints: *bool +│ │ │ ├── PublishMicrosoftEndpoints: *bool +│ │ │ └── RoutingChoice: *Enum (2 values) +│ │ │ ├── "InternetRouting" +│ │ │ └── "MicrosoftRouting" +│ │ ├── SasPolicy: *Object (2 properties) +│ │ │ ├── ExpirationAction: *Enum (1 value) +│ │ │ │ └── "Log" +│ │ │ └── SasExpirationPeriod: *string +│ │ ├── Sku: *Object (2 properties) +│ │ │ ├── Name: *Enum (8 values) +│ │ │ │ ├── "Premium_LRS" +│ │ │ │ ├── "Premium_ZRS" +│ │ │ │ ├── "Standard_GRS" +│ │ │ │ ├── "Standard_GZRS" +│ │ │ │ ├── "Standard_LRS" +│ │ │ │ ├── "Standard_RAGRS" +│ │ │ │ ├── "Standard_RAGZRS" +│ │ │ │ └── "Standard_ZRS" +│ │ │ └── Tier: *Enum (2 values) +│ │ │ ├── "Premium" +│ │ │ └── "Standard" +│ │ ├── SupportsHttpsTrafficOnly: *bool +│ │ └── Tags: map[string]string +│ └── Status: Object (50 properties) +│ ├── AccessTier: *Enum (3 values) +│ │ ├── "Cool" +│ │ ├── "Hot" +│ │ └── "Premium" +│ ├── AccountMigrationInProgress: *bool +│ ├── AllowBlobPublicAccess: *bool +│ ├── AllowCrossTenantReplication: *bool +│ ├── AllowSharedKeyAccess: *bool +│ ├── AllowedCopyScope: *Enum (2 values) +│ │ ├── "AAD" +│ │ └── "PrivateLink" +│ ├── AzureFilesIdentityBasedAuthentication: *Object (3 properties) +│ │ ├── ActiveDirectoryProperties: *Object (8 properties) +│ │ │ ├── AccountType: *Enum (2 values) +│ │ │ │ ├── "Computer" +│ │ │ │ └── "User" +│ │ │ ├── AzureStorageSid: *string +│ │ │ ├── DomainGuid: *string +│ │ │ ├── DomainName: *string +│ │ │ ├── DomainSid: *string +│ │ │ ├── ForestName: *string +│ │ │ ├── NetBiosDomainName: *string +│ │ │ └── SamAccountName: *string +│ │ ├── DefaultSharePermission: *Enum (4 values) +│ │ │ ├── "None" +│ │ │ ├── "StorageFileDataSmbShareContributor" +│ │ │ ├── "StorageFileDataSmbShareElevatedContributor" +│ │ │ └── "StorageFileDataSmbShareReader" +│ │ └── DirectoryServiceOptions: *Enum (4 values) +│ │ ├── "AADDS" +│ │ ├── "AADKERB" +│ │ ├── "AD" +│ │ └── "None" +│ ├── BlobRestoreStatus: *Object (4 properties) +│ │ ├── FailureReason: *string +│ │ ├── Parameters: *Object (2 properties) +│ │ │ ├── BlobRanges: Object (2 properties)[] +│ │ │ │ ├── EndRange: *string +│ │ │ │ └── StartRange: *string +│ │ │ └── TimeToRestore: *string +│ │ ├── RestoreId: *string +│ │ └── Status: *Enum (3 values) +│ │ ├── "Complete" +│ │ ├── "Failed" +│ │ └── "InProgress" +│ ├── Conditions: conditions.Condition[] +│ ├── CreationTime: *string +│ ├── CustomDomain: *Object (2 properties) +│ │ ├── Name: *string +│ │ └── UseSubDomainName: *bool +│ ├── DefaultToOAuthAuthentication: *bool +│ ├── DnsEndpointType: *Enum (2 values) +│ │ ├── "AzureDnsZone" +│ │ └── "Standard" +│ ├── Encryption: *Object (5 properties) +│ │ ├── Identity: *Object (2 properties) +│ │ │ ├── FederatedIdentityClientId: *string +│ │ │ └── UserAssignedIdentity: *string +│ │ ├── KeySource: *Enum (2 values) +│ │ │ ├── "Microsoft.Keyvault" +│ │ │ └── "Microsoft.Storage" +│ │ ├── Keyvaultproperties: *Object (6 properties) +│ │ │ ├── CurrentVersionedKeyExpirationTimestamp: *string +│ │ │ ├── CurrentVersionedKeyIdentifier: *string +│ │ │ ├── Keyname: *string +│ │ │ ├── Keyvaulturi: *string +│ │ │ ├── Keyversion: *string +│ │ │ └── LastKeyRotationTimestamp: *string +│ │ ├── RequireInfrastructureEncryption: *bool +│ │ └── Services: *Object (4 properties) +│ │ ├── Blob: *Object (3 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── KeyType: *Enum (2 values) +│ │ │ │ ├── "Account" +│ │ │ │ └── "Service" +│ │ │ └── LastEnabledTime: *string +│ │ ├── File: *Object (3 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── KeyType: *Enum (2 values) +│ │ │ │ ├── "Account" +│ │ │ │ └── "Service" +│ │ │ └── LastEnabledTime: *string +│ │ ├── Queue: *Object (3 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── KeyType: *Enum (2 values) +│ │ │ │ ├── "Account" +│ │ │ │ └── "Service" +│ │ │ └── LastEnabledTime: *string +│ │ └── Table: *Object (3 properties) +│ │ ├── Enabled: *bool +│ │ ├── KeyType: *Enum (2 values) +│ │ │ ├── "Account" +│ │ │ └── "Service" +│ │ └── LastEnabledTime: *string +│ ├── ExtendedLocation: *Object (2 properties) +│ │ ├── Name: *string +│ │ └── Type: *Enum (1 value) +│ │ └── "EdgeZone" +│ ├── FailoverInProgress: *bool +│ ├── GeoReplicationStats: *Object (6 properties) +│ │ ├── CanFailover: *bool +│ │ ├── CanPlannedFailover: *bool +│ │ ├── LastSyncTime: *string +│ │ ├── PostFailoverRedundancy: *Enum (2 values) +│ │ │ ├── "Standard_LRS" +│ │ │ └── "Standard_ZRS" +│ │ ├── PostPlannedFailoverRedundancy: *Enum (4 values) +│ │ │ ├── "Standard_GRS" +│ │ │ ├── "Standard_GZRS" +│ │ │ ├── "Standard_RAGRS" +│ │ │ └── "Standard_RAGZRS" +│ │ └── Status: *Enum (3 values) +│ │ ├── "Bootstrap" +│ │ ├── "Live" +│ │ └── "Unavailable" +│ ├── Id: *string +│ ├── Identity: *Object (4 properties) +│ │ ├── PrincipalId: *string +│ │ ├── TenantId: *string +│ │ ├── Type: *Enum (4 values) +│ │ │ ├── "None" +│ │ │ ├── "SystemAssigned" +│ │ │ ├── "SystemAssigned,UserAssigned" +│ │ │ └── "UserAssigned" +│ │ └── UserAssignedIdentities: map[string]Object (2 properties) +│ │ ├── ClientId: *string +│ │ └── PrincipalId: *string +│ ├── ImmutableStorageWithVersioning: *Object (2 properties) +│ │ ├── Enabled: *bool +│ │ └── ImmutabilityPolicy: *Object (3 properties) +│ │ ├── AllowProtectedAppendWrites: *bool +│ │ ├── ImmutabilityPeriodSinceCreationInDays: *int +│ │ └── State: *Enum (3 values) +│ │ ├── "Disabled" +│ │ ├── "Locked" +│ │ └── "Unlocked" +│ ├── IsHnsEnabled: *bool +│ ├── IsLocalUserEnabled: *bool +│ ├── IsNfsV3Enabled: *bool +│ ├── IsSftpEnabled: *bool +│ ├── IsSkuConversionBlocked: *bool +│ ├── KeyCreationTime: *Object (2 properties) +│ │ ├── Key1: *string +│ │ └── Key2: *string +│ ├── KeyPolicy: *Object (1 property) +│ │ └── KeyExpirationPeriodInDays: *int +│ ├── Kind: *Enum (5 values) +│ │ ├── "BlobStorage" +│ │ ├── "BlockBlobStorage" +│ │ ├── "FileStorage" +│ │ ├── "Storage" +│ │ └── "StorageV2" +│ ├── LargeFileSharesState: *Enum (2 values) +│ │ ├── "Disabled" +│ │ └── "Enabled" +│ ├── LastGeoFailoverTime: *string +│ ├── Location: *string +│ ├── MinimumTlsVersion: *Enum (3 values) +│ │ ├── "TLS1_0" +│ │ ├── "TLS1_1" +│ │ └── "TLS1_2" +│ ├── Name: *string +│ ├── NetworkAcls: *Object (5 properties) +│ │ ├── Bypass: *Enum (4 values) +│ │ │ ├── "AzureServices" +│ │ │ ├── "Logging" +│ │ │ ├── "Metrics" +│ │ │ └── "None" +│ │ ├── DefaultAction: *Enum (2 values) +│ │ │ ├── "Allow" +│ │ │ └── "Deny" +│ │ ├── IpRules: Object (2 properties)[] +│ │ │ ├── Action: *Enum (1 value) +│ │ │ │ └── "Allow" +│ │ │ └── Value: *string +│ │ ├── ResourceAccessRules: Object (2 properties)[] +│ │ │ ├── ResourceId: *string +│ │ │ └── TenantId: *string +│ │ └── VirtualNetworkRules: Object (3 properties)[] +│ │ ├── Action: *Enum (1 value) +│ │ │ └── "Allow" +│ │ ├── Id: *string +│ │ └── State: *Enum (5 values) +│ │ ├── "Deprovisioning" +│ │ ├── "Failed" +│ │ ├── "NetworkSourceDeleted" +│ │ ├── "Provisioning" +│ │ └── "Succeeded" +│ ├── PrimaryEndpoints: *Object (8 properties) +│ │ ├── Blob: *string +│ │ ├── Dfs: *string +│ │ ├── File: *string +│ │ ├── InternetEndpoints: *Object (4 properties) +│ │ │ ├── Blob: *string +│ │ │ ├── Dfs: *string +│ │ │ ├── File: *string +│ │ │ └── Web: *string +│ │ ├── MicrosoftEndpoints: *Object (6 properties) +│ │ │ ├── Blob: *string +│ │ │ ├── Dfs: *string +│ │ │ ├── File: *string +│ │ │ ├── Queue: *string +│ │ │ ├── Table: *string +│ │ │ └── Web: *string +│ │ ├── Queue: *string +│ │ ├── Table: *string +│ │ └── Web: *string +│ ├── PrimaryLocation: *string +│ ├── PrivateEndpointConnections: Object (1 property)[] +│ │ └── Id: *string +│ ├── ProvisioningState: *Enum (3 values) +│ │ ├── "Creating" +│ │ ├── "ResolvingDNS" +│ │ └── "Succeeded" +│ ├── PublicNetworkAccess: *Enum (2 values) +│ │ ├── "Disabled" +│ │ └── "Enabled" +│ ├── RoutingPreference: *Object (3 properties) +│ │ ├── PublishInternetEndpoints: *bool +│ │ ├── PublishMicrosoftEndpoints: *bool +│ │ └── RoutingChoice: *Enum (2 values) +│ │ ├── "InternetRouting" +│ │ └── "MicrosoftRouting" +│ ├── SasPolicy: *Object (2 properties) +│ │ ├── ExpirationAction: *Enum (1 value) +│ │ │ └── "Log" +│ │ └── SasExpirationPeriod: *string +│ ├── SecondaryEndpoints: *Object (8 properties) +│ │ ├── Blob: *string +│ │ ├── Dfs: *string +│ │ ├── File: *string +│ │ ├── InternetEndpoints: *Object (4 properties) +│ │ │ ├── Blob: *string +│ │ │ ├── Dfs: *string +│ │ │ ├── File: *string +│ │ │ └── Web: *string +│ │ ├── MicrosoftEndpoints: *Object (6 properties) +│ │ │ ├── Blob: *string +│ │ │ ├── Dfs: *string +│ │ │ ├── File: *string +│ │ │ ├── Queue: *string +│ │ │ ├── Table: *string +│ │ │ └── Web: *string +│ │ ├── Queue: *string +│ │ ├── Table: *string +│ │ └── Web: *string +│ ├── SecondaryLocation: *string +│ ├── Sku: *Object (2 properties) +│ │ ├── Name: *Enum (8 values) +│ │ │ ├── "Premium_LRS" +│ │ │ ├── "Premium_ZRS" +│ │ │ ├── "Standard_GRS" +│ │ │ ├── "Standard_GZRS" +│ │ │ ├── "Standard_LRS" +│ │ │ ├── "Standard_RAGRS" +│ │ │ ├── "Standard_RAGZRS" +│ │ │ └── "Standard_ZRS" +│ │ └── Tier: *Enum (2 values) +│ │ ├── "Premium" +│ │ └── "Standard" +│ ├── StatusOfPrimary: *Enum (2 values) +│ │ ├── "available" +│ │ └── "unavailable" +│ ├── StatusOfSecondary: *Enum (2 values) +│ │ ├── "available" +│ │ └── "unavailable" +│ ├── StorageAccountSkuConversionStatus: *Object (4 properties) +│ │ ├── EndTime: *string +│ │ ├── SkuConversionStatus: *Enum (3 values) +│ │ │ ├── "Failed" +│ │ │ ├── "InProgress" +│ │ │ └── "Succeeded" +│ │ ├── StartTime: *string +│ │ └── TargetSkuName: *Enum (8 values) +│ │ ├── "Premium_LRS" +│ │ ├── "Premium_ZRS" +│ │ ├── "Standard_GRS" +│ │ ├── "Standard_GZRS" +│ │ ├── "Standard_LRS" +│ │ ├── "Standard_RAGRS" +│ │ ├── "Standard_RAGZRS" +│ │ └── "Standard_ZRS" +│ ├── SupportsHttpsTrafficOnly: *bool +│ ├── Tags: map[string]string +│ └── Type: *string +├── StorageAccount_STATUS_ARM: Object (10 properties) +│ ├── ExtendedLocation: *Object (2 properties) +│ │ ├── Name: *string +│ │ └── Type: *Enum (1 value) +│ │ └── "EdgeZone" +│ ├── Id: *string +│ ├── Identity: *Object (4 properties) +│ │ ├── PrincipalId: *string +│ │ ├── TenantId: *string +│ │ ├── Type: *Enum (4 values) +│ │ │ ├── "None" +│ │ │ ├── "SystemAssigned" +│ │ │ ├── "SystemAssigned,UserAssigned" +│ │ │ └── "UserAssigned" +│ │ └── UserAssignedIdentities: map[string]Object (2 properties) +│ │ ├── ClientId: *string +│ │ └── PrincipalId: *string +│ ├── Kind: *Enum (5 values) +│ │ ├── "BlobStorage" +│ │ ├── "BlockBlobStorage" +│ │ ├── "FileStorage" +│ │ ├── "Storage" +│ │ └── "StorageV2" +│ ├── Location: *string +│ ├── Name: *string +│ ├── Properties: *Object (40 properties) +│ │ ├── AccessTier: *Enum (3 values) +│ │ │ ├── "Cool" +│ │ │ ├── "Hot" +│ │ │ └── "Premium" +│ │ ├── AccountMigrationInProgress: *bool +│ │ ├── AllowBlobPublicAccess: *bool +│ │ ├── AllowCrossTenantReplication: *bool +│ │ ├── AllowSharedKeyAccess: *bool +│ │ ├── AllowedCopyScope: *Enum (2 values) +│ │ │ ├── "AAD" +│ │ │ └── "PrivateLink" +│ │ ├── AzureFilesIdentityBasedAuthentication: *Object (3 properties) +│ │ │ ├── ActiveDirectoryProperties: *Object (8 properties) +│ │ │ │ ├── AccountType: *Enum (2 values) +│ │ │ │ │ ├── "Computer" +│ │ │ │ │ └── "User" +│ │ │ │ ├── AzureStorageSid: *string +│ │ │ │ ├── DomainGuid: *string +│ │ │ │ ├── DomainName: *string +│ │ │ │ ├── DomainSid: *string +│ │ │ │ ├── ForestName: *string +│ │ │ │ ├── NetBiosDomainName: *string +│ │ │ │ └── SamAccountName: *string +│ │ │ ├── DefaultSharePermission: *Enum (4 values) +│ │ │ │ ├── "None" +│ │ │ │ ├── "StorageFileDataSmbShareContributor" +│ │ │ │ ├── "StorageFileDataSmbShareElevatedContributor" +│ │ │ │ └── "StorageFileDataSmbShareReader" +│ │ │ └── DirectoryServiceOptions: *Enum (4 values) +│ │ │ ├── "AADDS" +│ │ │ ├── "AADKERB" +│ │ │ ├── "AD" +│ │ │ └── "None" +│ │ ├── BlobRestoreStatus: *Object (4 properties) +│ │ │ ├── FailureReason: *string +│ │ │ ├── Parameters: *Object (2 properties) +│ │ │ │ ├── BlobRanges: Object (2 properties)[] +│ │ │ │ │ ├── EndRange: *string +│ │ │ │ │ └── StartRange: *string +│ │ │ │ └── TimeToRestore: *string +│ │ │ ├── RestoreId: *string +│ │ │ └── Status: *Enum (3 values) +│ │ │ ├── "Complete" +│ │ │ ├── "Failed" +│ │ │ └── "InProgress" +│ │ ├── CreationTime: *string +│ │ ├── CustomDomain: *Object (2 properties) +│ │ │ ├── Name: *string +│ │ │ └── UseSubDomainName: *bool +│ │ ├── DefaultToOAuthAuthentication: *bool +│ │ ├── DnsEndpointType: *Enum (2 values) +│ │ │ ├── "AzureDnsZone" +│ │ │ └── "Standard" +│ │ ├── Encryption: *Object (5 properties) +│ │ │ ├── Identity: *Object (2 properties) +│ │ │ │ ├── FederatedIdentityClientId: *string +│ │ │ │ └── UserAssignedIdentity: *string +│ │ │ ├── KeySource: *Enum (2 values) +│ │ │ │ ├── "Microsoft.Keyvault" +│ │ │ │ └── "Microsoft.Storage" +│ │ │ ├── Keyvaultproperties: *Object (6 properties) +│ │ │ │ ├── CurrentVersionedKeyExpirationTimestamp: *string +│ │ │ │ ├── CurrentVersionedKeyIdentifier: *string +│ │ │ │ ├── Keyname: *string +│ │ │ │ ├── Keyvaulturi: *string +│ │ │ │ ├── Keyversion: *string +│ │ │ │ └── LastKeyRotationTimestamp: *string +│ │ │ ├── RequireInfrastructureEncryption: *bool +│ │ │ └── Services: *Object (4 properties) +│ │ │ ├── Blob: *Object (3 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ ├── KeyType: *Enum (2 values) +│ │ │ │ │ ├── "Account" +│ │ │ │ │ └── "Service" +│ │ │ │ └── LastEnabledTime: *string +│ │ │ ├── File: *Object (3 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ ├── KeyType: *Enum (2 values) +│ │ │ │ │ ├── "Account" +│ │ │ │ │ └── "Service" +│ │ │ │ └── LastEnabledTime: *string +│ │ │ ├── Queue: *Object (3 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ ├── KeyType: *Enum (2 values) +│ │ │ │ │ ├── "Account" +│ │ │ │ │ └── "Service" +│ │ │ │ └── LastEnabledTime: *string +│ │ │ └── Table: *Object (3 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── KeyType: *Enum (2 values) +│ │ │ │ ├── "Account" +│ │ │ │ └── "Service" +│ │ │ └── LastEnabledTime: *string +│ │ ├── FailoverInProgress: *bool +│ │ ├── GeoReplicationStats: *Object (6 properties) +│ │ │ ├── CanFailover: *bool +│ │ │ ├── CanPlannedFailover: *bool +│ │ │ ├── LastSyncTime: *string +│ │ │ ├── PostFailoverRedundancy: *Enum (2 values) +│ │ │ │ ├── "Standard_LRS" +│ │ │ │ └── "Standard_ZRS" +│ │ │ ├── PostPlannedFailoverRedundancy: *Enum (4 values) +│ │ │ │ ├── "Standard_GRS" +│ │ │ │ ├── "Standard_GZRS" +│ │ │ │ ├── "Standard_RAGRS" +│ │ │ │ └── "Standard_RAGZRS" +│ │ │ └── Status: *Enum (3 values) +│ │ │ ├── "Bootstrap" +│ │ │ ├── "Live" +│ │ │ └── "Unavailable" +│ │ ├── ImmutableStorageWithVersioning: *Object (2 properties) +│ │ │ ├── Enabled: *bool +│ │ │ └── ImmutabilityPolicy: *Object (3 properties) +│ │ │ ├── AllowProtectedAppendWrites: *bool +│ │ │ ├── ImmutabilityPeriodSinceCreationInDays: *int +│ │ │ └── State: *Enum (3 values) +│ │ │ ├── "Disabled" +│ │ │ ├── "Locked" +│ │ │ └── "Unlocked" +│ │ ├── IsHnsEnabled: *bool +│ │ ├── IsLocalUserEnabled: *bool +│ │ ├── IsNfsV3Enabled: *bool +│ │ ├── IsSftpEnabled: *bool +│ │ ├── IsSkuConversionBlocked: *bool +│ │ ├── KeyCreationTime: *Object (2 properties) +│ │ │ ├── Key1: *string +│ │ │ └── Key2: *string +│ │ ├── KeyPolicy: *Object (1 property) +│ │ │ └── KeyExpirationPeriodInDays: *int +│ │ ├── LargeFileSharesState: *Enum (2 values) +│ │ │ ├── "Disabled" +│ │ │ └── "Enabled" +│ │ ├── LastGeoFailoverTime: *string +│ │ ├── MinimumTlsVersion: *Enum (3 values) +│ │ │ ├── "TLS1_0" +│ │ │ ├── "TLS1_1" +│ │ │ └── "TLS1_2" +│ │ ├── NetworkAcls: *Object (5 properties) +│ │ │ ├── Bypass: *Enum (4 values) +│ │ │ │ ├── "AzureServices" +│ │ │ │ ├── "Logging" +│ │ │ │ ├── "Metrics" +│ │ │ │ └── "None" +│ │ │ ├── DefaultAction: *Enum (2 values) +│ │ │ │ ├── "Allow" +│ │ │ │ └── "Deny" +│ │ │ ├── IpRules: Object (2 properties)[] +│ │ │ │ ├── Action: *Enum (1 value) +│ │ │ │ │ └── "Allow" +│ │ │ │ └── Value: *string +│ │ │ ├── ResourceAccessRules: Object (2 properties)[] +│ │ │ │ ├── ResourceId: *string +│ │ │ │ └── TenantId: *string +│ │ │ └── VirtualNetworkRules: Object (3 properties)[] +│ │ │ ├── Action: *Enum (1 value) +│ │ │ │ └── "Allow" +│ │ │ ├── Id: *string +│ │ │ └── State: *Enum (5 values) +│ │ │ ├── "Deprovisioning" +│ │ │ ├── "Failed" +│ │ │ ├── "NetworkSourceDeleted" +│ │ │ ├── "Provisioning" +│ │ │ └── "Succeeded" +│ │ ├── PrimaryEndpoints: *Object (8 properties) +│ │ │ ├── Blob: *string +│ │ │ ├── Dfs: *string +│ │ │ ├── File: *string +│ │ │ ├── InternetEndpoints: *Object (4 properties) +│ │ │ │ ├── Blob: *string +│ │ │ │ ├── Dfs: *string +│ │ │ │ ├── File: *string +│ │ │ │ └── Web: *string +│ │ │ ├── MicrosoftEndpoints: *Object (6 properties) +│ │ │ │ ├── Blob: *string +│ │ │ │ ├── Dfs: *string +│ │ │ │ ├── File: *string +│ │ │ │ ├── Queue: *string +│ │ │ │ ├── Table: *string +│ │ │ │ └── Web: *string +│ │ │ ├── Queue: *string +│ │ │ ├── Table: *string +│ │ │ └── Web: *string +│ │ ├── PrimaryLocation: *string +│ │ ├── PrivateEndpointConnections: Object (1 property)[] +│ │ │ └── Id: *string +│ │ ├── ProvisioningState: *Enum (3 values) +│ │ │ ├── "Creating" +│ │ │ ├── "ResolvingDNS" +│ │ │ └── "Succeeded" +│ │ ├── PublicNetworkAccess: *Enum (2 values) +│ │ │ ├── "Disabled" +│ │ │ └── "Enabled" +│ │ ├── RoutingPreference: *Object (3 properties) +│ │ │ ├── PublishInternetEndpoints: *bool +│ │ │ ├── PublishMicrosoftEndpoints: *bool +│ │ │ └── RoutingChoice: *Enum (2 values) +│ │ │ ├── "InternetRouting" +│ │ │ └── "MicrosoftRouting" +│ │ ├── SasPolicy: *Object (2 properties) +│ │ │ ├── ExpirationAction: *Enum (1 value) +│ │ │ │ └── "Log" +│ │ │ └── SasExpirationPeriod: *string +│ │ ├── SecondaryEndpoints: *Object (8 properties) +│ │ │ ├── Blob: *string +│ │ │ ├── Dfs: *string +│ │ │ ├── File: *string +│ │ │ ├── InternetEndpoints: *Object (4 properties) +│ │ │ │ ├── Blob: *string +│ │ │ │ ├── Dfs: *string +│ │ │ │ ├── File: *string +│ │ │ │ └── Web: *string +│ │ │ ├── MicrosoftEndpoints: *Object (6 properties) +│ │ │ │ ├── Blob: *string +│ │ │ │ ├── Dfs: *string +│ │ │ │ ├── File: *string +│ │ │ │ ├── Queue: *string +│ │ │ │ ├── Table: *string +│ │ │ │ └── Web: *string +│ │ │ ├── Queue: *string +│ │ │ ├── Table: *string +│ │ │ └── Web: *string +│ │ ├── SecondaryLocation: *string +│ │ ├── StatusOfPrimary: *Enum (2 values) +│ │ │ ├── "available" +│ │ │ └── "unavailable" +│ │ ├── StatusOfSecondary: *Enum (2 values) +│ │ │ ├── "available" +│ │ │ └── "unavailable" +│ │ ├── StorageAccountSkuConversionStatus: *Object (4 properties) +│ │ │ ├── EndTime: *string +│ │ │ ├── SkuConversionStatus: *Enum (3 values) +│ │ │ │ ├── "Failed" +│ │ │ │ ├── "InProgress" +│ │ │ │ └── "Succeeded" +│ │ │ ├── StartTime: *string +│ │ │ └── TargetSkuName: *Enum (8 values) +│ │ │ ├── "Premium_LRS" +│ │ │ ├── "Premium_ZRS" +│ │ │ ├── "Standard_GRS" +│ │ │ ├── "Standard_GZRS" +│ │ │ ├── "Standard_LRS" +│ │ │ ├── "Standard_RAGRS" +│ │ │ ├── "Standard_RAGZRS" +│ │ │ └── "Standard_ZRS" +│ │ └── SupportsHttpsTrafficOnly: *bool +│ ├── Sku: *Object (2 properties) +│ │ ├── Name: *Enum (8 values) +│ │ │ ├── "Premium_LRS" +│ │ │ ├── "Premium_ZRS" +│ │ │ ├── "Standard_GRS" +│ │ │ ├── "Standard_GZRS" +│ │ │ ├── "Standard_LRS" +│ │ │ ├── "Standard_RAGRS" +│ │ │ ├── "Standard_RAGZRS" +│ │ │ └── "Standard_ZRS" +│ │ └── Tier: *Enum (2 values) +│ │ ├── "Premium" +│ │ └── "Standard" +│ ├── Tags: map[string]string +│ └── Type: *string +├── StorageAccount_Spec_ARM: Object (8 properties) +│ ├── ExtendedLocation: *Object (2 properties) +│ │ ├── Name: *string +│ │ └── Type: *Enum (1 value) +│ │ └── "EdgeZone" +│ ├── Identity: *Object (2 properties) +│ │ ├── Type: *Enum (4 values) +│ │ │ ├── "None" +│ │ │ ├── "SystemAssigned" +│ │ │ ├── "SystemAssigned,UserAssigned" +│ │ │ └── "UserAssigned" +│ │ └── UserAssignedIdentities: map[string]Object (0 properties) +│ ├── Kind: *Enum (5 values) +│ │ ├── "BlobStorage" +│ │ ├── "BlockBlobStorage" +│ │ ├── "FileStorage" +│ │ ├── "Storage" +│ │ └── "StorageV2" +│ ├── Location: *string +│ ├── Name: string +│ ├── Properties: *Object (23 properties) +│ │ ├── AccessTier: *Enum (3 values) +│ │ │ ├── "Cool" +│ │ │ ├── "Hot" +│ │ │ └── "Premium" +│ │ ├── AllowBlobPublicAccess: *bool +│ │ ├── AllowCrossTenantReplication: *bool +│ │ ├── AllowSharedKeyAccess: *bool +│ │ ├── AllowedCopyScope: *Enum (2 values) +│ │ │ ├── "AAD" +│ │ │ └── "PrivateLink" +│ │ ├── AzureFilesIdentityBasedAuthentication: *Object (3 properties) +│ │ │ ├── ActiveDirectoryProperties: *Object (8 properties) +│ │ │ │ ├── AccountType: *Enum (2 values) +│ │ │ │ │ ├── "Computer" +│ │ │ │ │ └── "User" +│ │ │ │ ├── AzureStorageSid: *string +│ │ │ │ ├── DomainGuid: *string +│ │ │ │ ├── DomainName: *string +│ │ │ │ ├── DomainSid: *string +│ │ │ │ ├── ForestName: *string +│ │ │ │ ├── NetBiosDomainName: *string +│ │ │ │ └── SamAccountName: *string +│ │ │ ├── DefaultSharePermission: *Enum (4 values) +│ │ │ │ ├── "None" +│ │ │ │ ├── "StorageFileDataSmbShareContributor" +│ │ │ │ ├── "StorageFileDataSmbShareElevatedContributor" +│ │ │ │ └── "StorageFileDataSmbShareReader" +│ │ │ └── DirectoryServiceOptions: *Enum (4 values) +│ │ │ ├── "AADDS" +│ │ │ ├── "AADKERB" +│ │ │ ├── "AD" +│ │ │ └── "None" +│ │ ├── CustomDomain: *Object (2 properties) +│ │ │ ├── Name: *string +│ │ │ └── UseSubDomainName: *bool +│ │ ├── DefaultToOAuthAuthentication: *bool +│ │ ├── DnsEndpointType: *Enum (2 values) +│ │ │ ├── "AzureDnsZone" +│ │ │ └── "Standard" +│ │ ├── Encryption: *Object (5 properties) +│ │ │ ├── Identity: *Object (2 properties) +│ │ │ │ ├── FederatedIdentityClientId: *string +│ │ │ │ └── UserAssignedIdentity: *string +│ │ │ ├── KeySource: *Enum (2 values) +│ │ │ │ ├── "Microsoft.Keyvault" +│ │ │ │ └── "Microsoft.Storage" +│ │ │ ├── Keyvaultproperties: *Object (3 properties) +│ │ │ │ ├── Keyname: *string +│ │ │ │ ├── Keyvaulturi: *string +│ │ │ │ └── Keyversion: *string +│ │ │ ├── RequireInfrastructureEncryption: *bool +│ │ │ └── Services: *Object (4 properties) +│ │ │ ├── Blob: *Object (2 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ └── KeyType: *Enum (2 values) +│ │ │ │ ├── "Account" +│ │ │ │ └── "Service" +│ │ │ ├── File: *Object (2 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ └── KeyType: *Enum (2 values) +│ │ │ │ ├── "Account" +│ │ │ │ └── "Service" +│ │ │ ├── Queue: *Object (2 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ └── KeyType: *Enum (2 values) +│ │ │ │ ├── "Account" +│ │ │ │ └── "Service" +│ │ │ └── Table: *Object (2 properties) +│ │ │ ├── Enabled: *bool +│ │ │ └── KeyType: *Enum (2 values) +│ │ │ ├── "Account" +│ │ │ └── "Service" +│ │ ├── ImmutableStorageWithVersioning: *Object (2 properties) +│ │ │ ├── Enabled: *bool +│ │ │ └── ImmutabilityPolicy: *Object (3 properties) +│ │ │ ├── AllowProtectedAppendWrites: *bool +│ │ │ ├── ImmutabilityPeriodSinceCreationInDays: *int +│ │ │ └── State: *Enum (3 values) +│ │ │ ├── "Disabled" +│ │ │ ├── "Locked" +│ │ │ └── "Unlocked" +│ │ ├── IsHnsEnabled: *bool +│ │ ├── IsLocalUserEnabled: *bool +│ │ ├── IsNfsV3Enabled: *bool +│ │ ├── IsSftpEnabled: *bool +│ │ ├── KeyPolicy: *Object (1 property) +│ │ │ └── KeyExpirationPeriodInDays: *int +│ │ ├── LargeFileSharesState: *Enum (2 values) +│ │ │ ├── "Disabled" +│ │ │ └── "Enabled" +│ │ ├── MinimumTlsVersion: *Enum (3 values) +│ │ │ ├── "TLS1_0" +│ │ │ ├── "TLS1_1" +│ │ │ └── "TLS1_2" +│ │ ├── NetworkAcls: *Object (5 properties) +│ │ │ ├── Bypass: *Enum (4 values) +│ │ │ │ ├── "AzureServices" +│ │ │ │ ├── "Logging" +│ │ │ │ ├── "Metrics" +│ │ │ │ └── "None" +│ │ │ ├── DefaultAction: *Enum (2 values) +│ │ │ │ ├── "Allow" +│ │ │ │ └── "Deny" +│ │ │ ├── IpRules: Object (2 properties)[] +│ │ │ │ ├── Action: *Enum (1 value) +│ │ │ │ │ └── "Allow" +│ │ │ │ └── Value: *string +│ │ │ ├── ResourceAccessRules: Object (2 properties)[] +│ │ │ │ ├── ResourceId: *string +│ │ │ │ └── TenantId: *string +│ │ │ └── VirtualNetworkRules: Object (3 properties)[] +│ │ │ ├── Action: *Enum (1 value) +│ │ │ │ └── "Allow" +│ │ │ ├── Id: *string +│ │ │ └── State: *Enum (5 values) +│ │ │ ├── "Deprovisioning" +│ │ │ ├── "Failed" +│ │ │ ├── "NetworkSourceDeleted" +│ │ │ ├── "Provisioning" +│ │ │ └── "Succeeded" +│ │ ├── PublicNetworkAccess: *Enum (2 values) +│ │ │ ├── "Disabled" +│ │ │ └── "Enabled" +│ │ ├── RoutingPreference: *Object (3 properties) +│ │ │ ├── PublishInternetEndpoints: *bool +│ │ │ ├── PublishMicrosoftEndpoints: *bool +│ │ │ └── RoutingChoice: *Enum (2 values) +│ │ │ ├── "InternetRouting" +│ │ │ └── "MicrosoftRouting" +│ │ ├── SasPolicy: *Object (2 properties) +│ │ │ ├── ExpirationAction: *Enum (1 value) +│ │ │ │ └── "Log" +│ │ │ └── SasExpirationPeriod: *string +│ │ └── SupportsHttpsTrafficOnly: *bool +│ ├── Sku: *Object (2 properties) +│ │ ├── Name: *Enum (8 values) +│ │ │ ├── "Premium_LRS" +│ │ │ ├── "Premium_ZRS" +│ │ │ ├── "Standard_GRS" +│ │ │ ├── "Standard_GZRS" +│ │ │ ├── "Standard_LRS" +│ │ │ ├── "Standard_RAGRS" +│ │ │ ├── "Standard_RAGZRS" +│ │ │ └── "Standard_ZRS" +│ │ └── Tier: *Enum (2 values) +│ │ ├── "Premium" +│ │ └── "Standard" +│ └── Tags: map[string]string +├── StorageAccountsBlobService: Resource +│ ├── Owner: StorageAccount +│ ├── Spec: Object (10 properties) +│ │ ├── AutomaticSnapshotPolicyEnabled: *bool +│ │ ├── ChangeFeed: *Object (2 properties) +│ │ │ ├── Enabled: *bool +│ │ │ └── RetentionInDays: Validated<*int> (2 rules) +│ │ │ ├── Rule 0: Maximum: 146000 +│ │ │ └── Rule 1: Minimum: 1 +│ │ ├── ContainerDeleteRetentionPolicy: *Object (3 properties) +│ │ │ ├── AllowPermanentDelete: *bool +│ │ │ ├── Days: Validated<*int> (2 rules) +│ │ │ │ ├── Rule 0: Maximum: 365 +│ │ │ │ └── Rule 1: Minimum: 1 +│ │ │ └── Enabled: *bool +│ │ ├── Cors: *Object (1 property) +│ │ │ └── CorsRules: Object (5 properties)[] +│ │ │ ├── AllowedHeaders: string[] +│ │ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ │ ├── "CONNECT" +│ │ │ │ ├── "DELETE" +│ │ │ │ ├── "GET" +│ │ │ │ ├── "HEAD" +│ │ │ │ ├── "MERGE" +│ │ │ │ ├── "OPTIONS" +│ │ │ │ ├── "PATCH" +│ │ │ │ ├── "POST" +│ │ │ │ ├── "PUT" +│ │ │ │ └── "TRACE" +│ │ │ ├── AllowedOrigins: string[] +│ │ │ ├── ExposedHeaders: string[] +│ │ │ └── MaxAgeInSeconds: *int +│ │ ├── DefaultServiceVersion: *string +│ │ ├── DeleteRetentionPolicy: *Object (3 properties) +│ │ │ ├── AllowPermanentDelete: *bool +│ │ │ ├── Days: Validated<*int> (2 rules) +│ │ │ │ ├── Rule 0: Maximum: 365 +│ │ │ │ └── Rule 1: Minimum: 1 +│ │ │ └── Enabled: *bool +│ │ ├── IsVersioningEnabled: *bool +│ │ ├── LastAccessTimeTrackingPolicy: *Object (4 properties) +│ │ │ ├── BlobType: string[] +│ │ │ ├── Enable: *bool +│ │ │ ├── Name: *Enum (1 value) +│ │ │ │ └── "AccessTimeTracking" +│ │ │ └── TrackingGranularityInDays: *int +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ └── RestorePolicy: *Object (2 properties) +│ │ ├── Days: Validated<*int> (2 rules) +│ │ │ ├── Rule 0: Maximum: 365 +│ │ │ └── Rule 1: Minimum: 1 +│ │ └── Enabled: *bool +│ └── Status: Object (14 properties) +│ ├── AutomaticSnapshotPolicyEnabled: *bool +│ ├── ChangeFeed: *Object (2 properties) +│ │ ├── Enabled: *bool +│ │ └── RetentionInDays: *int +│ ├── Conditions: conditions.Condition[] +│ ├── ContainerDeleteRetentionPolicy: *Object (3 properties) +│ │ ├── AllowPermanentDelete: *bool +│ │ ├── Days: *int +│ │ └── Enabled: *bool +│ ├── Cors: *Object (1 property) +│ │ └── CorsRules: Object (5 properties)[] +│ │ ├── AllowedHeaders: string[] +│ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ ├── "CONNECT" +│ │ │ ├── "DELETE" +│ │ │ ├── "GET" +│ │ │ ├── "HEAD" +│ │ │ ├── "MERGE" +│ │ │ ├── "OPTIONS" +│ │ │ ├── "PATCH" +│ │ │ ├── "POST" +│ │ │ ├── "PUT" +│ │ │ └── "TRACE" +│ │ ├── AllowedOrigins: string[] +│ │ ├── ExposedHeaders: string[] +│ │ └── MaxAgeInSeconds: *int +│ ├── DefaultServiceVersion: *string +│ ├── DeleteRetentionPolicy: *Object (3 properties) +│ │ ├── AllowPermanentDelete: *bool +│ │ ├── Days: *int +│ │ └── Enabled: *bool +│ ├── Id: *string +│ ├── IsVersioningEnabled: *bool +│ ├── LastAccessTimeTrackingPolicy: *Object (4 properties) +│ │ ├── BlobType: string[] +│ │ ├── Enable: *bool +│ │ ├── Name: *Enum (1 value) +│ │ │ └── "AccessTimeTracking" +│ │ └── TrackingGranularityInDays: *int +│ ├── Name: *string +│ ├── RestorePolicy: *Object (4 properties) +│ │ ├── Days: *int +│ │ ├── Enabled: *bool +│ │ ├── LastEnabledTime: *string +│ │ └── MinRestoreTime: *string +│ ├── Sku: *Object (2 properties) +│ │ ├── Name: *Enum (8 values) +│ │ │ ├── "Premium_LRS" +│ │ │ ├── "Premium_ZRS" +│ │ │ ├── "Standard_GRS" +│ │ │ ├── "Standard_GZRS" +│ │ │ ├── "Standard_LRS" +│ │ │ ├── "Standard_RAGRS" +│ │ │ ├── "Standard_RAGZRS" +│ │ │ └── "Standard_ZRS" +│ │ └── Tier: *Enum (2 values) +│ │ ├── "Premium" +│ │ └── "Standard" +│ └── Type: *string +├── StorageAccountsBlobServicesContainer: Resource +│ ├── Owner: StorageAccountsBlobService +│ ├── Spec: Object (9 properties) +│ │ ├── AzureName: Validated (2 rules) +│ │ │ ├── Rule 0: MaxLength: 63 +│ │ │ └── Rule 1: MinLength: 3 +│ │ ├── DefaultEncryptionScope: *string +│ │ ├── DenyEncryptionScopeOverride: *bool +│ │ ├── EnableNfsV3AllSquash: *bool +│ │ ├── EnableNfsV3RootSquash: *bool +│ │ ├── ImmutableStorageWithVersioning: *Object (1 property) +│ │ │ └── Enabled: *bool +│ │ ├── Metadata: map[string]string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ └── PublicAccess: *Enum (3 values) +│ │ ├── "Blob" +│ │ ├── "Container" +│ │ └── "None" +│ └── Status: Object (24 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── DefaultEncryptionScope: *string +│ ├── Deleted: *bool +│ ├── DeletedTime: *string +│ ├── DenyEncryptionScopeOverride: *bool +│ ├── EnableNfsV3AllSquash: *bool +│ ├── EnableNfsV3RootSquash: *bool +│ ├── Etag: *string +│ ├── HasImmutabilityPolicy: *bool +│ ├── HasLegalHold: *bool +│ ├── Id: *string +│ ├── ImmutabilityPolicy: *Object (6 properties) +│ │ ├── AllowProtectedAppendWrites: *bool +│ │ ├── AllowProtectedAppendWritesAll: *bool +│ │ ├── Etag: *string +│ │ ├── ImmutabilityPeriodSinceCreationInDays: *int +│ │ ├── State: *Enum (2 values) +│ │ │ ├── "Locked" +│ │ │ └── "Unlocked" +│ │ └── UpdateHistory: Object (8 properties)[] +│ │ ├── AllowProtectedAppendWrites: *bool +│ │ ├── AllowProtectedAppendWritesAll: *bool +│ │ ├── ImmutabilityPeriodSinceCreationInDays: *int +│ │ ├── ObjectIdentifier: *string +│ │ ├── TenantId: *string +│ │ ├── Timestamp: *string +│ │ ├── Update: *Enum (3 values) +│ │ │ ├── "extend" +│ │ │ ├── "lock" +│ │ │ └── "put" +│ │ └── Upn: *string +│ ├── ImmutableStorageWithVersioning: *Object (3 properties) +│ │ ├── Enabled: *bool +│ │ ├── MigrationState: *Enum (2 values) +│ │ │ ├── "Completed" +│ │ │ └── "InProgress" +│ │ └── TimeStamp: *string +│ ├── LastModifiedTime: *string +│ ├── LeaseDuration: *Enum (2 values) +│ │ ├── "Fixed" +│ │ └── "Infinite" +│ ├── LeaseState: *Enum (5 values) +│ │ ├── "Available" +│ │ ├── "Breaking" +│ │ ├── "Broken" +│ │ ├── "Expired" +│ │ └── "Leased" +│ ├── LeaseStatus: *Enum (2 values) +│ │ ├── "Locked" +│ │ └── "Unlocked" +│ ├── LegalHold: *Object (3 properties) +│ │ ├── HasLegalHold: *bool +│ │ ├── ProtectedAppendWritesHistory: *Object (2 properties) +│ │ │ ├── AllowProtectedAppendWritesAll: *bool +│ │ │ └── Timestamp: *string +│ │ └── Tags: Object (5 properties)[] +│ │ ├── ObjectIdentifier: *string +│ │ ├── Tag: *string +│ │ ├── TenantId: *string +│ │ ├── Timestamp: *string +│ │ └── Upn: *string +│ ├── Metadata: map[string]string +│ ├── Name: *string +│ ├── PublicAccess: *Enum (3 values) +│ │ ├── "Blob" +│ │ ├── "Container" +│ │ └── "None" +│ ├── RemainingRetentionDays: *int +│ ├── Type: *string +│ └── Version: *string +├── StorageAccountsFileService: Resource +│ ├── Owner: StorageAccount +│ ├── Spec: Object (4 properties) +│ │ ├── Cors: *Object (1 property) +│ │ │ └── CorsRules: Object (5 properties)[] +│ │ │ ├── AllowedHeaders: string[] +│ │ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ │ ├── "CONNECT" +│ │ │ │ ├── "DELETE" +│ │ │ │ ├── "GET" +│ │ │ │ ├── "HEAD" +│ │ │ │ ├── "MERGE" +│ │ │ │ ├── "OPTIONS" +│ │ │ │ ├── "PATCH" +│ │ │ │ ├── "POST" +│ │ │ │ ├── "PUT" +│ │ │ │ └── "TRACE" +│ │ │ ├── AllowedOrigins: string[] +│ │ │ ├── ExposedHeaders: string[] +│ │ │ └── MaxAgeInSeconds: *int +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── ProtocolSettings: *Object (1 property) +│ │ │ └── Smb: *Object (5 properties) +│ │ │ ├── AuthenticationMethods: *string +│ │ │ ├── ChannelEncryption: *string +│ │ │ ├── KerberosTicketEncryption: *string +│ │ │ ├── Multichannel: *Object (1 property) +│ │ │ │ └── Enabled: *bool +│ │ │ └── Versions: *string +│ │ └── ShareDeleteRetentionPolicy: *Object (3 properties) +│ │ ├── AllowPermanentDelete: *bool +│ │ ├── Days: Validated<*int> (2 rules) +│ │ │ ├── Rule 0: Maximum: 365 +│ │ │ └── Rule 1: Minimum: 1 +│ │ └── Enabled: *bool +│ └── Status: Object (8 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Cors: *Object (1 property) +│ │ └── CorsRules: Object (5 properties)[] +│ │ ├── AllowedHeaders: string[] +│ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ ├── "CONNECT" +│ │ │ ├── "DELETE" +│ │ │ ├── "GET" +│ │ │ ├── "HEAD" +│ │ │ ├── "MERGE" +│ │ │ ├── "OPTIONS" +│ │ │ ├── "PATCH" +│ │ │ ├── "POST" +│ │ │ ├── "PUT" +│ │ │ └── "TRACE" +│ │ ├── AllowedOrigins: string[] +│ │ ├── ExposedHeaders: string[] +│ │ └── MaxAgeInSeconds: *int +│ ├── Id: *string +│ ├── Name: *string +│ ├── ProtocolSettings: *Object (1 property) +│ │ └── Smb: *Object (5 properties) +│ │ ├── AuthenticationMethods: *string +│ │ ├── ChannelEncryption: *string +│ │ ├── KerberosTicketEncryption: *string +│ │ ├── Multichannel: *Object (1 property) +│ │ │ └── Enabled: *bool +│ │ └── Versions: *string +│ ├── ShareDeleteRetentionPolicy: *Object (3 properties) +│ │ ├── AllowPermanentDelete: *bool +│ │ ├── Days: *int +│ │ └── Enabled: *bool +│ ├── Sku: *Object (2 properties) +│ │ ├── Name: *Enum (8 values) +│ │ │ ├── "Premium_LRS" +│ │ │ ├── "Premium_ZRS" +│ │ │ ├── "Standard_GRS" +│ │ │ ├── "Standard_GZRS" +│ │ │ ├── "Standard_LRS" +│ │ │ ├── "Standard_RAGRS" +│ │ │ ├── "Standard_RAGZRS" +│ │ │ └── "Standard_ZRS" +│ │ └── Tier: *Enum (2 values) +│ │ ├── "Premium" +│ │ └── "Standard" +│ └── Type: *string +├── StorageAccountsFileServicesShare: Resource +│ ├── Owner: StorageAccountsFileService +│ ├── Spec: Object (8 properties) +│ │ ├── AccessTier: *Enum (4 values) +│ │ │ ├── "Cool" +│ │ │ ├── "Hot" +│ │ │ ├── "Premium" +│ │ │ └── "TransactionOptimized" +│ │ ├── AzureName: Validated (2 rules) +│ │ │ ├── Rule 0: MaxLength: 63 +│ │ │ └── Rule 1: MinLength: 3 +│ │ ├── EnabledProtocols: *Enum (2 values) +│ │ │ ├── "NFS" +│ │ │ └── "SMB" +│ │ ├── Metadata: map[string]string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── RootSquash: *Enum (3 values) +│ │ │ ├── "AllSquash" +│ │ │ ├── "NoRootSquash" +│ │ │ └── "RootSquash" +│ │ ├── ShareQuota: Validated<*int> (2 rules) +│ │ │ ├── Rule 0: Maximum: 102400 +│ │ │ └── Rule 1: Minimum: 1 +│ │ └── SignedIdentifiers: Object (2 properties)[] +│ │ ├── AccessPolicy: *Object (3 properties) +│ │ │ ├── ExpiryTime: *string +│ │ │ ├── Permission: *string +│ │ │ └── StartTime: *string +│ │ └── Reference: *genruntime.ResourceReference +│ └── Status: Object (23 properties) +│ ├── AccessTier: *Enum (4 values) +│ │ ├── "Cool" +│ │ ├── "Hot" +│ │ ├── "Premium" +│ │ └── "TransactionOptimized" +│ ├── AccessTierChangeTime: *string +│ ├── AccessTierStatus: *string +│ ├── Conditions: conditions.Condition[] +│ ├── Deleted: *bool +│ ├── DeletedTime: *string +│ ├── EnabledProtocols: *Enum (2 values) +│ │ ├── "NFS" +│ │ └── "SMB" +│ ├── Etag: *string +│ ├── Id: *string +│ ├── LastModifiedTime: *string +│ ├── LeaseDuration: *Enum (2 values) +│ │ ├── "Fixed" +│ │ └── "Infinite" +│ ├── LeaseState: *Enum (5 values) +│ │ ├── "Available" +│ │ ├── "Breaking" +│ │ ├── "Broken" +│ │ ├── "Expired" +│ │ └── "Leased" +│ ├── LeaseStatus: *Enum (2 values) +│ │ ├── "Locked" +│ │ └── "Unlocked" +│ ├── Metadata: map[string]string +│ ├── Name: *string +│ ├── RemainingRetentionDays: *int +│ ├── RootSquash: *Enum (3 values) +│ │ ├── "AllSquash" +│ │ ├── "NoRootSquash" +│ │ └── "RootSquash" +│ ├── ShareQuota: *int +│ ├── ShareUsageBytes: *int +│ ├── SignedIdentifiers: Object (2 properties)[] +│ │ ├── AccessPolicy: *Object (3 properties) +│ │ │ ├── ExpiryTime: *string +│ │ │ ├── Permission: *string +│ │ │ └── StartTime: *string +│ │ └── Id: *string +│ ├── SnapshotTime: *string +│ ├── Type: *string +│ └── Version: *string +├── StorageAccountsManagementPolicy: Resource +│ ├── Owner: StorageAccount +│ ├── Spec: Object (2 properties) +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ └── Policy: *Object (1 property) +│ │ └── Rules: Object (4 properties)[] +│ │ ├── Definition: *Object (2 properties) +│ │ │ ├── Actions: *Object (3 properties) +│ │ │ │ ├── BaseBlob: *Object (6 properties) +│ │ │ │ │ ├── Delete: *Object (4 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ └── DaysAfterModificationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ ├── EnableAutoTierToHotFromCool: *bool +│ │ │ │ │ ├── TierToArchive: *Object (4 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ └── DaysAfterModificationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ ├── TierToCold: *Object (4 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ └── DaysAfterModificationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ ├── TierToCool: *Object (4 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ └── DaysAfterModificationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ └── TierToHot: *Object (4 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ └── DaysAfterModificationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ ├── Snapshot: *Object (5 properties) +│ │ │ │ │ ├── Delete: *Object (2 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ ├── TierToArchive: *Object (2 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ ├── TierToCold: *Object (2 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ ├── TierToCool: *Object (2 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ └── TierToHot: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ └── Version: *Object (5 properties) +│ │ │ │ ├── Delete: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ ├── TierToArchive: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ ├── TierToCold: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ ├── TierToCool: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ └── TierToHot: *Object (2 properties) +│ │ │ │ ├── DaysAfterCreationGreaterThan: Validated<*int> (2 rules) +│ │ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ │ └── DaysAfterLastTierChangeGreaterThan: Validated<*int> (2 rules) +│ │ │ │ ├── Rule 0: Minimum: 0 +│ │ │ │ └── Rule 1: MultipleOf: 1 +│ │ │ └── Filters: *Object (3 properties) +│ │ │ ├── BlobIndexMatch: Object (3 properties)[] +│ │ │ │ ├── Name: Validated<*string> (2 rules) +│ │ │ │ │ ├── Rule 0: MaxLength: 128 +│ │ │ │ │ └── Rule 1: MinLength: 1 +│ │ │ │ ├── Op: *string +│ │ │ │ └── Value: Validated<*string> (2 rules) +│ │ │ │ ├── Rule 0: MaxLength: 256 +│ │ │ │ └── Rule 1: MinLength: 0 +│ │ │ ├── BlobTypes: string[] +│ │ │ └── PrefixMatch: string[] +│ │ ├── Enabled: *bool +│ │ ├── Name: *string +│ │ └── Type: *Enum (1 value) +│ │ └── "Lifecycle" +│ └── Status: Object (6 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Id: *string +│ ├── LastModifiedTime: *string +│ ├── Name: *string +│ ├── Policy: *Object (1 property) +│ │ └── Rules: Object (4 properties)[] +│ │ ├── Definition: *Object (2 properties) +│ │ │ ├── Actions: *Object (3 properties) +│ │ │ │ ├── BaseBlob: *Object (6 properties) +│ │ │ │ │ ├── Delete: *Object (4 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ ├── EnableAutoTierToHotFromCool: *bool +│ │ │ │ │ ├── TierToArchive: *Object (4 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ ├── TierToCold: *Object (4 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ ├── TierToCool: *Object (4 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ └── TierToHot: *Object (4 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ └── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ ├── Snapshot: *Object (5 properties) +│ │ │ │ │ ├── Delete: *Object (2 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ ├── TierToArchive: *Object (2 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ ├── TierToCold: *Object (2 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ ├── TierToCool: *Object (2 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ └── TierToHot: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ └── Version: *Object (5 properties) +│ │ │ │ ├── Delete: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ ├── TierToArchive: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ ├── TierToCold: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ ├── TierToCool: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ └── TierToHot: *Object (2 properties) +│ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ └── Filters: *Object (3 properties) +│ │ │ ├── BlobIndexMatch: Object (3 properties)[] +│ │ │ │ ├── Name: *string +│ │ │ │ ├── Op: *string +│ │ │ │ └── Value: *string +│ │ │ ├── BlobTypes: string[] +│ │ │ └── PrefixMatch: string[] +│ │ ├── Enabled: *bool +│ │ ├── Name: *string +│ │ └── Type: *Enum (1 value) +│ │ └── "Lifecycle" +│ └── Type: *string +├── StorageAccountsQueueService: Resource +│ ├── Owner: StorageAccount +│ ├── Spec: Object (2 properties) +│ │ ├── Cors: *Object (1 property) +│ │ │ └── CorsRules: Object (5 properties)[] +│ │ │ ├── AllowedHeaders: string[] +│ │ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ │ ├── "CONNECT" +│ │ │ │ ├── "DELETE" +│ │ │ │ ├── "GET" +│ │ │ │ ├── "HEAD" +│ │ │ │ ├── "MERGE" +│ │ │ │ ├── "OPTIONS" +│ │ │ │ ├── "PATCH" +│ │ │ │ ├── "POST" +│ │ │ │ ├── "PUT" +│ │ │ │ └── "TRACE" +│ │ │ ├── AllowedOrigins: string[] +│ │ │ ├── ExposedHeaders: string[] +│ │ │ └── MaxAgeInSeconds: *int +│ │ └── Owner: *genruntime.KnownResourceReference +│ └── Status: Object (5 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Cors: *Object (1 property) +│ │ └── CorsRules: Object (5 properties)[] +│ │ ├── AllowedHeaders: string[] +│ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ ├── "CONNECT" +│ │ │ ├── "DELETE" +│ │ │ ├── "GET" +│ │ │ ├── "HEAD" +│ │ │ ├── "MERGE" +│ │ │ ├── "OPTIONS" +│ │ │ ├── "PATCH" +│ │ │ ├── "POST" +│ │ │ ├── "PUT" +│ │ │ └── "TRACE" +│ │ ├── AllowedOrigins: string[] +│ │ ├── ExposedHeaders: string[] +│ │ └── MaxAgeInSeconds: *int +│ ├── Id: *string +│ ├── Name: *string +│ └── Type: *string +├── StorageAccountsQueueServicesQueue: Resource +│ ├── Owner: StorageAccountsQueueService +│ ├── Spec: Object (3 properties) +│ │ ├── AzureName: Validated (2 rules) +│ │ │ ├── Rule 0: MaxLength: 63 +│ │ │ └── Rule 1: MinLength: 3 +│ │ ├── Metadata: map[string]string +│ │ └── Owner: *genruntime.KnownResourceReference +│ └── Status: Object (6 properties) +│ ├── ApproximateMessageCount: *int +│ ├── Conditions: conditions.Condition[] +│ ├── Id: *string +│ ├── Metadata: map[string]string +│ ├── Name: *string +│ └── Type: *string +├── StorageAccountsTableService: Resource +│ ├── Owner: StorageAccount +│ ├── Spec: Object (2 properties) +│ │ ├── Cors: *Object (1 property) +│ │ │ └── CorsRules: Object (5 properties)[] +│ │ │ ├── AllowedHeaders: string[] +│ │ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ │ ├── "CONNECT" +│ │ │ │ ├── "DELETE" +│ │ │ │ ├── "GET" +│ │ │ │ ├── "HEAD" +│ │ │ │ ├── "MERGE" +│ │ │ │ ├── "OPTIONS" +│ │ │ │ ├── "PATCH" +│ │ │ │ ├── "POST" +│ │ │ │ ├── "PUT" +│ │ │ │ └── "TRACE" +│ │ │ ├── AllowedOrigins: string[] +│ │ │ ├── ExposedHeaders: string[] +│ │ │ └── MaxAgeInSeconds: *int +│ │ └── Owner: *genruntime.KnownResourceReference +│ └── Status: Object (5 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Cors: *Object (1 property) +│ │ └── CorsRules: Object (5 properties)[] +│ │ ├── AllowedHeaders: string[] +│ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ ├── "CONNECT" +│ │ │ ├── "DELETE" +│ │ │ ├── "GET" +│ │ │ ├── "HEAD" +│ │ │ ├── "MERGE" +│ │ │ ├── "OPTIONS" +│ │ │ ├── "PATCH" +│ │ │ ├── "POST" +│ │ │ ├── "PUT" +│ │ │ └── "TRACE" +│ │ ├── AllowedOrigins: string[] +│ │ ├── ExposedHeaders: string[] +│ │ └── MaxAgeInSeconds: *int +│ ├── Id: *string +│ ├── Name: *string +│ └── Type: *string +├── StorageAccountsTableServicesTable: Resource +│ ├── Owner: StorageAccountsTableService +│ ├── Spec: Object (3 properties) +│ │ ├── AzureName: Validated (3 rules) +│ │ │ ├── Rule 0: MaxLength: 63 +│ │ │ ├── Rule 1: MinLength: 3 +│ │ │ └── Rule 2: Pattern: "^[A-Za-z][A-Za-z0-9]{2,62}$" +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ └── SignedIdentifiers: Object (2 properties)[] +│ │ ├── AccessPolicy: *Object (3 properties) +│ │ │ ├── ExpiryTime: *string +│ │ │ ├── Permission: *string +│ │ │ └── StartTime: *string +│ │ └── Reference: *genruntime.ResourceReference +│ └── Status: Object (6 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Id: *string +│ ├── Name: *string +│ ├── SignedIdentifiers: Object (2 properties)[] +│ │ ├── AccessPolicy: *Object (3 properties) +│ │ │ ├── ExpiryTime: *string +│ │ │ ├── Permission: *string +│ │ │ └── StartTime: *string +│ │ └── Id: *string +│ ├── TableName: *string +│ └── Type: *string +├── StorageAccounts_BlobService_STATUS_ARM: Object (5 properties) +│ ├── Id: *string +│ ├── Name: *string +│ ├── Properties: *Object (9 properties) +│ │ ├── AutomaticSnapshotPolicyEnabled: *bool +│ │ ├── ChangeFeed: *Object (2 properties) +│ │ │ ├── Enabled: *bool +│ │ │ └── RetentionInDays: *int +│ │ ├── ContainerDeleteRetentionPolicy: *Object (3 properties) +│ │ │ ├── AllowPermanentDelete: *bool +│ │ │ ├── Days: *int +│ │ │ └── Enabled: *bool +│ │ ├── Cors: *Object (1 property) +│ │ │ └── CorsRules: Object (5 properties)[] +│ │ │ ├── AllowedHeaders: string[] +│ │ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ │ ├── "CONNECT" +│ │ │ │ ├── "DELETE" +│ │ │ │ ├── "GET" +│ │ │ │ ├── "HEAD" +│ │ │ │ ├── "MERGE" +│ │ │ │ ├── "OPTIONS" +│ │ │ │ ├── "PATCH" +│ │ │ │ ├── "POST" +│ │ │ │ ├── "PUT" +│ │ │ │ └── "TRACE" +│ │ │ ├── AllowedOrigins: string[] +│ │ │ ├── ExposedHeaders: string[] +│ │ │ └── MaxAgeInSeconds: *int +│ │ ├── DefaultServiceVersion: *string +│ │ ├── DeleteRetentionPolicy: *Object (3 properties) +│ │ │ ├── AllowPermanentDelete: *bool +│ │ │ ├── Days: *int +│ │ │ └── Enabled: *bool +│ │ ├── IsVersioningEnabled: *bool +│ │ ├── LastAccessTimeTrackingPolicy: *Object (4 properties) +│ │ │ ├── BlobType: string[] +│ │ │ ├── Enable: *bool +│ │ │ ├── Name: *Enum (1 value) +│ │ │ │ └── "AccessTimeTracking" +│ │ │ └── TrackingGranularityInDays: *int +│ │ └── RestorePolicy: *Object (4 properties) +│ │ ├── Days: *int +│ │ ├── Enabled: *bool +│ │ ├── LastEnabledTime: *string +│ │ └── MinRestoreTime: *string +│ ├── Sku: *Object (2 properties) +│ │ ├── Name: *Enum (8 values) +│ │ │ ├── "Premium_LRS" +│ │ │ ├── "Premium_ZRS" +│ │ │ ├── "Standard_GRS" +│ │ │ ├── "Standard_GZRS" +│ │ │ ├── "Standard_LRS" +│ │ │ ├── "Standard_RAGRS" +│ │ │ ├── "Standard_RAGZRS" +│ │ │ └── "Standard_ZRS" +│ │ └── Tier: *Enum (2 values) +│ │ ├── "Premium" +│ │ └── "Standard" +│ └── Type: *string +├── StorageAccounts_BlobService_Spec_ARM: Object (2 properties) +│ ├── Name: string +│ └── Properties: *Object (9 properties) +│ ├── AutomaticSnapshotPolicyEnabled: *bool +│ ├── ChangeFeed: *Object (2 properties) +│ │ ├── Enabled: *bool +│ │ └── RetentionInDays: *int +│ ├── ContainerDeleteRetentionPolicy: *Object (3 properties) +│ │ ├── AllowPermanentDelete: *bool +│ │ ├── Days: *int +│ │ └── Enabled: *bool +│ ├── Cors: *Object (1 property) +│ │ └── CorsRules: Object (5 properties)[] +│ │ ├── AllowedHeaders: string[] +│ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ ├── "CONNECT" +│ │ │ ├── "DELETE" +│ │ │ ├── "GET" +│ │ │ ├── "HEAD" +│ │ │ ├── "MERGE" +│ │ │ ├── "OPTIONS" +│ │ │ ├── "PATCH" +│ │ │ ├── "POST" +│ │ │ ├── "PUT" +│ │ │ └── "TRACE" +│ │ ├── AllowedOrigins: string[] +│ │ ├── ExposedHeaders: string[] +│ │ └── MaxAgeInSeconds: *int +│ ├── DefaultServiceVersion: *string +│ ├── DeleteRetentionPolicy: *Object (3 properties) +│ │ ├── AllowPermanentDelete: *bool +│ │ ├── Days: *int +│ │ └── Enabled: *bool +│ ├── IsVersioningEnabled: *bool +│ ├── LastAccessTimeTrackingPolicy: *Object (4 properties) +│ │ ├── BlobType: string[] +│ │ ├── Enable: *bool +│ │ ├── Name: *Enum (1 value) +│ │ │ └── "AccessTimeTracking" +│ │ └── TrackingGranularityInDays: *int +│ └── RestorePolicy: *Object (2 properties) +│ ├── Days: *int +│ └── Enabled: *bool +├── StorageAccounts_BlobServices_Container_STATUS_ARM: Object (5 properties) +│ ├── Etag: *string +│ ├── Id: *string +│ ├── Name: *string +│ ├── Properties: *Object (19 properties) +│ │ ├── DefaultEncryptionScope: *string +│ │ ├── Deleted: *bool +│ │ ├── DeletedTime: *string +│ │ ├── DenyEncryptionScopeOverride: *bool +│ │ ├── EnableNfsV3AllSquash: *bool +│ │ ├── EnableNfsV3RootSquash: *bool +│ │ ├── HasImmutabilityPolicy: *bool +│ │ ├── HasLegalHold: *bool +│ │ ├── ImmutabilityPolicy: *Object (3 properties) +│ │ │ ├── Etag: *string +│ │ │ ├── Properties: *Object (4 properties) +│ │ │ │ ├── AllowProtectedAppendWrites: *bool +│ │ │ │ ├── AllowProtectedAppendWritesAll: *bool +│ │ │ │ ├── ImmutabilityPeriodSinceCreationInDays: *int +│ │ │ │ └── State: *Enum (2 values) +│ │ │ │ ├── "Locked" +│ │ │ │ └── "Unlocked" +│ │ │ └── UpdateHistory: Object (8 properties)[] +│ │ │ ├── AllowProtectedAppendWrites: *bool +│ │ │ ├── AllowProtectedAppendWritesAll: *bool +│ │ │ ├── ImmutabilityPeriodSinceCreationInDays: *int +│ │ │ ├── ObjectIdentifier: *string +│ │ │ ├── TenantId: *string +│ │ │ ├── Timestamp: *string +│ │ │ ├── Update: *Enum (3 values) +│ │ │ │ ├── "extend" +│ │ │ │ ├── "lock" +│ │ │ │ └── "put" +│ │ │ └── Upn: *string +│ │ ├── ImmutableStorageWithVersioning: *Object (3 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── MigrationState: *Enum (2 values) +│ │ │ │ ├── "Completed" +│ │ │ │ └── "InProgress" +│ │ │ └── TimeStamp: *string +│ │ ├── LastModifiedTime: *string +│ │ ├── LeaseDuration: *Enum (2 values) +│ │ │ ├── "Fixed" +│ │ │ └── "Infinite" +│ │ ├── LeaseState: *Enum (5 values) +│ │ │ ├── "Available" +│ │ │ ├── "Breaking" +│ │ │ ├── "Broken" +│ │ │ ├── "Expired" +│ │ │ └── "Leased" +│ │ ├── LeaseStatus: *Enum (2 values) +│ │ │ ├── "Locked" +│ │ │ └── "Unlocked" +│ │ ├── LegalHold: *Object (3 properties) +│ │ │ ├── HasLegalHold: *bool +│ │ │ ├── ProtectedAppendWritesHistory: *Object (2 properties) +│ │ │ │ ├── AllowProtectedAppendWritesAll: *bool +│ │ │ │ └── Timestamp: *string +│ │ │ └── Tags: Object (5 properties)[] +│ │ │ ├── ObjectIdentifier: *string +│ │ │ ├── Tag: *string +│ │ │ ├── TenantId: *string +│ │ │ ├── Timestamp: *string +│ │ │ └── Upn: *string +│ │ ├── Metadata: map[string]string +│ │ ├── PublicAccess: *Enum (3 values) +│ │ │ ├── "Blob" +│ │ │ ├── "Container" +│ │ │ └── "None" +│ │ ├── RemainingRetentionDays: *int +│ │ └── Version: *string +│ └── Type: *string +├── StorageAccounts_BlobServices_Container_Spec_ARM: Object (2 properties) +│ ├── Name: string +│ └── Properties: *Object (7 properties) +│ ├── DefaultEncryptionScope: *string +│ ├── DenyEncryptionScopeOverride: *bool +│ ├── EnableNfsV3AllSquash: *bool +│ ├── EnableNfsV3RootSquash: *bool +│ ├── ImmutableStorageWithVersioning: *Object (1 property) +│ │ └── Enabled: *bool +│ ├── Metadata: map[string]string +│ └── PublicAccess: *Enum (3 values) +│ ├── "Blob" +│ ├── "Container" +│ └── "None" +├── StorageAccounts_FileService_STATUS_ARM: Object (5 properties) +│ ├── Id: *string +│ ├── Name: *string +│ ├── Properties: *Object (3 properties) +│ │ ├── Cors: *Object (1 property) +│ │ │ └── CorsRules: Object (5 properties)[] +│ │ │ ├── AllowedHeaders: string[] +│ │ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ │ ├── "CONNECT" +│ │ │ │ ├── "DELETE" +│ │ │ │ ├── "GET" +│ │ │ │ ├── "HEAD" +│ │ │ │ ├── "MERGE" +│ │ │ │ ├── "OPTIONS" +│ │ │ │ ├── "PATCH" +│ │ │ │ ├── "POST" +│ │ │ │ ├── "PUT" +│ │ │ │ └── "TRACE" +│ │ │ ├── AllowedOrigins: string[] +│ │ │ ├── ExposedHeaders: string[] +│ │ │ └── MaxAgeInSeconds: *int +│ │ ├── ProtocolSettings: *Object (1 property) +│ │ │ └── Smb: *Object (5 properties) +│ │ │ ├── AuthenticationMethods: *string +│ │ │ ├── ChannelEncryption: *string +│ │ │ ├── KerberosTicketEncryption: *string +│ │ │ ├── Multichannel: *Object (1 property) +│ │ │ │ └── Enabled: *bool +│ │ │ └── Versions: *string +│ │ └── ShareDeleteRetentionPolicy: *Object (3 properties) +│ │ ├── AllowPermanentDelete: *bool +│ │ ├── Days: *int +│ │ └── Enabled: *bool +│ ├── Sku: *Object (2 properties) +│ │ ├── Name: *Enum (8 values) +│ │ │ ├── "Premium_LRS" +│ │ │ ├── "Premium_ZRS" +│ │ │ ├── "Standard_GRS" +│ │ │ ├── "Standard_GZRS" +│ │ │ ├── "Standard_LRS" +│ │ │ ├── "Standard_RAGRS" +│ │ │ ├── "Standard_RAGZRS" +│ │ │ └── "Standard_ZRS" +│ │ └── Tier: *Enum (2 values) +│ │ ├── "Premium" +│ │ └── "Standard" +│ └── Type: *string +├── StorageAccounts_FileService_Spec_ARM: Object (2 properties) +│ ├── Name: string +│ └── Properties: *Object (3 properties) +│ ├── Cors: *Object (1 property) +│ │ └── CorsRules: Object (5 properties)[] +│ │ ├── AllowedHeaders: string[] +│ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ ├── "CONNECT" +│ │ │ ├── "DELETE" +│ │ │ ├── "GET" +│ │ │ ├── "HEAD" +│ │ │ ├── "MERGE" +│ │ │ ├── "OPTIONS" +│ │ │ ├── "PATCH" +│ │ │ ├── "POST" +│ │ │ ├── "PUT" +│ │ │ └── "TRACE" +│ │ ├── AllowedOrigins: string[] +│ │ ├── ExposedHeaders: string[] +│ │ └── MaxAgeInSeconds: *int +│ ├── ProtocolSettings: *Object (1 property) +│ │ └── Smb: *Object (5 properties) +│ │ ├── AuthenticationMethods: *string +│ │ ├── ChannelEncryption: *string +│ │ ├── KerberosTicketEncryption: *string +│ │ ├── Multichannel: *Object (1 property) +│ │ │ └── Enabled: *bool +│ │ └── Versions: *string +│ └── ShareDeleteRetentionPolicy: *Object (3 properties) +│ ├── AllowPermanentDelete: *bool +│ ├── Days: *int +│ └── Enabled: *bool +├── StorageAccounts_FileServices_Share_STATUS_ARM: Object (5 properties) +│ ├── Etag: *string +│ ├── Id: *string +│ ├── Name: *string +│ ├── Properties: *Object (18 properties) +│ │ ├── AccessTier: *Enum (4 values) +│ │ │ ├── "Cool" +│ │ │ ├── "Hot" +│ │ │ ├── "Premium" +│ │ │ └── "TransactionOptimized" +│ │ ├── AccessTierChangeTime: *string +│ │ ├── AccessTierStatus: *string +│ │ ├── Deleted: *bool +│ │ ├── DeletedTime: *string +│ │ ├── EnabledProtocols: *Enum (2 values) +│ │ │ ├── "NFS" +│ │ │ └── "SMB" +│ │ ├── LastModifiedTime: *string +│ │ ├── LeaseDuration: *Enum (2 values) +│ │ │ ├── "Fixed" +│ │ │ └── "Infinite" +│ │ ├── LeaseState: *Enum (5 values) +│ │ │ ├── "Available" +│ │ │ ├── "Breaking" +│ │ │ ├── "Broken" +│ │ │ ├── "Expired" +│ │ │ └── "Leased" +│ │ ├── LeaseStatus: *Enum (2 values) +│ │ │ ├── "Locked" +│ │ │ └── "Unlocked" +│ │ ├── Metadata: map[string]string +│ │ ├── RemainingRetentionDays: *int +│ │ ├── RootSquash: *Enum (3 values) +│ │ │ ├── "AllSquash" +│ │ │ ├── "NoRootSquash" +│ │ │ └── "RootSquash" +│ │ ├── ShareQuota: *int +│ │ ├── ShareUsageBytes: *int +│ │ ├── SignedIdentifiers: Object (2 properties)[] +│ │ │ ├── AccessPolicy: *Object (3 properties) +│ │ │ │ ├── ExpiryTime: *string +│ │ │ │ ├── Permission: *string +│ │ │ │ └── StartTime: *string +│ │ │ └── Id: *string +│ │ ├── SnapshotTime: *string +│ │ └── Version: *string +│ └── Type: *string +├── StorageAccounts_FileServices_Share_Spec_ARM: Object (2 properties) +│ ├── Name: string +│ └── Properties: *Object (6 properties) +│ ├── AccessTier: *Enum (4 values) +│ │ ├── "Cool" +│ │ ├── "Hot" +│ │ ├── "Premium" +│ │ └── "TransactionOptimized" +│ ├── EnabledProtocols: *Enum (2 values) +│ │ ├── "NFS" +│ │ └── "SMB" +│ ├── Metadata: map[string]string +│ ├── RootSquash: *Enum (3 values) +│ │ ├── "AllSquash" +│ │ ├── "NoRootSquash" +│ │ └── "RootSquash" +│ ├── ShareQuota: *int +│ └── SignedIdentifiers: Object (2 properties)[] +│ ├── AccessPolicy: *Object (3 properties) +│ │ ├── ExpiryTime: *string +│ │ ├── Permission: *string +│ │ └── StartTime: *string +│ └── Id: *string +├── StorageAccounts_ManagementPolicy_STATUS_ARM: Object (4 properties) +│ ├── Id: *string +│ ├── Name: *string +│ ├── Properties: *Object (2 properties) +│ │ ├── LastModifiedTime: *string +│ │ └── Policy: *Object (1 property) +│ │ └── Rules: Object (4 properties)[] +│ │ ├── Definition: *Object (2 properties) +│ │ │ ├── Actions: *Object (3 properties) +│ │ │ │ ├── BaseBlob: *Object (6 properties) +│ │ │ │ │ ├── Delete: *Object (4 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ ├── EnableAutoTierToHotFromCool: *bool +│ │ │ │ │ ├── TierToArchive: *Object (4 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ ├── TierToCold: *Object (4 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ ├── TierToCool: *Object (4 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ │ └── TierToHot: *Object (4 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *float64 +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ └── DaysAfterModificationGreaterThan: *float64 +│ │ │ │ ├── Snapshot: *Object (5 properties) +│ │ │ │ │ ├── Delete: *Object (2 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ ├── TierToArchive: *Object (2 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ ├── TierToCold: *Object (2 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ ├── TierToCool: *Object (2 properties) +│ │ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ │ └── TierToHot: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ └── Version: *Object (5 properties) +│ │ │ │ ├── Delete: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ ├── TierToArchive: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ ├── TierToCold: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ ├── TierToCool: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ │ └── TierToHot: *Object (2 properties) +│ │ │ │ ├── DaysAfterCreationGreaterThan: *float64 +│ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *float64 +│ │ │ └── Filters: *Object (3 properties) +│ │ │ ├── BlobIndexMatch: Object (3 properties)[] +│ │ │ │ ├── Name: *string +│ │ │ │ ├── Op: *string +│ │ │ │ └── Value: *string +│ │ │ ├── BlobTypes: string[] +│ │ │ └── PrefixMatch: string[] +│ │ ├── Enabled: *bool +│ │ ├── Name: *string +│ │ └── Type: *Enum (1 value) +│ │ └── "Lifecycle" +│ └── Type: *string +├── StorageAccounts_ManagementPolicy_Spec_ARM: Object (2 properties) +│ ├── Name: string +│ └── Properties: *Object (1 property) +│ └── Policy: *Object (1 property) +│ └── Rules: Object (4 properties)[] +│ ├── Definition: *Object (2 properties) +│ │ ├── Actions: *Object (3 properties) +│ │ │ ├── BaseBlob: *Object (6 properties) +│ │ │ │ ├── Delete: *Object (4 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *int +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ └── DaysAfterModificationGreaterThan: *int +│ │ │ │ ├── EnableAutoTierToHotFromCool: *bool +│ │ │ │ ├── TierToArchive: *Object (4 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *int +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ └── DaysAfterModificationGreaterThan: *int +│ │ │ │ ├── TierToCold: *Object (4 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *int +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ └── DaysAfterModificationGreaterThan: *int +│ │ │ │ ├── TierToCool: *Object (4 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *int +│ │ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ │ └── DaysAfterModificationGreaterThan: *int +│ │ │ │ └── TierToHot: *Object (4 properties) +│ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ ├── DaysAfterLastAccessTimeGreaterThan: *int +│ │ │ │ ├── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ └── DaysAfterModificationGreaterThan: *int +│ │ │ ├── Snapshot: *Object (5 properties) +│ │ │ │ ├── Delete: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ ├── TierToArchive: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ ├── TierToCold: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ ├── TierToCool: *Object (2 properties) +│ │ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ │ └── TierToHot: *Object (2 properties) +│ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ └── Version: *Object (5 properties) +│ │ │ ├── Delete: *Object (2 properties) +│ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ ├── TierToArchive: *Object (2 properties) +│ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ ├── TierToCold: *Object (2 properties) +│ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ ├── TierToCool: *Object (2 properties) +│ │ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ │ └── DaysAfterLastTierChangeGreaterThan: *int +│ │ │ └── TierToHot: *Object (2 properties) +│ │ │ ├── DaysAfterCreationGreaterThan: *int +│ │ │ └── DaysAfterLastTierChangeGreaterThan: *int +│ │ └── Filters: *Object (3 properties) +│ │ ├── BlobIndexMatch: Object (3 properties)[] +│ │ │ ├── Name: *string +│ │ │ ├── Op: *string +│ │ │ └── Value: *string +│ │ ├── BlobTypes: string[] +│ │ └── PrefixMatch: string[] +│ ├── Enabled: *bool +│ ├── Name: *string +│ └── Type: *Enum (1 value) +│ └── "Lifecycle" +├── StorageAccounts_QueueService_STATUS_ARM: Object (4 properties) +│ ├── Id: *string +│ ├── Name: *string +│ ├── Properties: *Object (1 property) +│ │ └── Cors: *Object (1 property) +│ │ └── CorsRules: Object (5 properties)[] +│ │ ├── AllowedHeaders: string[] +│ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ ├── "CONNECT" +│ │ │ ├── "DELETE" +│ │ │ ├── "GET" +│ │ │ ├── "HEAD" +│ │ │ ├── "MERGE" +│ │ │ ├── "OPTIONS" +│ │ │ ├── "PATCH" +│ │ │ ├── "POST" +│ │ │ ├── "PUT" +│ │ │ └── "TRACE" +│ │ ├── AllowedOrigins: string[] +│ │ ├── ExposedHeaders: string[] +│ │ └── MaxAgeInSeconds: *int +│ └── Type: *string +├── StorageAccounts_QueueService_Spec_ARM: Object (2 properties) +│ ├── Name: string +│ └── Properties: *Object (1 property) +│ └── Cors: *Object (1 property) +│ └── CorsRules: Object (5 properties)[] +│ ├── AllowedHeaders: string[] +│ ├── AllowedMethods: Enum (10 values)[] +│ │ ├── "CONNECT" +│ │ ├── "DELETE" +│ │ ├── "GET" +│ │ ├── "HEAD" +│ │ ├── "MERGE" +│ │ ├── "OPTIONS" +│ │ ├── "PATCH" +│ │ ├── "POST" +│ │ ├── "PUT" +│ │ └── "TRACE" +│ ├── AllowedOrigins: string[] +│ ├── ExposedHeaders: string[] +│ └── MaxAgeInSeconds: *int +├── StorageAccounts_QueueServices_Queue_STATUS_ARM: Object (4 properties) +│ ├── Id: *string +│ ├── Name: *string +│ ├── Properties: *Object (2 properties) +│ │ ├── ApproximateMessageCount: *int +│ │ └── Metadata: map[string]string +│ └── Type: *string +├── StorageAccounts_QueueServices_Queue_Spec_ARM: Object (2 properties) +│ ├── Name: string +│ └── Properties: *Object (1 property) +│ └── Metadata: map[string]string +├── StorageAccounts_TableService_STATUS_ARM: Object (4 properties) +│ ├── Id: *string +│ ├── Name: *string +│ ├── Properties: *Object (1 property) +│ │ └── Cors: *Object (1 property) +│ │ └── CorsRules: Object (5 properties)[] +│ │ ├── AllowedHeaders: string[] +│ │ ├── AllowedMethods: Enum (10 values)[] +│ │ │ ├── "CONNECT" +│ │ │ ├── "DELETE" +│ │ │ ├── "GET" +│ │ │ ├── "HEAD" +│ │ │ ├── "MERGE" +│ │ │ ├── "OPTIONS" +│ │ │ ├── "PATCH" +│ │ │ ├── "POST" +│ │ │ ├── "PUT" +│ │ │ └── "TRACE" +│ │ ├── AllowedOrigins: string[] +│ │ ├── ExposedHeaders: string[] +│ │ └── MaxAgeInSeconds: *int +│ └── Type: *string +├── StorageAccounts_TableService_Spec_ARM: Object (2 properties) +│ ├── Name: string +│ └── Properties: *Object (1 property) +│ └── Cors: *Object (1 property) +│ └── CorsRules: Object (5 properties)[] +│ ├── AllowedHeaders: string[] +│ ├── AllowedMethods: Enum (10 values)[] +│ │ ├── "CONNECT" +│ │ ├── "DELETE" +│ │ ├── "GET" +│ │ ├── "HEAD" +│ │ ├── "MERGE" +│ │ ├── "OPTIONS" +│ │ ├── "PATCH" +│ │ ├── "POST" +│ │ ├── "PUT" +│ │ └── "TRACE" +│ ├── AllowedOrigins: string[] +│ ├── ExposedHeaders: string[] +│ └── MaxAgeInSeconds: *int +├── StorageAccounts_TableServices_Table_STATUS_ARM: Object (4 properties) +│ ├── Id: *string +│ ├── Name: *string +│ ├── Properties: *Object (2 properties) +│ │ ├── SignedIdentifiers: Object (2 properties)[] +│ │ │ ├── AccessPolicy: *Object (3 properties) +│ │ │ │ ├── ExpiryTime: *string +│ │ │ │ ├── Permission: *string +│ │ │ │ └── StartTime: *string +│ │ │ └── Id: *string +│ │ └── TableName: *string +│ └── Type: *string +└── StorageAccounts_TableServices_Table_Spec_ARM: Object (2 properties) + ├── Name: string + └── Properties: *Object (1 property) + └── SignedIdentifiers: Object (2 properties)[] + ├── AccessPolicy: *Object (3 properties) + │ ├── ExpiryTime: *string + │ ├── Permission: *string + │ └── StartTime: *string + └── Id: *string diff --git a/v2/api/storage/v1api20230101/zz_generated.deepcopy.go b/v2/api/storage/v1api20230101/zz_generated.deepcopy.go new file mode 100644 index 00000000000..80295c3c898 --- /dev/null +++ b/v2/api/storage/v1api20230101/zz_generated.deepcopy.go @@ -0,0 +1,10535 @@ +//go:build !ignore_autogenerated + +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1api20230101 + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessPolicy) DeepCopyInto(out *AccessPolicy) { + *out = *in + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = new(string) + **out = **in + } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessPolicy. +func (in *AccessPolicy) DeepCopy() *AccessPolicy { + if in == nil { + return nil + } + out := new(AccessPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessPolicy_ARM) DeepCopyInto(out *AccessPolicy_ARM) { + *out = *in + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = new(string) + **out = **in + } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessPolicy_ARM. +func (in *AccessPolicy_ARM) DeepCopy() *AccessPolicy_ARM { + if in == nil { + return nil + } + out := new(AccessPolicy_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessPolicy_STATUS) DeepCopyInto(out *AccessPolicy_STATUS) { + *out = *in + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = new(string) + **out = **in + } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessPolicy_STATUS. +func (in *AccessPolicy_STATUS) DeepCopy() *AccessPolicy_STATUS { + if in == nil { + return nil + } + out := new(AccessPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessPolicy_STATUS_ARM) DeepCopyInto(out *AccessPolicy_STATUS_ARM) { + *out = *in + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = new(string) + **out = **in + } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessPolicy_STATUS_ARM. +func (in *AccessPolicy_STATUS_ARM) DeepCopy() *AccessPolicy_STATUS_ARM { + if in == nil { + return nil + } + out := new(AccessPolicy_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccountImmutabilityPolicyProperties) DeepCopyInto(out *AccountImmutabilityPolicyProperties) { + *out = *in + if in.AllowProtectedAppendWrites != nil { + in, out := &in.AllowProtectedAppendWrites, &out.AllowProtectedAppendWrites + *out = new(bool) + **out = **in + } + if in.ImmutabilityPeriodSinceCreationInDays != nil { + in, out := &in.ImmutabilityPeriodSinceCreationInDays, &out.ImmutabilityPeriodSinceCreationInDays + *out = new(int) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(AccountImmutabilityPolicyProperties_State) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountImmutabilityPolicyProperties. +func (in *AccountImmutabilityPolicyProperties) DeepCopy() *AccountImmutabilityPolicyProperties { + if in == nil { + return nil + } + out := new(AccountImmutabilityPolicyProperties) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccountImmutabilityPolicyProperties_ARM) DeepCopyInto(out *AccountImmutabilityPolicyProperties_ARM) { + *out = *in + if in.AllowProtectedAppendWrites != nil { + in, out := &in.AllowProtectedAppendWrites, &out.AllowProtectedAppendWrites + *out = new(bool) + **out = **in + } + if in.ImmutabilityPeriodSinceCreationInDays != nil { + in, out := &in.ImmutabilityPeriodSinceCreationInDays, &out.ImmutabilityPeriodSinceCreationInDays + *out = new(int) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(AccountImmutabilityPolicyProperties_State) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountImmutabilityPolicyProperties_ARM. +func (in *AccountImmutabilityPolicyProperties_ARM) DeepCopy() *AccountImmutabilityPolicyProperties_ARM { + if in == nil { + return nil + } + out := new(AccountImmutabilityPolicyProperties_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccountImmutabilityPolicyProperties_STATUS) DeepCopyInto(out *AccountImmutabilityPolicyProperties_STATUS) { + *out = *in + if in.AllowProtectedAppendWrites != nil { + in, out := &in.AllowProtectedAppendWrites, &out.AllowProtectedAppendWrites + *out = new(bool) + **out = **in + } + if in.ImmutabilityPeriodSinceCreationInDays != nil { + in, out := &in.ImmutabilityPeriodSinceCreationInDays, &out.ImmutabilityPeriodSinceCreationInDays + *out = new(int) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(AccountImmutabilityPolicyProperties_State_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountImmutabilityPolicyProperties_STATUS. +func (in *AccountImmutabilityPolicyProperties_STATUS) DeepCopy() *AccountImmutabilityPolicyProperties_STATUS { + if in == nil { + return nil + } + out := new(AccountImmutabilityPolicyProperties_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccountImmutabilityPolicyProperties_STATUS_ARM) DeepCopyInto(out *AccountImmutabilityPolicyProperties_STATUS_ARM) { + *out = *in + if in.AllowProtectedAppendWrites != nil { + in, out := &in.AllowProtectedAppendWrites, &out.AllowProtectedAppendWrites + *out = new(bool) + **out = **in + } + if in.ImmutabilityPeriodSinceCreationInDays != nil { + in, out := &in.ImmutabilityPeriodSinceCreationInDays, &out.ImmutabilityPeriodSinceCreationInDays + *out = new(int) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(AccountImmutabilityPolicyProperties_State_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountImmutabilityPolicyProperties_STATUS_ARM. +func (in *AccountImmutabilityPolicyProperties_STATUS_ARM) DeepCopy() *AccountImmutabilityPolicyProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(AccountImmutabilityPolicyProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ActiveDirectoryProperties) DeepCopyInto(out *ActiveDirectoryProperties) { + *out = *in + if in.AccountType != nil { + in, out := &in.AccountType, &out.AccountType + *out = new(ActiveDirectoryProperties_AccountType) + **out = **in + } + if in.AzureStorageSid != nil { + in, out := &in.AzureStorageSid, &out.AzureStorageSid + *out = new(string) + **out = **in + } + if in.DomainGuid != nil { + in, out := &in.DomainGuid, &out.DomainGuid + *out = new(string) + **out = **in + } + if in.DomainName != nil { + in, out := &in.DomainName, &out.DomainName + *out = new(string) + **out = **in + } + if in.DomainSid != nil { + in, out := &in.DomainSid, &out.DomainSid + *out = new(string) + **out = **in + } + if in.ForestName != nil { + in, out := &in.ForestName, &out.ForestName + *out = new(string) + **out = **in + } + if in.NetBiosDomainName != nil { + in, out := &in.NetBiosDomainName, &out.NetBiosDomainName + *out = new(string) + **out = **in + } + if in.SamAccountName != nil { + in, out := &in.SamAccountName, &out.SamAccountName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveDirectoryProperties. +func (in *ActiveDirectoryProperties) DeepCopy() *ActiveDirectoryProperties { + if in == nil { + return nil + } + out := new(ActiveDirectoryProperties) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ActiveDirectoryProperties_ARM) DeepCopyInto(out *ActiveDirectoryProperties_ARM) { + *out = *in + if in.AccountType != nil { + in, out := &in.AccountType, &out.AccountType + *out = new(ActiveDirectoryProperties_AccountType) + **out = **in + } + if in.AzureStorageSid != nil { + in, out := &in.AzureStorageSid, &out.AzureStorageSid + *out = new(string) + **out = **in + } + if in.DomainGuid != nil { + in, out := &in.DomainGuid, &out.DomainGuid + *out = new(string) + **out = **in + } + if in.DomainName != nil { + in, out := &in.DomainName, &out.DomainName + *out = new(string) + **out = **in + } + if in.DomainSid != nil { + in, out := &in.DomainSid, &out.DomainSid + *out = new(string) + **out = **in + } + if in.ForestName != nil { + in, out := &in.ForestName, &out.ForestName + *out = new(string) + **out = **in + } + if in.NetBiosDomainName != nil { + in, out := &in.NetBiosDomainName, &out.NetBiosDomainName + *out = new(string) + **out = **in + } + if in.SamAccountName != nil { + in, out := &in.SamAccountName, &out.SamAccountName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveDirectoryProperties_ARM. +func (in *ActiveDirectoryProperties_ARM) DeepCopy() *ActiveDirectoryProperties_ARM { + if in == nil { + return nil + } + out := new(ActiveDirectoryProperties_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ActiveDirectoryProperties_STATUS) DeepCopyInto(out *ActiveDirectoryProperties_STATUS) { + *out = *in + if in.AccountType != nil { + in, out := &in.AccountType, &out.AccountType + *out = new(ActiveDirectoryProperties_AccountType_STATUS) + **out = **in + } + if in.AzureStorageSid != nil { + in, out := &in.AzureStorageSid, &out.AzureStorageSid + *out = new(string) + **out = **in + } + if in.DomainGuid != nil { + in, out := &in.DomainGuid, &out.DomainGuid + *out = new(string) + **out = **in + } + if in.DomainName != nil { + in, out := &in.DomainName, &out.DomainName + *out = new(string) + **out = **in + } + if in.DomainSid != nil { + in, out := &in.DomainSid, &out.DomainSid + *out = new(string) + **out = **in + } + if in.ForestName != nil { + in, out := &in.ForestName, &out.ForestName + *out = new(string) + **out = **in + } + if in.NetBiosDomainName != nil { + in, out := &in.NetBiosDomainName, &out.NetBiosDomainName + *out = new(string) + **out = **in + } + if in.SamAccountName != nil { + in, out := &in.SamAccountName, &out.SamAccountName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveDirectoryProperties_STATUS. +func (in *ActiveDirectoryProperties_STATUS) DeepCopy() *ActiveDirectoryProperties_STATUS { + if in == nil { + return nil + } + out := new(ActiveDirectoryProperties_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ActiveDirectoryProperties_STATUS_ARM) DeepCopyInto(out *ActiveDirectoryProperties_STATUS_ARM) { + *out = *in + if in.AccountType != nil { + in, out := &in.AccountType, &out.AccountType + *out = new(ActiveDirectoryProperties_AccountType_STATUS) + **out = **in + } + if in.AzureStorageSid != nil { + in, out := &in.AzureStorageSid, &out.AzureStorageSid + *out = new(string) + **out = **in + } + if in.DomainGuid != nil { + in, out := &in.DomainGuid, &out.DomainGuid + *out = new(string) + **out = **in + } + if in.DomainName != nil { + in, out := &in.DomainName, &out.DomainName + *out = new(string) + **out = **in + } + if in.DomainSid != nil { + in, out := &in.DomainSid, &out.DomainSid + *out = new(string) + **out = **in + } + if in.ForestName != nil { + in, out := &in.ForestName, &out.ForestName + *out = new(string) + **out = **in + } + if in.NetBiosDomainName != nil { + in, out := &in.NetBiosDomainName, &out.NetBiosDomainName + *out = new(string) + **out = **in + } + if in.SamAccountName != nil { + in, out := &in.SamAccountName, &out.SamAccountName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveDirectoryProperties_STATUS_ARM. +func (in *ActiveDirectoryProperties_STATUS_ARM) DeepCopy() *ActiveDirectoryProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(ActiveDirectoryProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureFilesIdentityBasedAuthentication) DeepCopyInto(out *AzureFilesIdentityBasedAuthentication) { + *out = *in + if in.ActiveDirectoryProperties != nil { + in, out := &in.ActiveDirectoryProperties, &out.ActiveDirectoryProperties + *out = new(ActiveDirectoryProperties) + (*in).DeepCopyInto(*out) + } + if in.DefaultSharePermission != nil { + in, out := &in.DefaultSharePermission, &out.DefaultSharePermission + *out = new(AzureFilesIdentityBasedAuthentication_DefaultSharePermission) + **out = **in + } + if in.DirectoryServiceOptions != nil { + in, out := &in.DirectoryServiceOptions, &out.DirectoryServiceOptions + *out = new(AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureFilesIdentityBasedAuthentication. +func (in *AzureFilesIdentityBasedAuthentication) DeepCopy() *AzureFilesIdentityBasedAuthentication { + if in == nil { + return nil + } + out := new(AzureFilesIdentityBasedAuthentication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureFilesIdentityBasedAuthentication_ARM) DeepCopyInto(out *AzureFilesIdentityBasedAuthentication_ARM) { + *out = *in + if in.ActiveDirectoryProperties != nil { + in, out := &in.ActiveDirectoryProperties, &out.ActiveDirectoryProperties + *out = new(ActiveDirectoryProperties_ARM) + (*in).DeepCopyInto(*out) + } + if in.DefaultSharePermission != nil { + in, out := &in.DefaultSharePermission, &out.DefaultSharePermission + *out = new(AzureFilesIdentityBasedAuthentication_DefaultSharePermission) + **out = **in + } + if in.DirectoryServiceOptions != nil { + in, out := &in.DirectoryServiceOptions, &out.DirectoryServiceOptions + *out = new(AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureFilesIdentityBasedAuthentication_ARM. +func (in *AzureFilesIdentityBasedAuthentication_ARM) DeepCopy() *AzureFilesIdentityBasedAuthentication_ARM { + if in == nil { + return nil + } + out := new(AzureFilesIdentityBasedAuthentication_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureFilesIdentityBasedAuthentication_STATUS) DeepCopyInto(out *AzureFilesIdentityBasedAuthentication_STATUS) { + *out = *in + if in.ActiveDirectoryProperties != nil { + in, out := &in.ActiveDirectoryProperties, &out.ActiveDirectoryProperties + *out = new(ActiveDirectoryProperties_STATUS) + (*in).DeepCopyInto(*out) + } + if in.DefaultSharePermission != nil { + in, out := &in.DefaultSharePermission, &out.DefaultSharePermission + *out = new(AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS) + **out = **in + } + if in.DirectoryServiceOptions != nil { + in, out := &in.DirectoryServiceOptions, &out.DirectoryServiceOptions + *out = new(AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureFilesIdentityBasedAuthentication_STATUS. +func (in *AzureFilesIdentityBasedAuthentication_STATUS) DeepCopy() *AzureFilesIdentityBasedAuthentication_STATUS { + if in == nil { + return nil + } + out := new(AzureFilesIdentityBasedAuthentication_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureFilesIdentityBasedAuthentication_STATUS_ARM) DeepCopyInto(out *AzureFilesIdentityBasedAuthentication_STATUS_ARM) { + *out = *in + if in.ActiveDirectoryProperties != nil { + in, out := &in.ActiveDirectoryProperties, &out.ActiveDirectoryProperties + *out = new(ActiveDirectoryProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.DefaultSharePermission != nil { + in, out := &in.DefaultSharePermission, &out.DefaultSharePermission + *out = new(AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS) + **out = **in + } + if in.DirectoryServiceOptions != nil { + in, out := &in.DirectoryServiceOptions, &out.DirectoryServiceOptions + *out = new(AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureFilesIdentityBasedAuthentication_STATUS_ARM. +func (in *AzureFilesIdentityBasedAuthentication_STATUS_ARM) DeepCopy() *AzureFilesIdentityBasedAuthentication_STATUS_ARM { + if in == nil { + return nil + } + out := new(AzureFilesIdentityBasedAuthentication_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlobRestoreParameters_STATUS) DeepCopyInto(out *BlobRestoreParameters_STATUS) { + *out = *in + if in.BlobRanges != nil { + in, out := &in.BlobRanges, &out.BlobRanges + *out = make([]BlobRestoreRange_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.TimeToRestore != nil { + in, out := &in.TimeToRestore, &out.TimeToRestore + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlobRestoreParameters_STATUS. +func (in *BlobRestoreParameters_STATUS) DeepCopy() *BlobRestoreParameters_STATUS { + if in == nil { + return nil + } + out := new(BlobRestoreParameters_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlobRestoreParameters_STATUS_ARM) DeepCopyInto(out *BlobRestoreParameters_STATUS_ARM) { + *out = *in + if in.BlobRanges != nil { + in, out := &in.BlobRanges, &out.BlobRanges + *out = make([]BlobRestoreRange_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.TimeToRestore != nil { + in, out := &in.TimeToRestore, &out.TimeToRestore + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlobRestoreParameters_STATUS_ARM. +func (in *BlobRestoreParameters_STATUS_ARM) DeepCopy() *BlobRestoreParameters_STATUS_ARM { + if in == nil { + return nil + } + out := new(BlobRestoreParameters_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlobRestoreRange_STATUS) DeepCopyInto(out *BlobRestoreRange_STATUS) { + *out = *in + if in.EndRange != nil { + in, out := &in.EndRange, &out.EndRange + *out = new(string) + **out = **in + } + if in.StartRange != nil { + in, out := &in.StartRange, &out.StartRange + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlobRestoreRange_STATUS. +func (in *BlobRestoreRange_STATUS) DeepCopy() *BlobRestoreRange_STATUS { + if in == nil { + return nil + } + out := new(BlobRestoreRange_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlobRestoreRange_STATUS_ARM) DeepCopyInto(out *BlobRestoreRange_STATUS_ARM) { + *out = *in + if in.EndRange != nil { + in, out := &in.EndRange, &out.EndRange + *out = new(string) + **out = **in + } + if in.StartRange != nil { + in, out := &in.StartRange, &out.StartRange + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlobRestoreRange_STATUS_ARM. +func (in *BlobRestoreRange_STATUS_ARM) DeepCopy() *BlobRestoreRange_STATUS_ARM { + if in == nil { + return nil + } + out := new(BlobRestoreRange_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlobRestoreStatus_STATUS) DeepCopyInto(out *BlobRestoreStatus_STATUS) { + *out = *in + if in.FailureReason != nil { + in, out := &in.FailureReason, &out.FailureReason + *out = new(string) + **out = **in + } + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = new(BlobRestoreParameters_STATUS) + (*in).DeepCopyInto(*out) + } + if in.RestoreId != nil { + in, out := &in.RestoreId, &out.RestoreId + *out = new(string) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(BlobRestoreStatus_Status_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlobRestoreStatus_STATUS. +func (in *BlobRestoreStatus_STATUS) DeepCopy() *BlobRestoreStatus_STATUS { + if in == nil { + return nil + } + out := new(BlobRestoreStatus_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlobRestoreStatus_STATUS_ARM) DeepCopyInto(out *BlobRestoreStatus_STATUS_ARM) { + *out = *in + if in.FailureReason != nil { + in, out := &in.FailureReason, &out.FailureReason + *out = new(string) + **out = **in + } + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = new(BlobRestoreParameters_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.RestoreId != nil { + in, out := &in.RestoreId, &out.RestoreId + *out = new(string) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(BlobRestoreStatus_Status_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlobRestoreStatus_STATUS_ARM. +func (in *BlobRestoreStatus_STATUS_ARM) DeepCopy() *BlobRestoreStatus_STATUS_ARM { + if in == nil { + return nil + } + out := new(BlobRestoreStatus_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChangeFeed) DeepCopyInto(out *ChangeFeed) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.RetentionInDays != nil { + in, out := &in.RetentionInDays, &out.RetentionInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChangeFeed. +func (in *ChangeFeed) DeepCopy() *ChangeFeed { + if in == nil { + return nil + } + out := new(ChangeFeed) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChangeFeed_ARM) DeepCopyInto(out *ChangeFeed_ARM) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.RetentionInDays != nil { + in, out := &in.RetentionInDays, &out.RetentionInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChangeFeed_ARM. +func (in *ChangeFeed_ARM) DeepCopy() *ChangeFeed_ARM { + if in == nil { + return nil + } + out := new(ChangeFeed_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChangeFeed_STATUS) DeepCopyInto(out *ChangeFeed_STATUS) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.RetentionInDays != nil { + in, out := &in.RetentionInDays, &out.RetentionInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChangeFeed_STATUS. +func (in *ChangeFeed_STATUS) DeepCopy() *ChangeFeed_STATUS { + if in == nil { + return nil + } + out := new(ChangeFeed_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChangeFeed_STATUS_ARM) DeepCopyInto(out *ChangeFeed_STATUS_ARM) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.RetentionInDays != nil { + in, out := &in.RetentionInDays, &out.RetentionInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChangeFeed_STATUS_ARM. +func (in *ChangeFeed_STATUS_ARM) DeepCopy() *ChangeFeed_STATUS_ARM { + if in == nil { + return nil + } + out := new(ChangeFeed_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerProperties_ARM) DeepCopyInto(out *ContainerProperties_ARM) { + *out = *in + if in.DefaultEncryptionScope != nil { + in, out := &in.DefaultEncryptionScope, &out.DefaultEncryptionScope + *out = new(string) + **out = **in + } + if in.DenyEncryptionScopeOverride != nil { + in, out := &in.DenyEncryptionScopeOverride, &out.DenyEncryptionScopeOverride + *out = new(bool) + **out = **in + } + if in.EnableNfsV3AllSquash != nil { + in, out := &in.EnableNfsV3AllSquash, &out.EnableNfsV3AllSquash + *out = new(bool) + **out = **in + } + if in.EnableNfsV3RootSquash != nil { + in, out := &in.EnableNfsV3RootSquash, &out.EnableNfsV3RootSquash + *out = new(bool) + **out = **in + } + if in.ImmutableStorageWithVersioning != nil { + in, out := &in.ImmutableStorageWithVersioning, &out.ImmutableStorageWithVersioning + *out = new(ImmutableStorageWithVersioning_ARM) + (*in).DeepCopyInto(*out) + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.PublicAccess != nil { + in, out := &in.PublicAccess, &out.PublicAccess + *out = new(ContainerProperties_PublicAccess) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerProperties_ARM. +func (in *ContainerProperties_ARM) DeepCopy() *ContainerProperties_ARM { + if in == nil { + return nil + } + out := new(ContainerProperties_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerProperties_STATUS_ARM) DeepCopyInto(out *ContainerProperties_STATUS_ARM) { + *out = *in + if in.DefaultEncryptionScope != nil { + in, out := &in.DefaultEncryptionScope, &out.DefaultEncryptionScope + *out = new(string) + **out = **in + } + if in.Deleted != nil { + in, out := &in.Deleted, &out.Deleted + *out = new(bool) + **out = **in + } + if in.DeletedTime != nil { + in, out := &in.DeletedTime, &out.DeletedTime + *out = new(string) + **out = **in + } + if in.DenyEncryptionScopeOverride != nil { + in, out := &in.DenyEncryptionScopeOverride, &out.DenyEncryptionScopeOverride + *out = new(bool) + **out = **in + } + if in.EnableNfsV3AllSquash != nil { + in, out := &in.EnableNfsV3AllSquash, &out.EnableNfsV3AllSquash + *out = new(bool) + **out = **in + } + if in.EnableNfsV3RootSquash != nil { + in, out := &in.EnableNfsV3RootSquash, &out.EnableNfsV3RootSquash + *out = new(bool) + **out = **in + } + if in.HasImmutabilityPolicy != nil { + in, out := &in.HasImmutabilityPolicy, &out.HasImmutabilityPolicy + *out = new(bool) + **out = **in + } + if in.HasLegalHold != nil { + in, out := &in.HasLegalHold, &out.HasLegalHold + *out = new(bool) + **out = **in + } + if in.ImmutabilityPolicy != nil { + in, out := &in.ImmutabilityPolicy, &out.ImmutabilityPolicy + *out = new(ImmutabilityPolicyProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.ImmutableStorageWithVersioning != nil { + in, out := &in.ImmutableStorageWithVersioning, &out.ImmutableStorageWithVersioning + *out = new(ImmutableStorageWithVersioning_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.LastModifiedTime != nil { + in, out := &in.LastModifiedTime, &out.LastModifiedTime + *out = new(string) + **out = **in + } + if in.LeaseDuration != nil { + in, out := &in.LeaseDuration, &out.LeaseDuration + *out = new(ContainerProperties_LeaseDuration_STATUS) + **out = **in + } + if in.LeaseState != nil { + in, out := &in.LeaseState, &out.LeaseState + *out = new(ContainerProperties_LeaseState_STATUS) + **out = **in + } + if in.LeaseStatus != nil { + in, out := &in.LeaseStatus, &out.LeaseStatus + *out = new(ContainerProperties_LeaseStatus_STATUS) + **out = **in + } + if in.LegalHold != nil { + in, out := &in.LegalHold, &out.LegalHold + *out = new(LegalHoldProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.PublicAccess != nil { + in, out := &in.PublicAccess, &out.PublicAccess + *out = new(ContainerProperties_PublicAccess_STATUS) + **out = **in + } + if in.RemainingRetentionDays != nil { + in, out := &in.RemainingRetentionDays, &out.RemainingRetentionDays + *out = new(int) + **out = **in + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerProperties_STATUS_ARM. +func (in *ContainerProperties_STATUS_ARM) DeepCopy() *ContainerProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(ContainerProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CorsRule) DeepCopyInto(out *CorsRule) { + *out = *in + if in.AllowedHeaders != nil { + in, out := &in.AllowedHeaders, &out.AllowedHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedMethods != nil { + in, out := &in.AllowedMethods, &out.AllowedMethods + *out = make([]CorsRule_AllowedMethods, len(*in)) + copy(*out, *in) + } + if in.AllowedOrigins != nil { + in, out := &in.AllowedOrigins, &out.AllowedOrigins + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ExposedHeaders != nil { + in, out := &in.ExposedHeaders, &out.ExposedHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MaxAgeInSeconds != nil { + in, out := &in.MaxAgeInSeconds, &out.MaxAgeInSeconds + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsRule. +func (in *CorsRule) DeepCopy() *CorsRule { + if in == nil { + return nil + } + out := new(CorsRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CorsRule_ARM) DeepCopyInto(out *CorsRule_ARM) { + *out = *in + if in.AllowedHeaders != nil { + in, out := &in.AllowedHeaders, &out.AllowedHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedMethods != nil { + in, out := &in.AllowedMethods, &out.AllowedMethods + *out = make([]CorsRule_AllowedMethods, len(*in)) + copy(*out, *in) + } + if in.AllowedOrigins != nil { + in, out := &in.AllowedOrigins, &out.AllowedOrigins + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ExposedHeaders != nil { + in, out := &in.ExposedHeaders, &out.ExposedHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MaxAgeInSeconds != nil { + in, out := &in.MaxAgeInSeconds, &out.MaxAgeInSeconds + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsRule_ARM. +func (in *CorsRule_ARM) DeepCopy() *CorsRule_ARM { + if in == nil { + return nil + } + out := new(CorsRule_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CorsRule_STATUS) DeepCopyInto(out *CorsRule_STATUS) { + *out = *in + if in.AllowedHeaders != nil { + in, out := &in.AllowedHeaders, &out.AllowedHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedMethods != nil { + in, out := &in.AllowedMethods, &out.AllowedMethods + *out = make([]CorsRule_AllowedMethods_STATUS, len(*in)) + copy(*out, *in) + } + if in.AllowedOrigins != nil { + in, out := &in.AllowedOrigins, &out.AllowedOrigins + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ExposedHeaders != nil { + in, out := &in.ExposedHeaders, &out.ExposedHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MaxAgeInSeconds != nil { + in, out := &in.MaxAgeInSeconds, &out.MaxAgeInSeconds + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsRule_STATUS. +func (in *CorsRule_STATUS) DeepCopy() *CorsRule_STATUS { + if in == nil { + return nil + } + out := new(CorsRule_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CorsRule_STATUS_ARM) DeepCopyInto(out *CorsRule_STATUS_ARM) { + *out = *in + if in.AllowedHeaders != nil { + in, out := &in.AllowedHeaders, &out.AllowedHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedMethods != nil { + in, out := &in.AllowedMethods, &out.AllowedMethods + *out = make([]CorsRule_AllowedMethods_STATUS, len(*in)) + copy(*out, *in) + } + if in.AllowedOrigins != nil { + in, out := &in.AllowedOrigins, &out.AllowedOrigins + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ExposedHeaders != nil { + in, out := &in.ExposedHeaders, &out.ExposedHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MaxAgeInSeconds != nil { + in, out := &in.MaxAgeInSeconds, &out.MaxAgeInSeconds + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsRule_STATUS_ARM. +func (in *CorsRule_STATUS_ARM) DeepCopy() *CorsRule_STATUS_ARM { + if in == nil { + return nil + } + out := new(CorsRule_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CorsRules) DeepCopyInto(out *CorsRules) { + *out = *in + if in.CorsRules != nil { + in, out := &in.CorsRules, &out.CorsRules + *out = make([]CorsRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsRules. +func (in *CorsRules) DeepCopy() *CorsRules { + if in == nil { + return nil + } + out := new(CorsRules) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CorsRules_ARM) DeepCopyInto(out *CorsRules_ARM) { + *out = *in + if in.CorsRules != nil { + in, out := &in.CorsRules, &out.CorsRules + *out = make([]CorsRule_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsRules_ARM. +func (in *CorsRules_ARM) DeepCopy() *CorsRules_ARM { + if in == nil { + return nil + } + out := new(CorsRules_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CorsRules_STATUS) DeepCopyInto(out *CorsRules_STATUS) { + *out = *in + if in.CorsRules != nil { + in, out := &in.CorsRules, &out.CorsRules + *out = make([]CorsRule_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsRules_STATUS. +func (in *CorsRules_STATUS) DeepCopy() *CorsRules_STATUS { + if in == nil { + return nil + } + out := new(CorsRules_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CorsRules_STATUS_ARM) DeepCopyInto(out *CorsRules_STATUS_ARM) { + *out = *in + if in.CorsRules != nil { + in, out := &in.CorsRules, &out.CorsRules + *out = make([]CorsRule_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsRules_STATUS_ARM. +func (in *CorsRules_STATUS_ARM) DeepCopy() *CorsRules_STATUS_ARM { + if in == nil { + return nil + } + out := new(CorsRules_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomDomain) DeepCopyInto(out *CustomDomain) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.UseSubDomainName != nil { + in, out := &in.UseSubDomainName, &out.UseSubDomainName + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomDomain. +func (in *CustomDomain) DeepCopy() *CustomDomain { + if in == nil { + return nil + } + out := new(CustomDomain) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomDomain_ARM) DeepCopyInto(out *CustomDomain_ARM) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.UseSubDomainName != nil { + in, out := &in.UseSubDomainName, &out.UseSubDomainName + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomDomain_ARM. +func (in *CustomDomain_ARM) DeepCopy() *CustomDomain_ARM { + if in == nil { + return nil + } + out := new(CustomDomain_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomDomain_STATUS) DeepCopyInto(out *CustomDomain_STATUS) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.UseSubDomainName != nil { + in, out := &in.UseSubDomainName, &out.UseSubDomainName + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomDomain_STATUS. +func (in *CustomDomain_STATUS) DeepCopy() *CustomDomain_STATUS { + if in == nil { + return nil + } + out := new(CustomDomain_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomDomain_STATUS_ARM) DeepCopyInto(out *CustomDomain_STATUS_ARM) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.UseSubDomainName != nil { + in, out := &in.UseSubDomainName, &out.UseSubDomainName + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomDomain_STATUS_ARM. +func (in *CustomDomain_STATUS_ARM) DeepCopy() *CustomDomain_STATUS_ARM { + if in == nil { + return nil + } + out := new(CustomDomain_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DateAfterCreation) DeepCopyInto(out *DateAfterCreation) { + *out = *in + if in.DaysAfterCreationGreaterThan != nil { + in, out := &in.DaysAfterCreationGreaterThan, &out.DaysAfterCreationGreaterThan + *out = new(int) + **out = **in + } + if in.DaysAfterLastTierChangeGreaterThan != nil { + in, out := &in.DaysAfterLastTierChangeGreaterThan, &out.DaysAfterLastTierChangeGreaterThan + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DateAfterCreation. +func (in *DateAfterCreation) DeepCopy() *DateAfterCreation { + if in == nil { + return nil + } + out := new(DateAfterCreation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DateAfterCreation_ARM) DeepCopyInto(out *DateAfterCreation_ARM) { + *out = *in + if in.DaysAfterCreationGreaterThan != nil { + in, out := &in.DaysAfterCreationGreaterThan, &out.DaysAfterCreationGreaterThan + *out = new(int) + **out = **in + } + if in.DaysAfterLastTierChangeGreaterThan != nil { + in, out := &in.DaysAfterLastTierChangeGreaterThan, &out.DaysAfterLastTierChangeGreaterThan + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DateAfterCreation_ARM. +func (in *DateAfterCreation_ARM) DeepCopy() *DateAfterCreation_ARM { + if in == nil { + return nil + } + out := new(DateAfterCreation_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DateAfterCreation_STATUS) DeepCopyInto(out *DateAfterCreation_STATUS) { + *out = *in + if in.DaysAfterCreationGreaterThan != nil { + in, out := &in.DaysAfterCreationGreaterThan, &out.DaysAfterCreationGreaterThan + *out = new(float64) + **out = **in + } + if in.DaysAfterLastTierChangeGreaterThan != nil { + in, out := &in.DaysAfterLastTierChangeGreaterThan, &out.DaysAfterLastTierChangeGreaterThan + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DateAfterCreation_STATUS. +func (in *DateAfterCreation_STATUS) DeepCopy() *DateAfterCreation_STATUS { + if in == nil { + return nil + } + out := new(DateAfterCreation_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DateAfterCreation_STATUS_ARM) DeepCopyInto(out *DateAfterCreation_STATUS_ARM) { + *out = *in + if in.DaysAfterCreationGreaterThan != nil { + in, out := &in.DaysAfterCreationGreaterThan, &out.DaysAfterCreationGreaterThan + *out = new(float64) + **out = **in + } + if in.DaysAfterLastTierChangeGreaterThan != nil { + in, out := &in.DaysAfterLastTierChangeGreaterThan, &out.DaysAfterLastTierChangeGreaterThan + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DateAfterCreation_STATUS_ARM. +func (in *DateAfterCreation_STATUS_ARM) DeepCopy() *DateAfterCreation_STATUS_ARM { + if in == nil { + return nil + } + out := new(DateAfterCreation_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DateAfterModification) DeepCopyInto(out *DateAfterModification) { + *out = *in + if in.DaysAfterCreationGreaterThan != nil { + in, out := &in.DaysAfterCreationGreaterThan, &out.DaysAfterCreationGreaterThan + *out = new(int) + **out = **in + } + if in.DaysAfterLastAccessTimeGreaterThan != nil { + in, out := &in.DaysAfterLastAccessTimeGreaterThan, &out.DaysAfterLastAccessTimeGreaterThan + *out = new(int) + **out = **in + } + if in.DaysAfterLastTierChangeGreaterThan != nil { + in, out := &in.DaysAfterLastTierChangeGreaterThan, &out.DaysAfterLastTierChangeGreaterThan + *out = new(int) + **out = **in + } + if in.DaysAfterModificationGreaterThan != nil { + in, out := &in.DaysAfterModificationGreaterThan, &out.DaysAfterModificationGreaterThan + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DateAfterModification. +func (in *DateAfterModification) DeepCopy() *DateAfterModification { + if in == nil { + return nil + } + out := new(DateAfterModification) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DateAfterModification_ARM) DeepCopyInto(out *DateAfterModification_ARM) { + *out = *in + if in.DaysAfterCreationGreaterThan != nil { + in, out := &in.DaysAfterCreationGreaterThan, &out.DaysAfterCreationGreaterThan + *out = new(int) + **out = **in + } + if in.DaysAfterLastAccessTimeGreaterThan != nil { + in, out := &in.DaysAfterLastAccessTimeGreaterThan, &out.DaysAfterLastAccessTimeGreaterThan + *out = new(int) + **out = **in + } + if in.DaysAfterLastTierChangeGreaterThan != nil { + in, out := &in.DaysAfterLastTierChangeGreaterThan, &out.DaysAfterLastTierChangeGreaterThan + *out = new(int) + **out = **in + } + if in.DaysAfterModificationGreaterThan != nil { + in, out := &in.DaysAfterModificationGreaterThan, &out.DaysAfterModificationGreaterThan + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DateAfterModification_ARM. +func (in *DateAfterModification_ARM) DeepCopy() *DateAfterModification_ARM { + if in == nil { + return nil + } + out := new(DateAfterModification_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DateAfterModification_STATUS) DeepCopyInto(out *DateAfterModification_STATUS) { + *out = *in + if in.DaysAfterCreationGreaterThan != nil { + in, out := &in.DaysAfterCreationGreaterThan, &out.DaysAfterCreationGreaterThan + *out = new(float64) + **out = **in + } + if in.DaysAfterLastAccessTimeGreaterThan != nil { + in, out := &in.DaysAfterLastAccessTimeGreaterThan, &out.DaysAfterLastAccessTimeGreaterThan + *out = new(float64) + **out = **in + } + if in.DaysAfterLastTierChangeGreaterThan != nil { + in, out := &in.DaysAfterLastTierChangeGreaterThan, &out.DaysAfterLastTierChangeGreaterThan + *out = new(float64) + **out = **in + } + if in.DaysAfterModificationGreaterThan != nil { + in, out := &in.DaysAfterModificationGreaterThan, &out.DaysAfterModificationGreaterThan + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DateAfterModification_STATUS. +func (in *DateAfterModification_STATUS) DeepCopy() *DateAfterModification_STATUS { + if in == nil { + return nil + } + out := new(DateAfterModification_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DateAfterModification_STATUS_ARM) DeepCopyInto(out *DateAfterModification_STATUS_ARM) { + *out = *in + if in.DaysAfterCreationGreaterThan != nil { + in, out := &in.DaysAfterCreationGreaterThan, &out.DaysAfterCreationGreaterThan + *out = new(float64) + **out = **in + } + if in.DaysAfterLastAccessTimeGreaterThan != nil { + in, out := &in.DaysAfterLastAccessTimeGreaterThan, &out.DaysAfterLastAccessTimeGreaterThan + *out = new(float64) + **out = **in + } + if in.DaysAfterLastTierChangeGreaterThan != nil { + in, out := &in.DaysAfterLastTierChangeGreaterThan, &out.DaysAfterLastTierChangeGreaterThan + *out = new(float64) + **out = **in + } + if in.DaysAfterModificationGreaterThan != nil { + in, out := &in.DaysAfterModificationGreaterThan, &out.DaysAfterModificationGreaterThan + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DateAfterModification_STATUS_ARM. +func (in *DateAfterModification_STATUS_ARM) DeepCopy() *DateAfterModification_STATUS_ARM { + if in == nil { + return nil + } + out := new(DateAfterModification_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeleteRetentionPolicy) DeepCopyInto(out *DeleteRetentionPolicy) { + *out = *in + if in.AllowPermanentDelete != nil { + in, out := &in.AllowPermanentDelete, &out.AllowPermanentDelete + *out = new(bool) + **out = **in + } + if in.Days != nil { + in, out := &in.Days, &out.Days + *out = new(int) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteRetentionPolicy. +func (in *DeleteRetentionPolicy) DeepCopy() *DeleteRetentionPolicy { + if in == nil { + return nil + } + out := new(DeleteRetentionPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeleteRetentionPolicy_ARM) DeepCopyInto(out *DeleteRetentionPolicy_ARM) { + *out = *in + if in.AllowPermanentDelete != nil { + in, out := &in.AllowPermanentDelete, &out.AllowPermanentDelete + *out = new(bool) + **out = **in + } + if in.Days != nil { + in, out := &in.Days, &out.Days + *out = new(int) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteRetentionPolicy_ARM. +func (in *DeleteRetentionPolicy_ARM) DeepCopy() *DeleteRetentionPolicy_ARM { + if in == nil { + return nil + } + out := new(DeleteRetentionPolicy_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeleteRetentionPolicy_STATUS) DeepCopyInto(out *DeleteRetentionPolicy_STATUS) { + *out = *in + if in.AllowPermanentDelete != nil { + in, out := &in.AllowPermanentDelete, &out.AllowPermanentDelete + *out = new(bool) + **out = **in + } + if in.Days != nil { + in, out := &in.Days, &out.Days + *out = new(int) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteRetentionPolicy_STATUS. +func (in *DeleteRetentionPolicy_STATUS) DeepCopy() *DeleteRetentionPolicy_STATUS { + if in == nil { + return nil + } + out := new(DeleteRetentionPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeleteRetentionPolicy_STATUS_ARM) DeepCopyInto(out *DeleteRetentionPolicy_STATUS_ARM) { + *out = *in + if in.AllowPermanentDelete != nil { + in, out := &in.AllowPermanentDelete, &out.AllowPermanentDelete + *out = new(bool) + **out = **in + } + if in.Days != nil { + in, out := &in.Days, &out.Days + *out = new(int) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteRetentionPolicy_STATUS_ARM. +func (in *DeleteRetentionPolicy_STATUS_ARM) DeepCopy() *DeleteRetentionPolicy_STATUS_ARM { + if in == nil { + return nil + } + out := new(DeleteRetentionPolicy_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Encryption) DeepCopyInto(out *Encryption) { + *out = *in + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(EncryptionIdentity) + (*in).DeepCopyInto(*out) + } + if in.KeySource != nil { + in, out := &in.KeySource, &out.KeySource + *out = new(Encryption_KeySource) + **out = **in + } + if in.Keyvaultproperties != nil { + in, out := &in.Keyvaultproperties, &out.Keyvaultproperties + *out = new(KeyVaultProperties) + (*in).DeepCopyInto(*out) + } + if in.RequireInfrastructureEncryption != nil { + in, out := &in.RequireInfrastructureEncryption, &out.RequireInfrastructureEncryption + *out = new(bool) + **out = **in + } + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = new(EncryptionServices) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Encryption. +func (in *Encryption) DeepCopy() *Encryption { + if in == nil { + return nil + } + out := new(Encryption) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionIdentity) DeepCopyInto(out *EncryptionIdentity) { + *out = *in + if in.FederatedIdentityClientId != nil { + in, out := &in.FederatedIdentityClientId, &out.FederatedIdentityClientId + *out = new(string) + **out = **in + } + if in.UserAssignedIdentityReference != nil { + in, out := &in.UserAssignedIdentityReference, &out.UserAssignedIdentityReference + *out = new(genruntime.ResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionIdentity. +func (in *EncryptionIdentity) DeepCopy() *EncryptionIdentity { + if in == nil { + return nil + } + out := new(EncryptionIdentity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionIdentity_ARM) DeepCopyInto(out *EncryptionIdentity_ARM) { + *out = *in + if in.FederatedIdentityClientId != nil { + in, out := &in.FederatedIdentityClientId, &out.FederatedIdentityClientId + *out = new(string) + **out = **in + } + if in.UserAssignedIdentity != nil { + in, out := &in.UserAssignedIdentity, &out.UserAssignedIdentity + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionIdentity_ARM. +func (in *EncryptionIdentity_ARM) DeepCopy() *EncryptionIdentity_ARM { + if in == nil { + return nil + } + out := new(EncryptionIdentity_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionIdentity_STATUS) DeepCopyInto(out *EncryptionIdentity_STATUS) { + *out = *in + if in.FederatedIdentityClientId != nil { + in, out := &in.FederatedIdentityClientId, &out.FederatedIdentityClientId + *out = new(string) + **out = **in + } + if in.UserAssignedIdentity != nil { + in, out := &in.UserAssignedIdentity, &out.UserAssignedIdentity + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionIdentity_STATUS. +func (in *EncryptionIdentity_STATUS) DeepCopy() *EncryptionIdentity_STATUS { + if in == nil { + return nil + } + out := new(EncryptionIdentity_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionIdentity_STATUS_ARM) DeepCopyInto(out *EncryptionIdentity_STATUS_ARM) { + *out = *in + if in.FederatedIdentityClientId != nil { + in, out := &in.FederatedIdentityClientId, &out.FederatedIdentityClientId + *out = new(string) + **out = **in + } + if in.UserAssignedIdentity != nil { + in, out := &in.UserAssignedIdentity, &out.UserAssignedIdentity + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionIdentity_STATUS_ARM. +func (in *EncryptionIdentity_STATUS_ARM) DeepCopy() *EncryptionIdentity_STATUS_ARM { + if in == nil { + return nil + } + out := new(EncryptionIdentity_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionService) DeepCopyInto(out *EncryptionService) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.KeyType != nil { + in, out := &in.KeyType, &out.KeyType + *out = new(EncryptionService_KeyType) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionService. +func (in *EncryptionService) DeepCopy() *EncryptionService { + if in == nil { + return nil + } + out := new(EncryptionService) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionService_ARM) DeepCopyInto(out *EncryptionService_ARM) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.KeyType != nil { + in, out := &in.KeyType, &out.KeyType + *out = new(EncryptionService_KeyType) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionService_ARM. +func (in *EncryptionService_ARM) DeepCopy() *EncryptionService_ARM { + if in == nil { + return nil + } + out := new(EncryptionService_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionService_STATUS) DeepCopyInto(out *EncryptionService_STATUS) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.KeyType != nil { + in, out := &in.KeyType, &out.KeyType + *out = new(EncryptionService_KeyType_STATUS) + **out = **in + } + if in.LastEnabledTime != nil { + in, out := &in.LastEnabledTime, &out.LastEnabledTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionService_STATUS. +func (in *EncryptionService_STATUS) DeepCopy() *EncryptionService_STATUS { + if in == nil { + return nil + } + out := new(EncryptionService_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionService_STATUS_ARM) DeepCopyInto(out *EncryptionService_STATUS_ARM) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.KeyType != nil { + in, out := &in.KeyType, &out.KeyType + *out = new(EncryptionService_KeyType_STATUS) + **out = **in + } + if in.LastEnabledTime != nil { + in, out := &in.LastEnabledTime, &out.LastEnabledTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionService_STATUS_ARM. +func (in *EncryptionService_STATUS_ARM) DeepCopy() *EncryptionService_STATUS_ARM { + if in == nil { + return nil + } + out := new(EncryptionService_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionServices) DeepCopyInto(out *EncryptionServices) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(EncryptionService) + (*in).DeepCopyInto(*out) + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(EncryptionService) + (*in).DeepCopyInto(*out) + } + if in.Queue != nil { + in, out := &in.Queue, &out.Queue + *out = new(EncryptionService) + (*in).DeepCopyInto(*out) + } + if in.Table != nil { + in, out := &in.Table, &out.Table + *out = new(EncryptionService) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionServices. +func (in *EncryptionServices) DeepCopy() *EncryptionServices { + if in == nil { + return nil + } + out := new(EncryptionServices) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionServices_ARM) DeepCopyInto(out *EncryptionServices_ARM) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(EncryptionService_ARM) + (*in).DeepCopyInto(*out) + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(EncryptionService_ARM) + (*in).DeepCopyInto(*out) + } + if in.Queue != nil { + in, out := &in.Queue, &out.Queue + *out = new(EncryptionService_ARM) + (*in).DeepCopyInto(*out) + } + if in.Table != nil { + in, out := &in.Table, &out.Table + *out = new(EncryptionService_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionServices_ARM. +func (in *EncryptionServices_ARM) DeepCopy() *EncryptionServices_ARM { + if in == nil { + return nil + } + out := new(EncryptionServices_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionServices_STATUS) DeepCopyInto(out *EncryptionServices_STATUS) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(EncryptionService_STATUS) + (*in).DeepCopyInto(*out) + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(EncryptionService_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Queue != nil { + in, out := &in.Queue, &out.Queue + *out = new(EncryptionService_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Table != nil { + in, out := &in.Table, &out.Table + *out = new(EncryptionService_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionServices_STATUS. +func (in *EncryptionServices_STATUS) DeepCopy() *EncryptionServices_STATUS { + if in == nil { + return nil + } + out := new(EncryptionServices_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionServices_STATUS_ARM) DeepCopyInto(out *EncryptionServices_STATUS_ARM) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(EncryptionService_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(EncryptionService_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Queue != nil { + in, out := &in.Queue, &out.Queue + *out = new(EncryptionService_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Table != nil { + in, out := &in.Table, &out.Table + *out = new(EncryptionService_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionServices_STATUS_ARM. +func (in *EncryptionServices_STATUS_ARM) DeepCopy() *EncryptionServices_STATUS_ARM { + if in == nil { + return nil + } + out := new(EncryptionServices_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Encryption_ARM) DeepCopyInto(out *Encryption_ARM) { + *out = *in + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(EncryptionIdentity_ARM) + (*in).DeepCopyInto(*out) + } + if in.KeySource != nil { + in, out := &in.KeySource, &out.KeySource + *out = new(Encryption_KeySource) + **out = **in + } + if in.Keyvaultproperties != nil { + in, out := &in.Keyvaultproperties, &out.Keyvaultproperties + *out = new(KeyVaultProperties_ARM) + (*in).DeepCopyInto(*out) + } + if in.RequireInfrastructureEncryption != nil { + in, out := &in.RequireInfrastructureEncryption, &out.RequireInfrastructureEncryption + *out = new(bool) + **out = **in + } + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = new(EncryptionServices_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Encryption_ARM. +func (in *Encryption_ARM) DeepCopy() *Encryption_ARM { + if in == nil { + return nil + } + out := new(Encryption_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Encryption_STATUS) DeepCopyInto(out *Encryption_STATUS) { + *out = *in + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(EncryptionIdentity_STATUS) + (*in).DeepCopyInto(*out) + } + if in.KeySource != nil { + in, out := &in.KeySource, &out.KeySource + *out = new(Encryption_KeySource_STATUS) + **out = **in + } + if in.Keyvaultproperties != nil { + in, out := &in.Keyvaultproperties, &out.Keyvaultproperties + *out = new(KeyVaultProperties_STATUS) + (*in).DeepCopyInto(*out) + } + if in.RequireInfrastructureEncryption != nil { + in, out := &in.RequireInfrastructureEncryption, &out.RequireInfrastructureEncryption + *out = new(bool) + **out = **in + } + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = new(EncryptionServices_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Encryption_STATUS. +func (in *Encryption_STATUS) DeepCopy() *Encryption_STATUS { + if in == nil { + return nil + } + out := new(Encryption_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Encryption_STATUS_ARM) DeepCopyInto(out *Encryption_STATUS_ARM) { + *out = *in + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(EncryptionIdentity_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.KeySource != nil { + in, out := &in.KeySource, &out.KeySource + *out = new(Encryption_KeySource_STATUS) + **out = **in + } + if in.Keyvaultproperties != nil { + in, out := &in.Keyvaultproperties, &out.Keyvaultproperties + *out = new(KeyVaultProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.RequireInfrastructureEncryption != nil { + in, out := &in.RequireInfrastructureEncryption, &out.RequireInfrastructureEncryption + *out = new(bool) + **out = **in + } + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = new(EncryptionServices_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Encryption_STATUS_ARM. +func (in *Encryption_STATUS_ARM) DeepCopy() *Encryption_STATUS_ARM { + if in == nil { + return nil + } + out := new(Encryption_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Endpoints_STATUS) DeepCopyInto(out *Endpoints_STATUS) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(string) + **out = **in + } + if in.Dfs != nil { + in, out := &in.Dfs, &out.Dfs + *out = new(string) + **out = **in + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(string) + **out = **in + } + if in.InternetEndpoints != nil { + in, out := &in.InternetEndpoints, &out.InternetEndpoints + *out = new(StorageAccountInternetEndpoints_STATUS) + (*in).DeepCopyInto(*out) + } + if in.MicrosoftEndpoints != nil { + in, out := &in.MicrosoftEndpoints, &out.MicrosoftEndpoints + *out = new(StorageAccountMicrosoftEndpoints_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Queue != nil { + in, out := &in.Queue, &out.Queue + *out = new(string) + **out = **in + } + if in.Table != nil { + in, out := &in.Table, &out.Table + *out = new(string) + **out = **in + } + if in.Web != nil { + in, out := &in.Web, &out.Web + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoints_STATUS. +func (in *Endpoints_STATUS) DeepCopy() *Endpoints_STATUS { + if in == nil { + return nil + } + out := new(Endpoints_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Endpoints_STATUS_ARM) DeepCopyInto(out *Endpoints_STATUS_ARM) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(string) + **out = **in + } + if in.Dfs != nil { + in, out := &in.Dfs, &out.Dfs + *out = new(string) + **out = **in + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(string) + **out = **in + } + if in.InternetEndpoints != nil { + in, out := &in.InternetEndpoints, &out.InternetEndpoints + *out = new(StorageAccountInternetEndpoints_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.MicrosoftEndpoints != nil { + in, out := &in.MicrosoftEndpoints, &out.MicrosoftEndpoints + *out = new(StorageAccountMicrosoftEndpoints_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Queue != nil { + in, out := &in.Queue, &out.Queue + *out = new(string) + **out = **in + } + if in.Table != nil { + in, out := &in.Table, &out.Table + *out = new(string) + **out = **in + } + if in.Web != nil { + in, out := &in.Web, &out.Web + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoints_STATUS_ARM. +func (in *Endpoints_STATUS_ARM) DeepCopy() *Endpoints_STATUS_ARM { + if in == nil { + return nil + } + out := new(Endpoints_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtendedLocation) DeepCopyInto(out *ExtendedLocation) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(ExtendedLocationType) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedLocation. +func (in *ExtendedLocation) DeepCopy() *ExtendedLocation { + if in == nil { + return nil + } + out := new(ExtendedLocation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtendedLocation_ARM) DeepCopyInto(out *ExtendedLocation_ARM) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(ExtendedLocationType) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedLocation_ARM. +func (in *ExtendedLocation_ARM) DeepCopy() *ExtendedLocation_ARM { + if in == nil { + return nil + } + out := new(ExtendedLocation_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtendedLocation_STATUS) DeepCopyInto(out *ExtendedLocation_STATUS) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(ExtendedLocationType_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedLocation_STATUS. +func (in *ExtendedLocation_STATUS) DeepCopy() *ExtendedLocation_STATUS { + if in == nil { + return nil + } + out := new(ExtendedLocation_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtendedLocation_STATUS_ARM) DeepCopyInto(out *ExtendedLocation_STATUS_ARM) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(ExtendedLocationType_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedLocation_STATUS_ARM. +func (in *ExtendedLocation_STATUS_ARM) DeepCopy() *ExtendedLocation_STATUS_ARM { + if in == nil { + return nil + } + out := new(ExtendedLocation_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FileShareProperties_ARM) DeepCopyInto(out *FileShareProperties_ARM) { + *out = *in + if in.AccessTier != nil { + in, out := &in.AccessTier, &out.AccessTier + *out = new(FileShareProperties_AccessTier) + **out = **in + } + if in.EnabledProtocols != nil { + in, out := &in.EnabledProtocols, &out.EnabledProtocols + *out = new(FileShareProperties_EnabledProtocols) + **out = **in + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RootSquash != nil { + in, out := &in.RootSquash, &out.RootSquash + *out = new(FileShareProperties_RootSquash) + **out = **in + } + if in.ShareQuota != nil { + in, out := &in.ShareQuota, &out.ShareQuota + *out = new(int) + **out = **in + } + if in.SignedIdentifiers != nil { + in, out := &in.SignedIdentifiers, &out.SignedIdentifiers + *out = make([]SignedIdentifier_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileShareProperties_ARM. +func (in *FileShareProperties_ARM) DeepCopy() *FileShareProperties_ARM { + if in == nil { + return nil + } + out := new(FileShareProperties_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FileShareProperties_STATUS_ARM) DeepCopyInto(out *FileShareProperties_STATUS_ARM) { + *out = *in + if in.AccessTier != nil { + in, out := &in.AccessTier, &out.AccessTier + *out = new(FileShareProperties_AccessTier_STATUS) + **out = **in + } + if in.AccessTierChangeTime != nil { + in, out := &in.AccessTierChangeTime, &out.AccessTierChangeTime + *out = new(string) + **out = **in + } + if in.AccessTierStatus != nil { + in, out := &in.AccessTierStatus, &out.AccessTierStatus + *out = new(string) + **out = **in + } + if in.Deleted != nil { + in, out := &in.Deleted, &out.Deleted + *out = new(bool) + **out = **in + } + if in.DeletedTime != nil { + in, out := &in.DeletedTime, &out.DeletedTime + *out = new(string) + **out = **in + } + if in.EnabledProtocols != nil { + in, out := &in.EnabledProtocols, &out.EnabledProtocols + *out = new(FileShareProperties_EnabledProtocols_STATUS) + **out = **in + } + if in.LastModifiedTime != nil { + in, out := &in.LastModifiedTime, &out.LastModifiedTime + *out = new(string) + **out = **in + } + if in.LeaseDuration != nil { + in, out := &in.LeaseDuration, &out.LeaseDuration + *out = new(FileShareProperties_LeaseDuration_STATUS) + **out = **in + } + if in.LeaseState != nil { + in, out := &in.LeaseState, &out.LeaseState + *out = new(FileShareProperties_LeaseState_STATUS) + **out = **in + } + if in.LeaseStatus != nil { + in, out := &in.LeaseStatus, &out.LeaseStatus + *out = new(FileShareProperties_LeaseStatus_STATUS) + **out = **in + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RemainingRetentionDays != nil { + in, out := &in.RemainingRetentionDays, &out.RemainingRetentionDays + *out = new(int) + **out = **in + } + if in.RootSquash != nil { + in, out := &in.RootSquash, &out.RootSquash + *out = new(FileShareProperties_RootSquash_STATUS) + **out = **in + } + if in.ShareQuota != nil { + in, out := &in.ShareQuota, &out.ShareQuota + *out = new(int) + **out = **in + } + if in.ShareUsageBytes != nil { + in, out := &in.ShareUsageBytes, &out.ShareUsageBytes + *out = new(int) + **out = **in + } + if in.SignedIdentifiers != nil { + in, out := &in.SignedIdentifiers, &out.SignedIdentifiers + *out = make([]SignedIdentifier_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SnapshotTime != nil { + in, out := &in.SnapshotTime, &out.SnapshotTime + *out = new(string) + **out = **in + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileShareProperties_STATUS_ARM. +func (in *FileShareProperties_STATUS_ARM) DeepCopy() *FileShareProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(FileShareProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GeoReplicationStats_STATUS) DeepCopyInto(out *GeoReplicationStats_STATUS) { + *out = *in + if in.CanFailover != nil { + in, out := &in.CanFailover, &out.CanFailover + *out = new(bool) + **out = **in + } + if in.CanPlannedFailover != nil { + in, out := &in.CanPlannedFailover, &out.CanPlannedFailover + *out = new(bool) + **out = **in + } + if in.LastSyncTime != nil { + in, out := &in.LastSyncTime, &out.LastSyncTime + *out = new(string) + **out = **in + } + if in.PostFailoverRedundancy != nil { + in, out := &in.PostFailoverRedundancy, &out.PostFailoverRedundancy + *out = new(GeoReplicationStats_PostFailoverRedundancy_STATUS) + **out = **in + } + if in.PostPlannedFailoverRedundancy != nil { + in, out := &in.PostPlannedFailoverRedundancy, &out.PostPlannedFailoverRedundancy + *out = new(GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(GeoReplicationStats_Status_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GeoReplicationStats_STATUS. +func (in *GeoReplicationStats_STATUS) DeepCopy() *GeoReplicationStats_STATUS { + if in == nil { + return nil + } + out := new(GeoReplicationStats_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GeoReplicationStats_STATUS_ARM) DeepCopyInto(out *GeoReplicationStats_STATUS_ARM) { + *out = *in + if in.CanFailover != nil { + in, out := &in.CanFailover, &out.CanFailover + *out = new(bool) + **out = **in + } + if in.CanPlannedFailover != nil { + in, out := &in.CanPlannedFailover, &out.CanPlannedFailover + *out = new(bool) + **out = **in + } + if in.LastSyncTime != nil { + in, out := &in.LastSyncTime, &out.LastSyncTime + *out = new(string) + **out = **in + } + if in.PostFailoverRedundancy != nil { + in, out := &in.PostFailoverRedundancy, &out.PostFailoverRedundancy + *out = new(GeoReplicationStats_PostFailoverRedundancy_STATUS) + **out = **in + } + if in.PostPlannedFailoverRedundancy != nil { + in, out := &in.PostPlannedFailoverRedundancy, &out.PostPlannedFailoverRedundancy + *out = new(GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(GeoReplicationStats_Status_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GeoReplicationStats_STATUS_ARM. +func (in *GeoReplicationStats_STATUS_ARM) DeepCopy() *GeoReplicationStats_STATUS_ARM { + if in == nil { + return nil + } + out := new(GeoReplicationStats_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPRule) DeepCopyInto(out *IPRule) { + *out = *in + if in.Action != nil { + in, out := &in.Action, &out.Action + *out = new(IPRule_Action) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRule. +func (in *IPRule) DeepCopy() *IPRule { + if in == nil { + return nil + } + out := new(IPRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPRule_ARM) DeepCopyInto(out *IPRule_ARM) { + *out = *in + if in.Action != nil { + in, out := &in.Action, &out.Action + *out = new(IPRule_Action) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRule_ARM. +func (in *IPRule_ARM) DeepCopy() *IPRule_ARM { + if in == nil { + return nil + } + out := new(IPRule_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPRule_STATUS) DeepCopyInto(out *IPRule_STATUS) { + *out = *in + if in.Action != nil { + in, out := &in.Action, &out.Action + *out = new(IPRule_Action_STATUS) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRule_STATUS. +func (in *IPRule_STATUS) DeepCopy() *IPRule_STATUS { + if in == nil { + return nil + } + out := new(IPRule_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPRule_STATUS_ARM) DeepCopyInto(out *IPRule_STATUS_ARM) { + *out = *in + if in.Action != nil { + in, out := &in.Action, &out.Action + *out = new(IPRule_Action_STATUS) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRule_STATUS_ARM. +func (in *IPRule_STATUS_ARM) DeepCopy() *IPRule_STATUS_ARM { + if in == nil { + return nil + } + out := new(IPRule_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Identity) DeepCopyInto(out *Identity) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(Identity_Type) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make([]UserAssignedIdentityDetails, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity. +func (in *Identity) DeepCopy() *Identity { + if in == nil { + return nil + } + out := new(Identity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Identity_ARM) DeepCopyInto(out *Identity_ARM) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(Identity_Type) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make(map[string]UserAssignedIdentityDetails_ARM, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity_ARM. +func (in *Identity_ARM) DeepCopy() *Identity_ARM { + if in == nil { + return nil + } + out := new(Identity_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Identity_STATUS) DeepCopyInto(out *Identity_STATUS) { + *out = *in + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(Identity_Type_STATUS) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make(map[string]UserAssignedIdentity_STATUS, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity_STATUS. +func (in *Identity_STATUS) DeepCopy() *Identity_STATUS { + if in == nil { + return nil + } + out := new(Identity_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Identity_STATUS_ARM) DeepCopyInto(out *Identity_STATUS_ARM) { + *out = *in + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(Identity_Type_STATUS) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make(map[string]UserAssignedIdentity_STATUS_ARM, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity_STATUS_ARM. +func (in *Identity_STATUS_ARM) DeepCopy() *Identity_STATUS_ARM { + if in == nil { + return nil + } + out := new(Identity_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutabilityPolicyProperties_STATUS) DeepCopyInto(out *ImmutabilityPolicyProperties_STATUS) { + *out = *in + if in.AllowProtectedAppendWrites != nil { + in, out := &in.AllowProtectedAppendWrites, &out.AllowProtectedAppendWrites + *out = new(bool) + **out = **in + } + if in.AllowProtectedAppendWritesAll != nil { + in, out := &in.AllowProtectedAppendWritesAll, &out.AllowProtectedAppendWritesAll + *out = new(bool) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.ImmutabilityPeriodSinceCreationInDays != nil { + in, out := &in.ImmutabilityPeriodSinceCreationInDays, &out.ImmutabilityPeriodSinceCreationInDays + *out = new(int) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(ImmutabilityPolicyProperty_State_STATUS) + **out = **in + } + if in.UpdateHistory != nil { + in, out := &in.UpdateHistory, &out.UpdateHistory + *out = make([]UpdateHistoryProperty_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutabilityPolicyProperties_STATUS. +func (in *ImmutabilityPolicyProperties_STATUS) DeepCopy() *ImmutabilityPolicyProperties_STATUS { + if in == nil { + return nil + } + out := new(ImmutabilityPolicyProperties_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutabilityPolicyProperties_STATUS_ARM) DeepCopyInto(out *ImmutabilityPolicyProperties_STATUS_ARM) { + *out = *in + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(ImmutabilityPolicyProperty_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.UpdateHistory != nil { + in, out := &in.UpdateHistory, &out.UpdateHistory + *out = make([]UpdateHistoryProperty_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutabilityPolicyProperties_STATUS_ARM. +func (in *ImmutabilityPolicyProperties_STATUS_ARM) DeepCopy() *ImmutabilityPolicyProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(ImmutabilityPolicyProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutabilityPolicyProperty_STATUS_ARM) DeepCopyInto(out *ImmutabilityPolicyProperty_STATUS_ARM) { + *out = *in + if in.AllowProtectedAppendWrites != nil { + in, out := &in.AllowProtectedAppendWrites, &out.AllowProtectedAppendWrites + *out = new(bool) + **out = **in + } + if in.AllowProtectedAppendWritesAll != nil { + in, out := &in.AllowProtectedAppendWritesAll, &out.AllowProtectedAppendWritesAll + *out = new(bool) + **out = **in + } + if in.ImmutabilityPeriodSinceCreationInDays != nil { + in, out := &in.ImmutabilityPeriodSinceCreationInDays, &out.ImmutabilityPeriodSinceCreationInDays + *out = new(int) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(ImmutabilityPolicyProperty_State_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutabilityPolicyProperty_STATUS_ARM. +func (in *ImmutabilityPolicyProperty_STATUS_ARM) DeepCopy() *ImmutabilityPolicyProperty_STATUS_ARM { + if in == nil { + return nil + } + out := new(ImmutabilityPolicyProperty_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutableStorageAccount) DeepCopyInto(out *ImmutableStorageAccount) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.ImmutabilityPolicy != nil { + in, out := &in.ImmutabilityPolicy, &out.ImmutabilityPolicy + *out = new(AccountImmutabilityPolicyProperties) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutableStorageAccount. +func (in *ImmutableStorageAccount) DeepCopy() *ImmutableStorageAccount { + if in == nil { + return nil + } + out := new(ImmutableStorageAccount) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutableStorageAccount_ARM) DeepCopyInto(out *ImmutableStorageAccount_ARM) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.ImmutabilityPolicy != nil { + in, out := &in.ImmutabilityPolicy, &out.ImmutabilityPolicy + *out = new(AccountImmutabilityPolicyProperties_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutableStorageAccount_ARM. +func (in *ImmutableStorageAccount_ARM) DeepCopy() *ImmutableStorageAccount_ARM { + if in == nil { + return nil + } + out := new(ImmutableStorageAccount_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutableStorageAccount_STATUS) DeepCopyInto(out *ImmutableStorageAccount_STATUS) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.ImmutabilityPolicy != nil { + in, out := &in.ImmutabilityPolicy, &out.ImmutabilityPolicy + *out = new(AccountImmutabilityPolicyProperties_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutableStorageAccount_STATUS. +func (in *ImmutableStorageAccount_STATUS) DeepCopy() *ImmutableStorageAccount_STATUS { + if in == nil { + return nil + } + out := new(ImmutableStorageAccount_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutableStorageAccount_STATUS_ARM) DeepCopyInto(out *ImmutableStorageAccount_STATUS_ARM) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.ImmutabilityPolicy != nil { + in, out := &in.ImmutabilityPolicy, &out.ImmutabilityPolicy + *out = new(AccountImmutabilityPolicyProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutableStorageAccount_STATUS_ARM. +func (in *ImmutableStorageAccount_STATUS_ARM) DeepCopy() *ImmutableStorageAccount_STATUS_ARM { + if in == nil { + return nil + } + out := new(ImmutableStorageAccount_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutableStorageWithVersioning) DeepCopyInto(out *ImmutableStorageWithVersioning) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutableStorageWithVersioning. +func (in *ImmutableStorageWithVersioning) DeepCopy() *ImmutableStorageWithVersioning { + if in == nil { + return nil + } + out := new(ImmutableStorageWithVersioning) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutableStorageWithVersioning_ARM) DeepCopyInto(out *ImmutableStorageWithVersioning_ARM) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutableStorageWithVersioning_ARM. +func (in *ImmutableStorageWithVersioning_ARM) DeepCopy() *ImmutableStorageWithVersioning_ARM { + if in == nil { + return nil + } + out := new(ImmutableStorageWithVersioning_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutableStorageWithVersioning_STATUS) DeepCopyInto(out *ImmutableStorageWithVersioning_STATUS) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.MigrationState != nil { + in, out := &in.MigrationState, &out.MigrationState + *out = new(ImmutableStorageWithVersioning_MigrationState_STATUS) + **out = **in + } + if in.TimeStamp != nil { + in, out := &in.TimeStamp, &out.TimeStamp + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutableStorageWithVersioning_STATUS. +func (in *ImmutableStorageWithVersioning_STATUS) DeepCopy() *ImmutableStorageWithVersioning_STATUS { + if in == nil { + return nil + } + out := new(ImmutableStorageWithVersioning_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImmutableStorageWithVersioning_STATUS_ARM) DeepCopyInto(out *ImmutableStorageWithVersioning_STATUS_ARM) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.MigrationState != nil { + in, out := &in.MigrationState, &out.MigrationState + *out = new(ImmutableStorageWithVersioning_MigrationState_STATUS) + **out = **in + } + if in.TimeStamp != nil { + in, out := &in.TimeStamp, &out.TimeStamp + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImmutableStorageWithVersioning_STATUS_ARM. +func (in *ImmutableStorageWithVersioning_STATUS_ARM) DeepCopy() *ImmutableStorageWithVersioning_STATUS_ARM { + if in == nil { + return nil + } + out := new(ImmutableStorageWithVersioning_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyCreationTime_STATUS) DeepCopyInto(out *KeyCreationTime_STATUS) { + *out = *in + if in.Key1 != nil { + in, out := &in.Key1, &out.Key1 + *out = new(string) + **out = **in + } + if in.Key2 != nil { + in, out := &in.Key2, &out.Key2 + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCreationTime_STATUS. +func (in *KeyCreationTime_STATUS) DeepCopy() *KeyCreationTime_STATUS { + if in == nil { + return nil + } + out := new(KeyCreationTime_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyCreationTime_STATUS_ARM) DeepCopyInto(out *KeyCreationTime_STATUS_ARM) { + *out = *in + if in.Key1 != nil { + in, out := &in.Key1, &out.Key1 + *out = new(string) + **out = **in + } + if in.Key2 != nil { + in, out := &in.Key2, &out.Key2 + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCreationTime_STATUS_ARM. +func (in *KeyCreationTime_STATUS_ARM) DeepCopy() *KeyCreationTime_STATUS_ARM { + if in == nil { + return nil + } + out := new(KeyCreationTime_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPolicy) DeepCopyInto(out *KeyPolicy) { + *out = *in + if in.KeyExpirationPeriodInDays != nil { + in, out := &in.KeyExpirationPeriodInDays, &out.KeyExpirationPeriodInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPolicy. +func (in *KeyPolicy) DeepCopy() *KeyPolicy { + if in == nil { + return nil + } + out := new(KeyPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPolicy_ARM) DeepCopyInto(out *KeyPolicy_ARM) { + *out = *in + if in.KeyExpirationPeriodInDays != nil { + in, out := &in.KeyExpirationPeriodInDays, &out.KeyExpirationPeriodInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPolicy_ARM. +func (in *KeyPolicy_ARM) DeepCopy() *KeyPolicy_ARM { + if in == nil { + return nil + } + out := new(KeyPolicy_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPolicy_STATUS) DeepCopyInto(out *KeyPolicy_STATUS) { + *out = *in + if in.KeyExpirationPeriodInDays != nil { + in, out := &in.KeyExpirationPeriodInDays, &out.KeyExpirationPeriodInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPolicy_STATUS. +func (in *KeyPolicy_STATUS) DeepCopy() *KeyPolicy_STATUS { + if in == nil { + return nil + } + out := new(KeyPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPolicy_STATUS_ARM) DeepCopyInto(out *KeyPolicy_STATUS_ARM) { + *out = *in + if in.KeyExpirationPeriodInDays != nil { + in, out := &in.KeyExpirationPeriodInDays, &out.KeyExpirationPeriodInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPolicy_STATUS_ARM. +func (in *KeyPolicy_STATUS_ARM) DeepCopy() *KeyPolicy_STATUS_ARM { + if in == nil { + return nil + } + out := new(KeyPolicy_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyVaultProperties) DeepCopyInto(out *KeyVaultProperties) { + *out = *in + if in.Keyname != nil { + in, out := &in.Keyname, &out.Keyname + *out = new(string) + **out = **in + } + if in.Keyvaulturi != nil { + in, out := &in.Keyvaulturi, &out.Keyvaulturi + *out = new(string) + **out = **in + } + if in.Keyversion != nil { + in, out := &in.Keyversion, &out.Keyversion + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyVaultProperties. +func (in *KeyVaultProperties) DeepCopy() *KeyVaultProperties { + if in == nil { + return nil + } + out := new(KeyVaultProperties) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyVaultProperties_ARM) DeepCopyInto(out *KeyVaultProperties_ARM) { + *out = *in + if in.Keyname != nil { + in, out := &in.Keyname, &out.Keyname + *out = new(string) + **out = **in + } + if in.Keyvaulturi != nil { + in, out := &in.Keyvaulturi, &out.Keyvaulturi + *out = new(string) + **out = **in + } + if in.Keyversion != nil { + in, out := &in.Keyversion, &out.Keyversion + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyVaultProperties_ARM. +func (in *KeyVaultProperties_ARM) DeepCopy() *KeyVaultProperties_ARM { + if in == nil { + return nil + } + out := new(KeyVaultProperties_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyVaultProperties_STATUS) DeepCopyInto(out *KeyVaultProperties_STATUS) { + *out = *in + if in.CurrentVersionedKeyExpirationTimestamp != nil { + in, out := &in.CurrentVersionedKeyExpirationTimestamp, &out.CurrentVersionedKeyExpirationTimestamp + *out = new(string) + **out = **in + } + if in.CurrentVersionedKeyIdentifier != nil { + in, out := &in.CurrentVersionedKeyIdentifier, &out.CurrentVersionedKeyIdentifier + *out = new(string) + **out = **in + } + if in.Keyname != nil { + in, out := &in.Keyname, &out.Keyname + *out = new(string) + **out = **in + } + if in.Keyvaulturi != nil { + in, out := &in.Keyvaulturi, &out.Keyvaulturi + *out = new(string) + **out = **in + } + if in.Keyversion != nil { + in, out := &in.Keyversion, &out.Keyversion + *out = new(string) + **out = **in + } + if in.LastKeyRotationTimestamp != nil { + in, out := &in.LastKeyRotationTimestamp, &out.LastKeyRotationTimestamp + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyVaultProperties_STATUS. +func (in *KeyVaultProperties_STATUS) DeepCopy() *KeyVaultProperties_STATUS { + if in == nil { + return nil + } + out := new(KeyVaultProperties_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyVaultProperties_STATUS_ARM) DeepCopyInto(out *KeyVaultProperties_STATUS_ARM) { + *out = *in + if in.CurrentVersionedKeyExpirationTimestamp != nil { + in, out := &in.CurrentVersionedKeyExpirationTimestamp, &out.CurrentVersionedKeyExpirationTimestamp + *out = new(string) + **out = **in + } + if in.CurrentVersionedKeyIdentifier != nil { + in, out := &in.CurrentVersionedKeyIdentifier, &out.CurrentVersionedKeyIdentifier + *out = new(string) + **out = **in + } + if in.Keyname != nil { + in, out := &in.Keyname, &out.Keyname + *out = new(string) + **out = **in + } + if in.Keyvaulturi != nil { + in, out := &in.Keyvaulturi, &out.Keyvaulturi + *out = new(string) + **out = **in + } + if in.Keyversion != nil { + in, out := &in.Keyversion, &out.Keyversion + *out = new(string) + **out = **in + } + if in.LastKeyRotationTimestamp != nil { + in, out := &in.LastKeyRotationTimestamp, &out.LastKeyRotationTimestamp + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyVaultProperties_STATUS_ARM. +func (in *KeyVaultProperties_STATUS_ARM) DeepCopy() *KeyVaultProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(KeyVaultProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LastAccessTimeTrackingPolicy) DeepCopyInto(out *LastAccessTimeTrackingPolicy) { + *out = *in + if in.BlobType != nil { + in, out := &in.BlobType, &out.BlobType + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(LastAccessTimeTrackingPolicy_Name) + **out = **in + } + if in.TrackingGranularityInDays != nil { + in, out := &in.TrackingGranularityInDays, &out.TrackingGranularityInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastAccessTimeTrackingPolicy. +func (in *LastAccessTimeTrackingPolicy) DeepCopy() *LastAccessTimeTrackingPolicy { + if in == nil { + return nil + } + out := new(LastAccessTimeTrackingPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LastAccessTimeTrackingPolicy_ARM) DeepCopyInto(out *LastAccessTimeTrackingPolicy_ARM) { + *out = *in + if in.BlobType != nil { + in, out := &in.BlobType, &out.BlobType + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(LastAccessTimeTrackingPolicy_Name) + **out = **in + } + if in.TrackingGranularityInDays != nil { + in, out := &in.TrackingGranularityInDays, &out.TrackingGranularityInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastAccessTimeTrackingPolicy_ARM. +func (in *LastAccessTimeTrackingPolicy_ARM) DeepCopy() *LastAccessTimeTrackingPolicy_ARM { + if in == nil { + return nil + } + out := new(LastAccessTimeTrackingPolicy_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LastAccessTimeTrackingPolicy_STATUS) DeepCopyInto(out *LastAccessTimeTrackingPolicy_STATUS) { + *out = *in + if in.BlobType != nil { + in, out := &in.BlobType, &out.BlobType + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(LastAccessTimeTrackingPolicy_Name_STATUS) + **out = **in + } + if in.TrackingGranularityInDays != nil { + in, out := &in.TrackingGranularityInDays, &out.TrackingGranularityInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastAccessTimeTrackingPolicy_STATUS. +func (in *LastAccessTimeTrackingPolicy_STATUS) DeepCopy() *LastAccessTimeTrackingPolicy_STATUS { + if in == nil { + return nil + } + out := new(LastAccessTimeTrackingPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LastAccessTimeTrackingPolicy_STATUS_ARM) DeepCopyInto(out *LastAccessTimeTrackingPolicy_STATUS_ARM) { + *out = *in + if in.BlobType != nil { + in, out := &in.BlobType, &out.BlobType + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(LastAccessTimeTrackingPolicy_Name_STATUS) + **out = **in + } + if in.TrackingGranularityInDays != nil { + in, out := &in.TrackingGranularityInDays, &out.TrackingGranularityInDays + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastAccessTimeTrackingPolicy_STATUS_ARM. +func (in *LastAccessTimeTrackingPolicy_STATUS_ARM) DeepCopy() *LastAccessTimeTrackingPolicy_STATUS_ARM { + if in == nil { + return nil + } + out := new(LastAccessTimeTrackingPolicy_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LegalHoldProperties_STATUS) DeepCopyInto(out *LegalHoldProperties_STATUS) { + *out = *in + if in.HasLegalHold != nil { + in, out := &in.HasLegalHold, &out.HasLegalHold + *out = new(bool) + **out = **in + } + if in.ProtectedAppendWritesHistory != nil { + in, out := &in.ProtectedAppendWritesHistory, &out.ProtectedAppendWritesHistory + *out = new(ProtectedAppendWritesHistory_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]TagProperty_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LegalHoldProperties_STATUS. +func (in *LegalHoldProperties_STATUS) DeepCopy() *LegalHoldProperties_STATUS { + if in == nil { + return nil + } + out := new(LegalHoldProperties_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LegalHoldProperties_STATUS_ARM) DeepCopyInto(out *LegalHoldProperties_STATUS_ARM) { + *out = *in + if in.HasLegalHold != nil { + in, out := &in.HasLegalHold, &out.HasLegalHold + *out = new(bool) + **out = **in + } + if in.ProtectedAppendWritesHistory != nil { + in, out := &in.ProtectedAppendWritesHistory, &out.ProtectedAppendWritesHistory + *out = new(ProtectedAppendWritesHistory_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]TagProperty_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LegalHoldProperties_STATUS_ARM. +func (in *LegalHoldProperties_STATUS_ARM) DeepCopy() *LegalHoldProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(LegalHoldProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyAction) DeepCopyInto(out *ManagementPolicyAction) { + *out = *in + if in.BaseBlob != nil { + in, out := &in.BaseBlob, &out.BaseBlob + *out = new(ManagementPolicyBaseBlob) + (*in).DeepCopyInto(*out) + } + if in.Snapshot != nil { + in, out := &in.Snapshot, &out.Snapshot + *out = new(ManagementPolicySnapShot) + (*in).DeepCopyInto(*out) + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(ManagementPolicyVersion) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyAction. +func (in *ManagementPolicyAction) DeepCopy() *ManagementPolicyAction { + if in == nil { + return nil + } + out := new(ManagementPolicyAction) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyAction_ARM) DeepCopyInto(out *ManagementPolicyAction_ARM) { + *out = *in + if in.BaseBlob != nil { + in, out := &in.BaseBlob, &out.BaseBlob + *out = new(ManagementPolicyBaseBlob_ARM) + (*in).DeepCopyInto(*out) + } + if in.Snapshot != nil { + in, out := &in.Snapshot, &out.Snapshot + *out = new(ManagementPolicySnapShot_ARM) + (*in).DeepCopyInto(*out) + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(ManagementPolicyVersion_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyAction_ARM. +func (in *ManagementPolicyAction_ARM) DeepCopy() *ManagementPolicyAction_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyAction_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyAction_STATUS) DeepCopyInto(out *ManagementPolicyAction_STATUS) { + *out = *in + if in.BaseBlob != nil { + in, out := &in.BaseBlob, &out.BaseBlob + *out = new(ManagementPolicyBaseBlob_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Snapshot != nil { + in, out := &in.Snapshot, &out.Snapshot + *out = new(ManagementPolicySnapShot_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(ManagementPolicyVersion_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyAction_STATUS. +func (in *ManagementPolicyAction_STATUS) DeepCopy() *ManagementPolicyAction_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicyAction_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyAction_STATUS_ARM) DeepCopyInto(out *ManagementPolicyAction_STATUS_ARM) { + *out = *in + if in.BaseBlob != nil { + in, out := &in.BaseBlob, &out.BaseBlob + *out = new(ManagementPolicyBaseBlob_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Snapshot != nil { + in, out := &in.Snapshot, &out.Snapshot + *out = new(ManagementPolicySnapShot_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(ManagementPolicyVersion_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyAction_STATUS_ARM. +func (in *ManagementPolicyAction_STATUS_ARM) DeepCopy() *ManagementPolicyAction_STATUS_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyAction_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyBaseBlob) DeepCopyInto(out *ManagementPolicyBaseBlob) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterModification) + (*in).DeepCopyInto(*out) + } + if in.EnableAutoTierToHotFromCool != nil { + in, out := &in.EnableAutoTierToHotFromCool, &out.EnableAutoTierToHotFromCool + *out = new(bool) + **out = **in + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterModification) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterModification) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterModification) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterModification) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyBaseBlob. +func (in *ManagementPolicyBaseBlob) DeepCopy() *ManagementPolicyBaseBlob { + if in == nil { + return nil + } + out := new(ManagementPolicyBaseBlob) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyBaseBlob_ARM) DeepCopyInto(out *ManagementPolicyBaseBlob_ARM) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterModification_ARM) + (*in).DeepCopyInto(*out) + } + if in.EnableAutoTierToHotFromCool != nil { + in, out := &in.EnableAutoTierToHotFromCool, &out.EnableAutoTierToHotFromCool + *out = new(bool) + **out = **in + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterModification_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterModification_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterModification_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterModification_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyBaseBlob_ARM. +func (in *ManagementPolicyBaseBlob_ARM) DeepCopy() *ManagementPolicyBaseBlob_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyBaseBlob_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyBaseBlob_STATUS) DeepCopyInto(out *ManagementPolicyBaseBlob_STATUS) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterModification_STATUS) + (*in).DeepCopyInto(*out) + } + if in.EnableAutoTierToHotFromCool != nil { + in, out := &in.EnableAutoTierToHotFromCool, &out.EnableAutoTierToHotFromCool + *out = new(bool) + **out = **in + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterModification_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterModification_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterModification_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterModification_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyBaseBlob_STATUS. +func (in *ManagementPolicyBaseBlob_STATUS) DeepCopy() *ManagementPolicyBaseBlob_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicyBaseBlob_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyBaseBlob_STATUS_ARM) DeepCopyInto(out *ManagementPolicyBaseBlob_STATUS_ARM) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterModification_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.EnableAutoTierToHotFromCool != nil { + in, out := &in.EnableAutoTierToHotFromCool, &out.EnableAutoTierToHotFromCool + *out = new(bool) + **out = **in + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterModification_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterModification_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterModification_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterModification_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyBaseBlob_STATUS_ARM. +func (in *ManagementPolicyBaseBlob_STATUS_ARM) DeepCopy() *ManagementPolicyBaseBlob_STATUS_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyBaseBlob_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyDefinition) DeepCopyInto(out *ManagementPolicyDefinition) { + *out = *in + if in.Actions != nil { + in, out := &in.Actions, &out.Actions + *out = new(ManagementPolicyAction) + (*in).DeepCopyInto(*out) + } + if in.Filters != nil { + in, out := &in.Filters, &out.Filters + *out = new(ManagementPolicyFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyDefinition. +func (in *ManagementPolicyDefinition) DeepCopy() *ManagementPolicyDefinition { + if in == nil { + return nil + } + out := new(ManagementPolicyDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyDefinition_ARM) DeepCopyInto(out *ManagementPolicyDefinition_ARM) { + *out = *in + if in.Actions != nil { + in, out := &in.Actions, &out.Actions + *out = new(ManagementPolicyAction_ARM) + (*in).DeepCopyInto(*out) + } + if in.Filters != nil { + in, out := &in.Filters, &out.Filters + *out = new(ManagementPolicyFilter_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyDefinition_ARM. +func (in *ManagementPolicyDefinition_ARM) DeepCopy() *ManagementPolicyDefinition_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyDefinition_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyDefinition_STATUS) DeepCopyInto(out *ManagementPolicyDefinition_STATUS) { + *out = *in + if in.Actions != nil { + in, out := &in.Actions, &out.Actions + *out = new(ManagementPolicyAction_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Filters != nil { + in, out := &in.Filters, &out.Filters + *out = new(ManagementPolicyFilter_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyDefinition_STATUS. +func (in *ManagementPolicyDefinition_STATUS) DeepCopy() *ManagementPolicyDefinition_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicyDefinition_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyDefinition_STATUS_ARM) DeepCopyInto(out *ManagementPolicyDefinition_STATUS_ARM) { + *out = *in + if in.Actions != nil { + in, out := &in.Actions, &out.Actions + *out = new(ManagementPolicyAction_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Filters != nil { + in, out := &in.Filters, &out.Filters + *out = new(ManagementPolicyFilter_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyDefinition_STATUS_ARM. +func (in *ManagementPolicyDefinition_STATUS_ARM) DeepCopy() *ManagementPolicyDefinition_STATUS_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyDefinition_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyFilter) DeepCopyInto(out *ManagementPolicyFilter) { + *out = *in + if in.BlobIndexMatch != nil { + in, out := &in.BlobIndexMatch, &out.BlobIndexMatch + *out = make([]TagFilter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.BlobTypes != nil { + in, out := &in.BlobTypes, &out.BlobTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PrefixMatch != nil { + in, out := &in.PrefixMatch, &out.PrefixMatch + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyFilter. +func (in *ManagementPolicyFilter) DeepCopy() *ManagementPolicyFilter { + if in == nil { + return nil + } + out := new(ManagementPolicyFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyFilter_ARM) DeepCopyInto(out *ManagementPolicyFilter_ARM) { + *out = *in + if in.BlobIndexMatch != nil { + in, out := &in.BlobIndexMatch, &out.BlobIndexMatch + *out = make([]TagFilter_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.BlobTypes != nil { + in, out := &in.BlobTypes, &out.BlobTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PrefixMatch != nil { + in, out := &in.PrefixMatch, &out.PrefixMatch + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyFilter_ARM. +func (in *ManagementPolicyFilter_ARM) DeepCopy() *ManagementPolicyFilter_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyFilter_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyFilter_STATUS) DeepCopyInto(out *ManagementPolicyFilter_STATUS) { + *out = *in + if in.BlobIndexMatch != nil { + in, out := &in.BlobIndexMatch, &out.BlobIndexMatch + *out = make([]TagFilter_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.BlobTypes != nil { + in, out := &in.BlobTypes, &out.BlobTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PrefixMatch != nil { + in, out := &in.PrefixMatch, &out.PrefixMatch + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyFilter_STATUS. +func (in *ManagementPolicyFilter_STATUS) DeepCopy() *ManagementPolicyFilter_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicyFilter_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyFilter_STATUS_ARM) DeepCopyInto(out *ManagementPolicyFilter_STATUS_ARM) { + *out = *in + if in.BlobIndexMatch != nil { + in, out := &in.BlobIndexMatch, &out.BlobIndexMatch + *out = make([]TagFilter_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.BlobTypes != nil { + in, out := &in.BlobTypes, &out.BlobTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PrefixMatch != nil { + in, out := &in.PrefixMatch, &out.PrefixMatch + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyFilter_STATUS_ARM. +func (in *ManagementPolicyFilter_STATUS_ARM) DeepCopy() *ManagementPolicyFilter_STATUS_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyFilter_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyProperties_ARM) DeepCopyInto(out *ManagementPolicyProperties_ARM) { + *out = *in + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(ManagementPolicySchema_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyProperties_ARM. +func (in *ManagementPolicyProperties_ARM) DeepCopy() *ManagementPolicyProperties_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyProperties_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyProperties_STATUS_ARM) DeepCopyInto(out *ManagementPolicyProperties_STATUS_ARM) { + *out = *in + if in.LastModifiedTime != nil { + in, out := &in.LastModifiedTime, &out.LastModifiedTime + *out = new(string) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(ManagementPolicySchema_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyProperties_STATUS_ARM. +func (in *ManagementPolicyProperties_STATUS_ARM) DeepCopy() *ManagementPolicyProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyRule) DeepCopyInto(out *ManagementPolicyRule) { + *out = *in + if in.Definition != nil { + in, out := &in.Definition, &out.Definition + *out = new(ManagementPolicyDefinition) + (*in).DeepCopyInto(*out) + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(ManagementPolicyRule_Type) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyRule. +func (in *ManagementPolicyRule) DeepCopy() *ManagementPolicyRule { + if in == nil { + return nil + } + out := new(ManagementPolicyRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyRule_ARM) DeepCopyInto(out *ManagementPolicyRule_ARM) { + *out = *in + if in.Definition != nil { + in, out := &in.Definition, &out.Definition + *out = new(ManagementPolicyDefinition_ARM) + (*in).DeepCopyInto(*out) + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(ManagementPolicyRule_Type) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyRule_ARM. +func (in *ManagementPolicyRule_ARM) DeepCopy() *ManagementPolicyRule_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyRule_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyRule_STATUS) DeepCopyInto(out *ManagementPolicyRule_STATUS) { + *out = *in + if in.Definition != nil { + in, out := &in.Definition, &out.Definition + *out = new(ManagementPolicyDefinition_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(ManagementPolicyRule_Type_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyRule_STATUS. +func (in *ManagementPolicyRule_STATUS) DeepCopy() *ManagementPolicyRule_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicyRule_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyRule_STATUS_ARM) DeepCopyInto(out *ManagementPolicyRule_STATUS_ARM) { + *out = *in + if in.Definition != nil { + in, out := &in.Definition, &out.Definition + *out = new(ManagementPolicyDefinition_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(ManagementPolicyRule_Type_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyRule_STATUS_ARM. +func (in *ManagementPolicyRule_STATUS_ARM) DeepCopy() *ManagementPolicyRule_STATUS_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyRule_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicySchema) DeepCopyInto(out *ManagementPolicySchema) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]ManagementPolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicySchema. +func (in *ManagementPolicySchema) DeepCopy() *ManagementPolicySchema { + if in == nil { + return nil + } + out := new(ManagementPolicySchema) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicySchema_ARM) DeepCopyInto(out *ManagementPolicySchema_ARM) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]ManagementPolicyRule_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicySchema_ARM. +func (in *ManagementPolicySchema_ARM) DeepCopy() *ManagementPolicySchema_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicySchema_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicySchema_STATUS) DeepCopyInto(out *ManagementPolicySchema_STATUS) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]ManagementPolicyRule_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicySchema_STATUS. +func (in *ManagementPolicySchema_STATUS) DeepCopy() *ManagementPolicySchema_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicySchema_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicySchema_STATUS_ARM) DeepCopyInto(out *ManagementPolicySchema_STATUS_ARM) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]ManagementPolicyRule_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicySchema_STATUS_ARM. +func (in *ManagementPolicySchema_STATUS_ARM) DeepCopy() *ManagementPolicySchema_STATUS_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicySchema_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicySnapShot) DeepCopyInto(out *ManagementPolicySnapShot) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicySnapShot. +func (in *ManagementPolicySnapShot) DeepCopy() *ManagementPolicySnapShot { + if in == nil { + return nil + } + out := new(ManagementPolicySnapShot) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicySnapShot_ARM) DeepCopyInto(out *ManagementPolicySnapShot_ARM) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterCreation_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterCreation_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterCreation_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterCreation_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterCreation_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicySnapShot_ARM. +func (in *ManagementPolicySnapShot_ARM) DeepCopy() *ManagementPolicySnapShot_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicySnapShot_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicySnapShot_STATUS) DeepCopyInto(out *ManagementPolicySnapShot_STATUS) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicySnapShot_STATUS. +func (in *ManagementPolicySnapShot_STATUS) DeepCopy() *ManagementPolicySnapShot_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicySnapShot_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicySnapShot_STATUS_ARM) DeepCopyInto(out *ManagementPolicySnapShot_STATUS_ARM) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterCreation_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterCreation_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterCreation_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterCreation_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterCreation_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicySnapShot_STATUS_ARM. +func (in *ManagementPolicySnapShot_STATUS_ARM) DeepCopy() *ManagementPolicySnapShot_STATUS_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicySnapShot_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyVersion) DeepCopyInto(out *ManagementPolicyVersion) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterCreation) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyVersion. +func (in *ManagementPolicyVersion) DeepCopy() *ManagementPolicyVersion { + if in == nil { + return nil + } + out := new(ManagementPolicyVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyVersion_ARM) DeepCopyInto(out *ManagementPolicyVersion_ARM) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterCreation_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterCreation_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterCreation_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterCreation_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterCreation_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyVersion_ARM. +func (in *ManagementPolicyVersion_ARM) DeepCopy() *ManagementPolicyVersion_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyVersion_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyVersion_STATUS) DeepCopyInto(out *ManagementPolicyVersion_STATUS) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterCreation_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyVersion_STATUS. +func (in *ManagementPolicyVersion_STATUS) DeepCopy() *ManagementPolicyVersion_STATUS { + if in == nil { + return nil + } + out := new(ManagementPolicyVersion_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementPolicyVersion_STATUS_ARM) DeepCopyInto(out *ManagementPolicyVersion_STATUS_ARM) { + *out = *in + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = new(DateAfterCreation_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToArchive != nil { + in, out := &in.TierToArchive, &out.TierToArchive + *out = new(DateAfterCreation_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToCold != nil { + in, out := &in.TierToCold, &out.TierToCold + *out = new(DateAfterCreation_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToCool != nil { + in, out := &in.TierToCool, &out.TierToCool + *out = new(DateAfterCreation_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.TierToHot != nil { + in, out := &in.TierToHot, &out.TierToHot + *out = new(DateAfterCreation_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementPolicyVersion_STATUS_ARM. +func (in *ManagementPolicyVersion_STATUS_ARM) DeepCopy() *ManagementPolicyVersion_STATUS_ARM { + if in == nil { + return nil + } + out := new(ManagementPolicyVersion_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Multichannel) DeepCopyInto(out *Multichannel) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Multichannel. +func (in *Multichannel) DeepCopy() *Multichannel { + if in == nil { + return nil + } + out := new(Multichannel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Multichannel_ARM) DeepCopyInto(out *Multichannel_ARM) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Multichannel_ARM. +func (in *Multichannel_ARM) DeepCopy() *Multichannel_ARM { + if in == nil { + return nil + } + out := new(Multichannel_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Multichannel_STATUS) DeepCopyInto(out *Multichannel_STATUS) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Multichannel_STATUS. +func (in *Multichannel_STATUS) DeepCopy() *Multichannel_STATUS { + if in == nil { + return nil + } + out := new(Multichannel_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Multichannel_STATUS_ARM) DeepCopyInto(out *Multichannel_STATUS_ARM) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Multichannel_STATUS_ARM. +func (in *Multichannel_STATUS_ARM) DeepCopy() *Multichannel_STATUS_ARM { + if in == nil { + return nil + } + out := new(Multichannel_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkRuleSet) DeepCopyInto(out *NetworkRuleSet) { + *out = *in + if in.Bypass != nil { + in, out := &in.Bypass, &out.Bypass + *out = new(NetworkRuleSet_Bypass) + **out = **in + } + if in.DefaultAction != nil { + in, out := &in.DefaultAction, &out.DefaultAction + *out = new(NetworkRuleSet_DefaultAction) + **out = **in + } + if in.IpRules != nil { + in, out := &in.IpRules, &out.IpRules + *out = make([]IPRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ResourceAccessRules != nil { + in, out := &in.ResourceAccessRules, &out.ResourceAccessRules + *out = make([]ResourceAccessRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VirtualNetworkRules != nil { + in, out := &in.VirtualNetworkRules, &out.VirtualNetworkRules + *out = make([]VirtualNetworkRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRuleSet. +func (in *NetworkRuleSet) DeepCopy() *NetworkRuleSet { + if in == nil { + return nil + } + out := new(NetworkRuleSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkRuleSet_ARM) DeepCopyInto(out *NetworkRuleSet_ARM) { + *out = *in + if in.Bypass != nil { + in, out := &in.Bypass, &out.Bypass + *out = new(NetworkRuleSet_Bypass) + **out = **in + } + if in.DefaultAction != nil { + in, out := &in.DefaultAction, &out.DefaultAction + *out = new(NetworkRuleSet_DefaultAction) + **out = **in + } + if in.IpRules != nil { + in, out := &in.IpRules, &out.IpRules + *out = make([]IPRule_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ResourceAccessRules != nil { + in, out := &in.ResourceAccessRules, &out.ResourceAccessRules + *out = make([]ResourceAccessRule_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VirtualNetworkRules != nil { + in, out := &in.VirtualNetworkRules, &out.VirtualNetworkRules + *out = make([]VirtualNetworkRule_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRuleSet_ARM. +func (in *NetworkRuleSet_ARM) DeepCopy() *NetworkRuleSet_ARM { + if in == nil { + return nil + } + out := new(NetworkRuleSet_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkRuleSet_STATUS) DeepCopyInto(out *NetworkRuleSet_STATUS) { + *out = *in + if in.Bypass != nil { + in, out := &in.Bypass, &out.Bypass + *out = new(NetworkRuleSet_Bypass_STATUS) + **out = **in + } + if in.DefaultAction != nil { + in, out := &in.DefaultAction, &out.DefaultAction + *out = new(NetworkRuleSet_DefaultAction_STATUS) + **out = **in + } + if in.IpRules != nil { + in, out := &in.IpRules, &out.IpRules + *out = make([]IPRule_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ResourceAccessRules != nil { + in, out := &in.ResourceAccessRules, &out.ResourceAccessRules + *out = make([]ResourceAccessRule_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VirtualNetworkRules != nil { + in, out := &in.VirtualNetworkRules, &out.VirtualNetworkRules + *out = make([]VirtualNetworkRule_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRuleSet_STATUS. +func (in *NetworkRuleSet_STATUS) DeepCopy() *NetworkRuleSet_STATUS { + if in == nil { + return nil + } + out := new(NetworkRuleSet_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkRuleSet_STATUS_ARM) DeepCopyInto(out *NetworkRuleSet_STATUS_ARM) { + *out = *in + if in.Bypass != nil { + in, out := &in.Bypass, &out.Bypass + *out = new(NetworkRuleSet_Bypass_STATUS) + **out = **in + } + if in.DefaultAction != nil { + in, out := &in.DefaultAction, &out.DefaultAction + *out = new(NetworkRuleSet_DefaultAction_STATUS) + **out = **in + } + if in.IpRules != nil { + in, out := &in.IpRules, &out.IpRules + *out = make([]IPRule_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ResourceAccessRules != nil { + in, out := &in.ResourceAccessRules, &out.ResourceAccessRules + *out = make([]ResourceAccessRule_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VirtualNetworkRules != nil { + in, out := &in.VirtualNetworkRules, &out.VirtualNetworkRules + *out = make([]VirtualNetworkRule_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRuleSet_STATUS_ARM. +func (in *NetworkRuleSet_STATUS_ARM) DeepCopy() *NetworkRuleSet_STATUS_ARM { + if in == nil { + return nil + } + out := new(NetworkRuleSet_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PrivateEndpointConnection_STATUS) DeepCopyInto(out *PrivateEndpointConnection_STATUS) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateEndpointConnection_STATUS. +func (in *PrivateEndpointConnection_STATUS) DeepCopy() *PrivateEndpointConnection_STATUS { + if in == nil { + return nil + } + out := new(PrivateEndpointConnection_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PrivateEndpointConnection_STATUS_ARM) DeepCopyInto(out *PrivateEndpointConnection_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateEndpointConnection_STATUS_ARM. +func (in *PrivateEndpointConnection_STATUS_ARM) DeepCopy() *PrivateEndpointConnection_STATUS_ARM { + if in == nil { + return nil + } + out := new(PrivateEndpointConnection_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProtectedAppendWritesHistory_STATUS) DeepCopyInto(out *ProtectedAppendWritesHistory_STATUS) { + *out = *in + if in.AllowProtectedAppendWritesAll != nil { + in, out := &in.AllowProtectedAppendWritesAll, &out.AllowProtectedAppendWritesAll + *out = new(bool) + **out = **in + } + if in.Timestamp != nil { + in, out := &in.Timestamp, &out.Timestamp + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtectedAppendWritesHistory_STATUS. +func (in *ProtectedAppendWritesHistory_STATUS) DeepCopy() *ProtectedAppendWritesHistory_STATUS { + if in == nil { + return nil + } + out := new(ProtectedAppendWritesHistory_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProtectedAppendWritesHistory_STATUS_ARM) DeepCopyInto(out *ProtectedAppendWritesHistory_STATUS_ARM) { + *out = *in + if in.AllowProtectedAppendWritesAll != nil { + in, out := &in.AllowProtectedAppendWritesAll, &out.AllowProtectedAppendWritesAll + *out = new(bool) + **out = **in + } + if in.Timestamp != nil { + in, out := &in.Timestamp, &out.Timestamp + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtectedAppendWritesHistory_STATUS_ARM. +func (in *ProtectedAppendWritesHistory_STATUS_ARM) DeepCopy() *ProtectedAppendWritesHistory_STATUS_ARM { + if in == nil { + return nil + } + out := new(ProtectedAppendWritesHistory_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProtocolSettings) DeepCopyInto(out *ProtocolSettings) { + *out = *in + if in.Smb != nil { + in, out := &in.Smb, &out.Smb + *out = new(SmbSetting) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolSettings. +func (in *ProtocolSettings) DeepCopy() *ProtocolSettings { + if in == nil { + return nil + } + out := new(ProtocolSettings) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProtocolSettings_ARM) DeepCopyInto(out *ProtocolSettings_ARM) { + *out = *in + if in.Smb != nil { + in, out := &in.Smb, &out.Smb + *out = new(SmbSetting_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolSettings_ARM. +func (in *ProtocolSettings_ARM) DeepCopy() *ProtocolSettings_ARM { + if in == nil { + return nil + } + out := new(ProtocolSettings_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProtocolSettings_STATUS) DeepCopyInto(out *ProtocolSettings_STATUS) { + *out = *in + if in.Smb != nil { + in, out := &in.Smb, &out.Smb + *out = new(SmbSetting_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolSettings_STATUS. +func (in *ProtocolSettings_STATUS) DeepCopy() *ProtocolSettings_STATUS { + if in == nil { + return nil + } + out := new(ProtocolSettings_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProtocolSettings_STATUS_ARM) DeepCopyInto(out *ProtocolSettings_STATUS_ARM) { + *out = *in + if in.Smb != nil { + in, out := &in.Smb, &out.Smb + *out = new(SmbSetting_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolSettings_STATUS_ARM. +func (in *ProtocolSettings_STATUS_ARM) DeepCopy() *ProtocolSettings_STATUS_ARM { + if in == nil { + return nil + } + out := new(ProtocolSettings_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *QueueProperties_ARM) DeepCopyInto(out *QueueProperties_ARM) { + *out = *in + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueProperties_ARM. +func (in *QueueProperties_ARM) DeepCopy() *QueueProperties_ARM { + if in == nil { + return nil + } + out := new(QueueProperties_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *QueueProperties_STATUS_ARM) DeepCopyInto(out *QueueProperties_STATUS_ARM) { + *out = *in + if in.ApproximateMessageCount != nil { + in, out := &in.ApproximateMessageCount, &out.ApproximateMessageCount + *out = new(int) + **out = **in + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueProperties_STATUS_ARM. +func (in *QueueProperties_STATUS_ARM) DeepCopy() *QueueProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(QueueProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceAccessRule) DeepCopyInto(out *ResourceAccessRule) { + *out = *in + if in.ResourceReference != nil { + in, out := &in.ResourceReference, &out.ResourceReference + *out = new(genruntime.ResourceReference) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceAccessRule. +func (in *ResourceAccessRule) DeepCopy() *ResourceAccessRule { + if in == nil { + return nil + } + out := new(ResourceAccessRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceAccessRule_ARM) DeepCopyInto(out *ResourceAccessRule_ARM) { + *out = *in + if in.ResourceId != nil { + in, out := &in.ResourceId, &out.ResourceId + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceAccessRule_ARM. +func (in *ResourceAccessRule_ARM) DeepCopy() *ResourceAccessRule_ARM { + if in == nil { + return nil + } + out := new(ResourceAccessRule_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceAccessRule_STATUS) DeepCopyInto(out *ResourceAccessRule_STATUS) { + *out = *in + if in.ResourceId != nil { + in, out := &in.ResourceId, &out.ResourceId + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceAccessRule_STATUS. +func (in *ResourceAccessRule_STATUS) DeepCopy() *ResourceAccessRule_STATUS { + if in == nil { + return nil + } + out := new(ResourceAccessRule_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceAccessRule_STATUS_ARM) DeepCopyInto(out *ResourceAccessRule_STATUS_ARM) { + *out = *in + if in.ResourceId != nil { + in, out := &in.ResourceId, &out.ResourceId + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceAccessRule_STATUS_ARM. +func (in *ResourceAccessRule_STATUS_ARM) DeepCopy() *ResourceAccessRule_STATUS_ARM { + if in == nil { + return nil + } + out := new(ResourceAccessRule_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RestorePolicyProperties) DeepCopyInto(out *RestorePolicyProperties) { + *out = *in + if in.Days != nil { + in, out := &in.Days, &out.Days + *out = new(int) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestorePolicyProperties. +func (in *RestorePolicyProperties) DeepCopy() *RestorePolicyProperties { + if in == nil { + return nil + } + out := new(RestorePolicyProperties) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RestorePolicyProperties_ARM) DeepCopyInto(out *RestorePolicyProperties_ARM) { + *out = *in + if in.Days != nil { + in, out := &in.Days, &out.Days + *out = new(int) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestorePolicyProperties_ARM. +func (in *RestorePolicyProperties_ARM) DeepCopy() *RestorePolicyProperties_ARM { + if in == nil { + return nil + } + out := new(RestorePolicyProperties_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RestorePolicyProperties_STATUS) DeepCopyInto(out *RestorePolicyProperties_STATUS) { + *out = *in + if in.Days != nil { + in, out := &in.Days, &out.Days + *out = new(int) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.LastEnabledTime != nil { + in, out := &in.LastEnabledTime, &out.LastEnabledTime + *out = new(string) + **out = **in + } + if in.MinRestoreTime != nil { + in, out := &in.MinRestoreTime, &out.MinRestoreTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestorePolicyProperties_STATUS. +func (in *RestorePolicyProperties_STATUS) DeepCopy() *RestorePolicyProperties_STATUS { + if in == nil { + return nil + } + out := new(RestorePolicyProperties_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RestorePolicyProperties_STATUS_ARM) DeepCopyInto(out *RestorePolicyProperties_STATUS_ARM) { + *out = *in + if in.Days != nil { + in, out := &in.Days, &out.Days + *out = new(int) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.LastEnabledTime != nil { + in, out := &in.LastEnabledTime, &out.LastEnabledTime + *out = new(string) + **out = **in + } + if in.MinRestoreTime != nil { + in, out := &in.MinRestoreTime, &out.MinRestoreTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestorePolicyProperties_STATUS_ARM. +func (in *RestorePolicyProperties_STATUS_ARM) DeepCopy() *RestorePolicyProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(RestorePolicyProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoutingPreference) DeepCopyInto(out *RoutingPreference) { + *out = *in + if in.PublishInternetEndpoints != nil { + in, out := &in.PublishInternetEndpoints, &out.PublishInternetEndpoints + *out = new(bool) + **out = **in + } + if in.PublishMicrosoftEndpoints != nil { + in, out := &in.PublishMicrosoftEndpoints, &out.PublishMicrosoftEndpoints + *out = new(bool) + **out = **in + } + if in.RoutingChoice != nil { + in, out := &in.RoutingChoice, &out.RoutingChoice + *out = new(RoutingPreference_RoutingChoice) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoutingPreference. +func (in *RoutingPreference) DeepCopy() *RoutingPreference { + if in == nil { + return nil + } + out := new(RoutingPreference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoutingPreference_ARM) DeepCopyInto(out *RoutingPreference_ARM) { + *out = *in + if in.PublishInternetEndpoints != nil { + in, out := &in.PublishInternetEndpoints, &out.PublishInternetEndpoints + *out = new(bool) + **out = **in + } + if in.PublishMicrosoftEndpoints != nil { + in, out := &in.PublishMicrosoftEndpoints, &out.PublishMicrosoftEndpoints + *out = new(bool) + **out = **in + } + if in.RoutingChoice != nil { + in, out := &in.RoutingChoice, &out.RoutingChoice + *out = new(RoutingPreference_RoutingChoice) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoutingPreference_ARM. +func (in *RoutingPreference_ARM) DeepCopy() *RoutingPreference_ARM { + if in == nil { + return nil + } + out := new(RoutingPreference_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoutingPreference_STATUS) DeepCopyInto(out *RoutingPreference_STATUS) { + *out = *in + if in.PublishInternetEndpoints != nil { + in, out := &in.PublishInternetEndpoints, &out.PublishInternetEndpoints + *out = new(bool) + **out = **in + } + if in.PublishMicrosoftEndpoints != nil { + in, out := &in.PublishMicrosoftEndpoints, &out.PublishMicrosoftEndpoints + *out = new(bool) + **out = **in + } + if in.RoutingChoice != nil { + in, out := &in.RoutingChoice, &out.RoutingChoice + *out = new(RoutingPreference_RoutingChoice_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoutingPreference_STATUS. +func (in *RoutingPreference_STATUS) DeepCopy() *RoutingPreference_STATUS { + if in == nil { + return nil + } + out := new(RoutingPreference_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoutingPreference_STATUS_ARM) DeepCopyInto(out *RoutingPreference_STATUS_ARM) { + *out = *in + if in.PublishInternetEndpoints != nil { + in, out := &in.PublishInternetEndpoints, &out.PublishInternetEndpoints + *out = new(bool) + **out = **in + } + if in.PublishMicrosoftEndpoints != nil { + in, out := &in.PublishMicrosoftEndpoints, &out.PublishMicrosoftEndpoints + *out = new(bool) + **out = **in + } + if in.RoutingChoice != nil { + in, out := &in.RoutingChoice, &out.RoutingChoice + *out = new(RoutingPreference_RoutingChoice_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoutingPreference_STATUS_ARM. +func (in *RoutingPreference_STATUS_ARM) DeepCopy() *RoutingPreference_STATUS_ARM { + if in == nil { + return nil + } + out := new(RoutingPreference_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SasPolicy) DeepCopyInto(out *SasPolicy) { + *out = *in + if in.ExpirationAction != nil { + in, out := &in.ExpirationAction, &out.ExpirationAction + *out = new(SasPolicy_ExpirationAction) + **out = **in + } + if in.SasExpirationPeriod != nil { + in, out := &in.SasExpirationPeriod, &out.SasExpirationPeriod + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SasPolicy. +func (in *SasPolicy) DeepCopy() *SasPolicy { + if in == nil { + return nil + } + out := new(SasPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SasPolicy_ARM) DeepCopyInto(out *SasPolicy_ARM) { + *out = *in + if in.ExpirationAction != nil { + in, out := &in.ExpirationAction, &out.ExpirationAction + *out = new(SasPolicy_ExpirationAction) + **out = **in + } + if in.SasExpirationPeriod != nil { + in, out := &in.SasExpirationPeriod, &out.SasExpirationPeriod + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SasPolicy_ARM. +func (in *SasPolicy_ARM) DeepCopy() *SasPolicy_ARM { + if in == nil { + return nil + } + out := new(SasPolicy_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SasPolicy_STATUS) DeepCopyInto(out *SasPolicy_STATUS) { + *out = *in + if in.ExpirationAction != nil { + in, out := &in.ExpirationAction, &out.ExpirationAction + *out = new(SasPolicy_ExpirationAction_STATUS) + **out = **in + } + if in.SasExpirationPeriod != nil { + in, out := &in.SasExpirationPeriod, &out.SasExpirationPeriod + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SasPolicy_STATUS. +func (in *SasPolicy_STATUS) DeepCopy() *SasPolicy_STATUS { + if in == nil { + return nil + } + out := new(SasPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SasPolicy_STATUS_ARM) DeepCopyInto(out *SasPolicy_STATUS_ARM) { + *out = *in + if in.ExpirationAction != nil { + in, out := &in.ExpirationAction, &out.ExpirationAction + *out = new(SasPolicy_ExpirationAction_STATUS) + **out = **in + } + if in.SasExpirationPeriod != nil { + in, out := &in.SasExpirationPeriod, &out.SasExpirationPeriod + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SasPolicy_STATUS_ARM. +func (in *SasPolicy_STATUS_ARM) DeepCopy() *SasPolicy_STATUS_ARM { + if in == nil { + return nil + } + out := new(SasPolicy_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SignedIdentifier) DeepCopyInto(out *SignedIdentifier) { + *out = *in + if in.AccessPolicy != nil { + in, out := &in.AccessPolicy, &out.AccessPolicy + *out = new(AccessPolicy) + (*in).DeepCopyInto(*out) + } + if in.Reference != nil { + in, out := &in.Reference, &out.Reference + *out = new(genruntime.ResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignedIdentifier. +func (in *SignedIdentifier) DeepCopy() *SignedIdentifier { + if in == nil { + return nil + } + out := new(SignedIdentifier) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SignedIdentifier_ARM) DeepCopyInto(out *SignedIdentifier_ARM) { + *out = *in + if in.AccessPolicy != nil { + in, out := &in.AccessPolicy, &out.AccessPolicy + *out = new(AccessPolicy_ARM) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignedIdentifier_ARM. +func (in *SignedIdentifier_ARM) DeepCopy() *SignedIdentifier_ARM { + if in == nil { + return nil + } + out := new(SignedIdentifier_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SignedIdentifier_STATUS) DeepCopyInto(out *SignedIdentifier_STATUS) { + *out = *in + if in.AccessPolicy != nil { + in, out := &in.AccessPolicy, &out.AccessPolicy + *out = new(AccessPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignedIdentifier_STATUS. +func (in *SignedIdentifier_STATUS) DeepCopy() *SignedIdentifier_STATUS { + if in == nil { + return nil + } + out := new(SignedIdentifier_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SignedIdentifier_STATUS_ARM) DeepCopyInto(out *SignedIdentifier_STATUS_ARM) { + *out = *in + if in.AccessPolicy != nil { + in, out := &in.AccessPolicy, &out.AccessPolicy + *out = new(AccessPolicy_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignedIdentifier_STATUS_ARM. +func (in *SignedIdentifier_STATUS_ARM) DeepCopy() *SignedIdentifier_STATUS_ARM { + if in == nil { + return nil + } + out := new(SignedIdentifier_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Sku) DeepCopyInto(out *Sku) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(SkuName) + **out = **in + } + if in.Tier != nil { + in, out := &in.Tier, &out.Tier + *out = new(Tier) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sku. +func (in *Sku) DeepCopy() *Sku { + if in == nil { + return nil + } + out := new(Sku) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Sku_ARM) DeepCopyInto(out *Sku_ARM) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(SkuName) + **out = **in + } + if in.Tier != nil { + in, out := &in.Tier, &out.Tier + *out = new(Tier) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sku_ARM. +func (in *Sku_ARM) DeepCopy() *Sku_ARM { + if in == nil { + return nil + } + out := new(Sku_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Sku_STATUS) DeepCopyInto(out *Sku_STATUS) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(SkuName_STATUS) + **out = **in + } + if in.Tier != nil { + in, out := &in.Tier, &out.Tier + *out = new(Tier_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sku_STATUS. +func (in *Sku_STATUS) DeepCopy() *Sku_STATUS { + if in == nil { + return nil + } + out := new(Sku_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Sku_STATUS_ARM) DeepCopyInto(out *Sku_STATUS_ARM) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(SkuName_STATUS) + **out = **in + } + if in.Tier != nil { + in, out := &in.Tier, &out.Tier + *out = new(Tier_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sku_STATUS_ARM. +func (in *Sku_STATUS_ARM) DeepCopy() *Sku_STATUS_ARM { + if in == nil { + return nil + } + out := new(Sku_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SmbSetting) DeepCopyInto(out *SmbSetting) { + *out = *in + if in.AuthenticationMethods != nil { + in, out := &in.AuthenticationMethods, &out.AuthenticationMethods + *out = new(string) + **out = **in + } + if in.ChannelEncryption != nil { + in, out := &in.ChannelEncryption, &out.ChannelEncryption + *out = new(string) + **out = **in + } + if in.KerberosTicketEncryption != nil { + in, out := &in.KerberosTicketEncryption, &out.KerberosTicketEncryption + *out = new(string) + **out = **in + } + if in.Multichannel != nil { + in, out := &in.Multichannel, &out.Multichannel + *out = new(Multichannel) + (*in).DeepCopyInto(*out) + } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmbSetting. +func (in *SmbSetting) DeepCopy() *SmbSetting { + if in == nil { + return nil + } + out := new(SmbSetting) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SmbSetting_ARM) DeepCopyInto(out *SmbSetting_ARM) { + *out = *in + if in.AuthenticationMethods != nil { + in, out := &in.AuthenticationMethods, &out.AuthenticationMethods + *out = new(string) + **out = **in + } + if in.ChannelEncryption != nil { + in, out := &in.ChannelEncryption, &out.ChannelEncryption + *out = new(string) + **out = **in + } + if in.KerberosTicketEncryption != nil { + in, out := &in.KerberosTicketEncryption, &out.KerberosTicketEncryption + *out = new(string) + **out = **in + } + if in.Multichannel != nil { + in, out := &in.Multichannel, &out.Multichannel + *out = new(Multichannel_ARM) + (*in).DeepCopyInto(*out) + } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmbSetting_ARM. +func (in *SmbSetting_ARM) DeepCopy() *SmbSetting_ARM { + if in == nil { + return nil + } + out := new(SmbSetting_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SmbSetting_STATUS) DeepCopyInto(out *SmbSetting_STATUS) { + *out = *in + if in.AuthenticationMethods != nil { + in, out := &in.AuthenticationMethods, &out.AuthenticationMethods + *out = new(string) + **out = **in + } + if in.ChannelEncryption != nil { + in, out := &in.ChannelEncryption, &out.ChannelEncryption + *out = new(string) + **out = **in + } + if in.KerberosTicketEncryption != nil { + in, out := &in.KerberosTicketEncryption, &out.KerberosTicketEncryption + *out = new(string) + **out = **in + } + if in.Multichannel != nil { + in, out := &in.Multichannel, &out.Multichannel + *out = new(Multichannel_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmbSetting_STATUS. +func (in *SmbSetting_STATUS) DeepCopy() *SmbSetting_STATUS { + if in == nil { + return nil + } + out := new(SmbSetting_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SmbSetting_STATUS_ARM) DeepCopyInto(out *SmbSetting_STATUS_ARM) { + *out = *in + if in.AuthenticationMethods != nil { + in, out := &in.AuthenticationMethods, &out.AuthenticationMethods + *out = new(string) + **out = **in + } + if in.ChannelEncryption != nil { + in, out := &in.ChannelEncryption, &out.ChannelEncryption + *out = new(string) + **out = **in + } + if in.KerberosTicketEncryption != nil { + in, out := &in.KerberosTicketEncryption, &out.KerberosTicketEncryption + *out = new(string) + **out = **in + } + if in.Multichannel != nil { + in, out := &in.Multichannel, &out.Multichannel + *out = new(Multichannel_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmbSetting_STATUS_ARM. +func (in *SmbSetting_STATUS_ARM) DeepCopy() *SmbSetting_STATUS_ARM { + if in == nil { + return nil + } + out := new(SmbSetting_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccount) DeepCopyInto(out *StorageAccount) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccount. +func (in *StorageAccount) DeepCopy() *StorageAccount { + if in == nil { + return nil + } + out := new(StorageAccount) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccount) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountInternetEndpoints_STATUS) DeepCopyInto(out *StorageAccountInternetEndpoints_STATUS) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(string) + **out = **in + } + if in.Dfs != nil { + in, out := &in.Dfs, &out.Dfs + *out = new(string) + **out = **in + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(string) + **out = **in + } + if in.Web != nil { + in, out := &in.Web, &out.Web + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountInternetEndpoints_STATUS. +func (in *StorageAccountInternetEndpoints_STATUS) DeepCopy() *StorageAccountInternetEndpoints_STATUS { + if in == nil { + return nil + } + out := new(StorageAccountInternetEndpoints_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountInternetEndpoints_STATUS_ARM) DeepCopyInto(out *StorageAccountInternetEndpoints_STATUS_ARM) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(string) + **out = **in + } + if in.Dfs != nil { + in, out := &in.Dfs, &out.Dfs + *out = new(string) + **out = **in + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(string) + **out = **in + } + if in.Web != nil { + in, out := &in.Web, &out.Web + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountInternetEndpoints_STATUS_ARM. +func (in *StorageAccountInternetEndpoints_STATUS_ARM) DeepCopy() *StorageAccountInternetEndpoints_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccountInternetEndpoints_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountList) DeepCopyInto(out *StorageAccountList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccount, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountList. +func (in *StorageAccountList) DeepCopy() *StorageAccountList { + if in == nil { + return nil + } + out := new(StorageAccountList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountMicrosoftEndpoints_STATUS) DeepCopyInto(out *StorageAccountMicrosoftEndpoints_STATUS) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(string) + **out = **in + } + if in.Dfs != nil { + in, out := &in.Dfs, &out.Dfs + *out = new(string) + **out = **in + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(string) + **out = **in + } + if in.Queue != nil { + in, out := &in.Queue, &out.Queue + *out = new(string) + **out = **in + } + if in.Table != nil { + in, out := &in.Table, &out.Table + *out = new(string) + **out = **in + } + if in.Web != nil { + in, out := &in.Web, &out.Web + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountMicrosoftEndpoints_STATUS. +func (in *StorageAccountMicrosoftEndpoints_STATUS) DeepCopy() *StorageAccountMicrosoftEndpoints_STATUS { + if in == nil { + return nil + } + out := new(StorageAccountMicrosoftEndpoints_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountMicrosoftEndpoints_STATUS_ARM) DeepCopyInto(out *StorageAccountMicrosoftEndpoints_STATUS_ARM) { + *out = *in + if in.Blob != nil { + in, out := &in.Blob, &out.Blob + *out = new(string) + **out = **in + } + if in.Dfs != nil { + in, out := &in.Dfs, &out.Dfs + *out = new(string) + **out = **in + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(string) + **out = **in + } + if in.Queue != nil { + in, out := &in.Queue, &out.Queue + *out = new(string) + **out = **in + } + if in.Table != nil { + in, out := &in.Table, &out.Table + *out = new(string) + **out = **in + } + if in.Web != nil { + in, out := &in.Web, &out.Web + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountMicrosoftEndpoints_STATUS_ARM. +func (in *StorageAccountMicrosoftEndpoints_STATUS_ARM) DeepCopy() *StorageAccountMicrosoftEndpoints_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccountMicrosoftEndpoints_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountOperatorConfigMaps) DeepCopyInto(out *StorageAccountOperatorConfigMaps) { + *out = *in + if in.BlobEndpoint != nil { + in, out := &in.BlobEndpoint, &out.BlobEndpoint + *out = new(genruntime.ConfigMapDestination) + **out = **in + } + if in.DfsEndpoint != nil { + in, out := &in.DfsEndpoint, &out.DfsEndpoint + *out = new(genruntime.ConfigMapDestination) + **out = **in + } + if in.FileEndpoint != nil { + in, out := &in.FileEndpoint, &out.FileEndpoint + *out = new(genruntime.ConfigMapDestination) + **out = **in + } + if in.QueueEndpoint != nil { + in, out := &in.QueueEndpoint, &out.QueueEndpoint + *out = new(genruntime.ConfigMapDestination) + **out = **in + } + if in.TableEndpoint != nil { + in, out := &in.TableEndpoint, &out.TableEndpoint + *out = new(genruntime.ConfigMapDestination) + **out = **in + } + if in.WebEndpoint != nil { + in, out := &in.WebEndpoint, &out.WebEndpoint + *out = new(genruntime.ConfigMapDestination) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountOperatorConfigMaps. +func (in *StorageAccountOperatorConfigMaps) DeepCopy() *StorageAccountOperatorConfigMaps { + if in == nil { + return nil + } + out := new(StorageAccountOperatorConfigMaps) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountOperatorSecrets) DeepCopyInto(out *StorageAccountOperatorSecrets) { + *out = *in + if in.BlobEndpoint != nil { + in, out := &in.BlobEndpoint, &out.BlobEndpoint + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.DfsEndpoint != nil { + in, out := &in.DfsEndpoint, &out.DfsEndpoint + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.FileEndpoint != nil { + in, out := &in.FileEndpoint, &out.FileEndpoint + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.Key1 != nil { + in, out := &in.Key1, &out.Key1 + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.Key2 != nil { + in, out := &in.Key2, &out.Key2 + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.QueueEndpoint != nil { + in, out := &in.QueueEndpoint, &out.QueueEndpoint + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.TableEndpoint != nil { + in, out := &in.TableEndpoint, &out.TableEndpoint + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.WebEndpoint != nil { + in, out := &in.WebEndpoint, &out.WebEndpoint + *out = new(genruntime.SecretDestination) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountOperatorSecrets. +func (in *StorageAccountOperatorSecrets) DeepCopy() *StorageAccountOperatorSecrets { + if in == nil { + return nil + } + out := new(StorageAccountOperatorSecrets) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountOperatorSpec) DeepCopyInto(out *StorageAccountOperatorSpec) { + *out = *in + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = new(StorageAccountOperatorConfigMaps) + (*in).DeepCopyInto(*out) + } + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = new(StorageAccountOperatorSecrets) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountOperatorSpec. +func (in *StorageAccountOperatorSpec) DeepCopy() *StorageAccountOperatorSpec { + if in == nil { + return nil + } + out := new(StorageAccountOperatorSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountPropertiesCreateParameters_ARM) DeepCopyInto(out *StorageAccountPropertiesCreateParameters_ARM) { + *out = *in + if in.AccessTier != nil { + in, out := &in.AccessTier, &out.AccessTier + *out = new(StorageAccountPropertiesCreateParameters_AccessTier) + **out = **in + } + if in.AllowBlobPublicAccess != nil { + in, out := &in.AllowBlobPublicAccess, &out.AllowBlobPublicAccess + *out = new(bool) + **out = **in + } + if in.AllowCrossTenantReplication != nil { + in, out := &in.AllowCrossTenantReplication, &out.AllowCrossTenantReplication + *out = new(bool) + **out = **in + } + if in.AllowSharedKeyAccess != nil { + in, out := &in.AllowSharedKeyAccess, &out.AllowSharedKeyAccess + *out = new(bool) + **out = **in + } + if in.AllowedCopyScope != nil { + in, out := &in.AllowedCopyScope, &out.AllowedCopyScope + *out = new(StorageAccountPropertiesCreateParameters_AllowedCopyScope) + **out = **in + } + if in.AzureFilesIdentityBasedAuthentication != nil { + in, out := &in.AzureFilesIdentityBasedAuthentication, &out.AzureFilesIdentityBasedAuthentication + *out = new(AzureFilesIdentityBasedAuthentication_ARM) + (*in).DeepCopyInto(*out) + } + if in.CustomDomain != nil { + in, out := &in.CustomDomain, &out.CustomDomain + *out = new(CustomDomain_ARM) + (*in).DeepCopyInto(*out) + } + if in.DefaultToOAuthAuthentication != nil { + in, out := &in.DefaultToOAuthAuthentication, &out.DefaultToOAuthAuthentication + *out = new(bool) + **out = **in + } + if in.DnsEndpointType != nil { + in, out := &in.DnsEndpointType, &out.DnsEndpointType + *out = new(StorageAccountPropertiesCreateParameters_DnsEndpointType) + **out = **in + } + if in.Encryption != nil { + in, out := &in.Encryption, &out.Encryption + *out = new(Encryption_ARM) + (*in).DeepCopyInto(*out) + } + if in.ImmutableStorageWithVersioning != nil { + in, out := &in.ImmutableStorageWithVersioning, &out.ImmutableStorageWithVersioning + *out = new(ImmutableStorageAccount_ARM) + (*in).DeepCopyInto(*out) + } + if in.IsHnsEnabled != nil { + in, out := &in.IsHnsEnabled, &out.IsHnsEnabled + *out = new(bool) + **out = **in + } + if in.IsLocalUserEnabled != nil { + in, out := &in.IsLocalUserEnabled, &out.IsLocalUserEnabled + *out = new(bool) + **out = **in + } + if in.IsNfsV3Enabled != nil { + in, out := &in.IsNfsV3Enabled, &out.IsNfsV3Enabled + *out = new(bool) + **out = **in + } + if in.IsSftpEnabled != nil { + in, out := &in.IsSftpEnabled, &out.IsSftpEnabled + *out = new(bool) + **out = **in + } + if in.KeyPolicy != nil { + in, out := &in.KeyPolicy, &out.KeyPolicy + *out = new(KeyPolicy_ARM) + (*in).DeepCopyInto(*out) + } + if in.LargeFileSharesState != nil { + in, out := &in.LargeFileSharesState, &out.LargeFileSharesState + *out = new(StorageAccountPropertiesCreateParameters_LargeFileSharesState) + **out = **in + } + if in.MinimumTlsVersion != nil { + in, out := &in.MinimumTlsVersion, &out.MinimumTlsVersion + *out = new(StorageAccountPropertiesCreateParameters_MinimumTlsVersion) + **out = **in + } + if in.NetworkAcls != nil { + in, out := &in.NetworkAcls, &out.NetworkAcls + *out = new(NetworkRuleSet_ARM) + (*in).DeepCopyInto(*out) + } + if in.PublicNetworkAccess != nil { + in, out := &in.PublicNetworkAccess, &out.PublicNetworkAccess + *out = new(StorageAccountPropertiesCreateParameters_PublicNetworkAccess) + **out = **in + } + if in.RoutingPreference != nil { + in, out := &in.RoutingPreference, &out.RoutingPreference + *out = new(RoutingPreference_ARM) + (*in).DeepCopyInto(*out) + } + if in.SasPolicy != nil { + in, out := &in.SasPolicy, &out.SasPolicy + *out = new(SasPolicy_ARM) + (*in).DeepCopyInto(*out) + } + if in.SupportsHttpsTrafficOnly != nil { + in, out := &in.SupportsHttpsTrafficOnly, &out.SupportsHttpsTrafficOnly + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountPropertiesCreateParameters_ARM. +func (in *StorageAccountPropertiesCreateParameters_ARM) DeepCopy() *StorageAccountPropertiesCreateParameters_ARM { + if in == nil { + return nil + } + out := new(StorageAccountPropertiesCreateParameters_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountProperties_STATUS_ARM) DeepCopyInto(out *StorageAccountProperties_STATUS_ARM) { + *out = *in + if in.AccessTier != nil { + in, out := &in.AccessTier, &out.AccessTier + *out = new(StorageAccountProperties_AccessTier_STATUS) + **out = **in + } + if in.AccountMigrationInProgress != nil { + in, out := &in.AccountMigrationInProgress, &out.AccountMigrationInProgress + *out = new(bool) + **out = **in + } + if in.AllowBlobPublicAccess != nil { + in, out := &in.AllowBlobPublicAccess, &out.AllowBlobPublicAccess + *out = new(bool) + **out = **in + } + if in.AllowCrossTenantReplication != nil { + in, out := &in.AllowCrossTenantReplication, &out.AllowCrossTenantReplication + *out = new(bool) + **out = **in + } + if in.AllowSharedKeyAccess != nil { + in, out := &in.AllowSharedKeyAccess, &out.AllowSharedKeyAccess + *out = new(bool) + **out = **in + } + if in.AllowedCopyScope != nil { + in, out := &in.AllowedCopyScope, &out.AllowedCopyScope + *out = new(StorageAccountProperties_AllowedCopyScope_STATUS) + **out = **in + } + if in.AzureFilesIdentityBasedAuthentication != nil { + in, out := &in.AzureFilesIdentityBasedAuthentication, &out.AzureFilesIdentityBasedAuthentication + *out = new(AzureFilesIdentityBasedAuthentication_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.BlobRestoreStatus != nil { + in, out := &in.BlobRestoreStatus, &out.BlobRestoreStatus + *out = new(BlobRestoreStatus_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.CreationTime != nil { + in, out := &in.CreationTime, &out.CreationTime + *out = new(string) + **out = **in + } + if in.CustomDomain != nil { + in, out := &in.CustomDomain, &out.CustomDomain + *out = new(CustomDomain_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.DefaultToOAuthAuthentication != nil { + in, out := &in.DefaultToOAuthAuthentication, &out.DefaultToOAuthAuthentication + *out = new(bool) + **out = **in + } + if in.DnsEndpointType != nil { + in, out := &in.DnsEndpointType, &out.DnsEndpointType + *out = new(StorageAccountProperties_DnsEndpointType_STATUS) + **out = **in + } + if in.Encryption != nil { + in, out := &in.Encryption, &out.Encryption + *out = new(Encryption_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.FailoverInProgress != nil { + in, out := &in.FailoverInProgress, &out.FailoverInProgress + *out = new(bool) + **out = **in + } + if in.GeoReplicationStats != nil { + in, out := &in.GeoReplicationStats, &out.GeoReplicationStats + *out = new(GeoReplicationStats_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.ImmutableStorageWithVersioning != nil { + in, out := &in.ImmutableStorageWithVersioning, &out.ImmutableStorageWithVersioning + *out = new(ImmutableStorageAccount_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.IsHnsEnabled != nil { + in, out := &in.IsHnsEnabled, &out.IsHnsEnabled + *out = new(bool) + **out = **in + } + if in.IsLocalUserEnabled != nil { + in, out := &in.IsLocalUserEnabled, &out.IsLocalUserEnabled + *out = new(bool) + **out = **in + } + if in.IsNfsV3Enabled != nil { + in, out := &in.IsNfsV3Enabled, &out.IsNfsV3Enabled + *out = new(bool) + **out = **in + } + if in.IsSftpEnabled != nil { + in, out := &in.IsSftpEnabled, &out.IsSftpEnabled + *out = new(bool) + **out = **in + } + if in.IsSkuConversionBlocked != nil { + in, out := &in.IsSkuConversionBlocked, &out.IsSkuConversionBlocked + *out = new(bool) + **out = **in + } + if in.KeyCreationTime != nil { + in, out := &in.KeyCreationTime, &out.KeyCreationTime + *out = new(KeyCreationTime_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.KeyPolicy != nil { + in, out := &in.KeyPolicy, &out.KeyPolicy + *out = new(KeyPolicy_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.LargeFileSharesState != nil { + in, out := &in.LargeFileSharesState, &out.LargeFileSharesState + *out = new(StorageAccountProperties_LargeFileSharesState_STATUS) + **out = **in + } + if in.LastGeoFailoverTime != nil { + in, out := &in.LastGeoFailoverTime, &out.LastGeoFailoverTime + *out = new(string) + **out = **in + } + if in.MinimumTlsVersion != nil { + in, out := &in.MinimumTlsVersion, &out.MinimumTlsVersion + *out = new(StorageAccountProperties_MinimumTlsVersion_STATUS) + **out = **in + } + if in.NetworkAcls != nil { + in, out := &in.NetworkAcls, &out.NetworkAcls + *out = new(NetworkRuleSet_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.PrimaryEndpoints != nil { + in, out := &in.PrimaryEndpoints, &out.PrimaryEndpoints + *out = new(Endpoints_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.PrimaryLocation != nil { + in, out := &in.PrimaryLocation, &out.PrimaryLocation + *out = new(string) + **out = **in + } + if in.PrivateEndpointConnections != nil { + in, out := &in.PrivateEndpointConnections, &out.PrivateEndpointConnections + *out = make([]PrivateEndpointConnection_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ProvisioningState != nil { + in, out := &in.ProvisioningState, &out.ProvisioningState + *out = new(StorageAccountProperties_ProvisioningState_STATUS) + **out = **in + } + if in.PublicNetworkAccess != nil { + in, out := &in.PublicNetworkAccess, &out.PublicNetworkAccess + *out = new(StorageAccountProperties_PublicNetworkAccess_STATUS) + **out = **in + } + if in.RoutingPreference != nil { + in, out := &in.RoutingPreference, &out.RoutingPreference + *out = new(RoutingPreference_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.SasPolicy != nil { + in, out := &in.SasPolicy, &out.SasPolicy + *out = new(SasPolicy_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.SecondaryEndpoints != nil { + in, out := &in.SecondaryEndpoints, &out.SecondaryEndpoints + *out = new(Endpoints_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.SecondaryLocation != nil { + in, out := &in.SecondaryLocation, &out.SecondaryLocation + *out = new(string) + **out = **in + } + if in.StatusOfPrimary != nil { + in, out := &in.StatusOfPrimary, &out.StatusOfPrimary + *out = new(StorageAccountProperties_StatusOfPrimary_STATUS) + **out = **in + } + if in.StatusOfSecondary != nil { + in, out := &in.StatusOfSecondary, &out.StatusOfSecondary + *out = new(StorageAccountProperties_StatusOfSecondary_STATUS) + **out = **in + } + if in.StorageAccountSkuConversionStatus != nil { + in, out := &in.StorageAccountSkuConversionStatus, &out.StorageAccountSkuConversionStatus + *out = new(StorageAccountSkuConversionStatus_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.SupportsHttpsTrafficOnly != nil { + in, out := &in.SupportsHttpsTrafficOnly, &out.SupportsHttpsTrafficOnly + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountProperties_STATUS_ARM. +func (in *StorageAccountProperties_STATUS_ARM) DeepCopy() *StorageAccountProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccountProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountSkuConversionStatus_STATUS) DeepCopyInto(out *StorageAccountSkuConversionStatus_STATUS) { + *out = *in + if in.EndTime != nil { + in, out := &in.EndTime, &out.EndTime + *out = new(string) + **out = **in + } + if in.SkuConversionStatus != nil { + in, out := &in.SkuConversionStatus, &out.SkuConversionStatus + *out = new(StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } + if in.TargetSkuName != nil { + in, out := &in.TargetSkuName, &out.TargetSkuName + *out = new(SkuName_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountSkuConversionStatus_STATUS. +func (in *StorageAccountSkuConversionStatus_STATUS) DeepCopy() *StorageAccountSkuConversionStatus_STATUS { + if in == nil { + return nil + } + out := new(StorageAccountSkuConversionStatus_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountSkuConversionStatus_STATUS_ARM) DeepCopyInto(out *StorageAccountSkuConversionStatus_STATUS_ARM) { + *out = *in + if in.EndTime != nil { + in, out := &in.EndTime, &out.EndTime + *out = new(string) + **out = **in + } + if in.SkuConversionStatus != nil { + in, out := &in.SkuConversionStatus, &out.SkuConversionStatus + *out = new(StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } + if in.TargetSkuName != nil { + in, out := &in.TargetSkuName, &out.TargetSkuName + *out = new(SkuName_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountSkuConversionStatus_STATUS_ARM. +func (in *StorageAccountSkuConversionStatus_STATUS_ARM) DeepCopy() *StorageAccountSkuConversionStatus_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccountSkuConversionStatus_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccount_STATUS) DeepCopyInto(out *StorageAccount_STATUS) { + *out = *in + if in.AccessTier != nil { + in, out := &in.AccessTier, &out.AccessTier + *out = new(StorageAccountProperties_AccessTier_STATUS) + **out = **in + } + if in.AccountMigrationInProgress != nil { + in, out := &in.AccountMigrationInProgress, &out.AccountMigrationInProgress + *out = new(bool) + **out = **in + } + if in.AllowBlobPublicAccess != nil { + in, out := &in.AllowBlobPublicAccess, &out.AllowBlobPublicAccess + *out = new(bool) + **out = **in + } + if in.AllowCrossTenantReplication != nil { + in, out := &in.AllowCrossTenantReplication, &out.AllowCrossTenantReplication + *out = new(bool) + **out = **in + } + if in.AllowSharedKeyAccess != nil { + in, out := &in.AllowSharedKeyAccess, &out.AllowSharedKeyAccess + *out = new(bool) + **out = **in + } + if in.AllowedCopyScope != nil { + in, out := &in.AllowedCopyScope, &out.AllowedCopyScope + *out = new(StorageAccountProperties_AllowedCopyScope_STATUS) + **out = **in + } + if in.AzureFilesIdentityBasedAuthentication != nil { + in, out := &in.AzureFilesIdentityBasedAuthentication, &out.AzureFilesIdentityBasedAuthentication + *out = new(AzureFilesIdentityBasedAuthentication_STATUS) + (*in).DeepCopyInto(*out) + } + if in.BlobRestoreStatus != nil { + in, out := &in.BlobRestoreStatus, &out.BlobRestoreStatus + *out = new(BlobRestoreStatus_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.CreationTime != nil { + in, out := &in.CreationTime, &out.CreationTime + *out = new(string) + **out = **in + } + if in.CustomDomain != nil { + in, out := &in.CustomDomain, &out.CustomDomain + *out = new(CustomDomain_STATUS) + (*in).DeepCopyInto(*out) + } + if in.DefaultToOAuthAuthentication != nil { + in, out := &in.DefaultToOAuthAuthentication, &out.DefaultToOAuthAuthentication + *out = new(bool) + **out = **in + } + if in.DnsEndpointType != nil { + in, out := &in.DnsEndpointType, &out.DnsEndpointType + *out = new(StorageAccountProperties_DnsEndpointType_STATUS) + **out = **in + } + if in.Encryption != nil { + in, out := &in.Encryption, &out.Encryption + *out = new(Encryption_STATUS) + (*in).DeepCopyInto(*out) + } + if in.ExtendedLocation != nil { + in, out := &in.ExtendedLocation, &out.ExtendedLocation + *out = new(ExtendedLocation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.FailoverInProgress != nil { + in, out := &in.FailoverInProgress, &out.FailoverInProgress + *out = new(bool) + **out = **in + } + if in.GeoReplicationStats != nil { + in, out := &in.GeoReplicationStats, &out.GeoReplicationStats + *out = new(GeoReplicationStats_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(Identity_STATUS) + (*in).DeepCopyInto(*out) + } + if in.ImmutableStorageWithVersioning != nil { + in, out := &in.ImmutableStorageWithVersioning, &out.ImmutableStorageWithVersioning + *out = new(ImmutableStorageAccount_STATUS) + (*in).DeepCopyInto(*out) + } + if in.IsHnsEnabled != nil { + in, out := &in.IsHnsEnabled, &out.IsHnsEnabled + *out = new(bool) + **out = **in + } + if in.IsLocalUserEnabled != nil { + in, out := &in.IsLocalUserEnabled, &out.IsLocalUserEnabled + *out = new(bool) + **out = **in + } + if in.IsNfsV3Enabled != nil { + in, out := &in.IsNfsV3Enabled, &out.IsNfsV3Enabled + *out = new(bool) + **out = **in + } + if in.IsSftpEnabled != nil { + in, out := &in.IsSftpEnabled, &out.IsSftpEnabled + *out = new(bool) + **out = **in + } + if in.IsSkuConversionBlocked != nil { + in, out := &in.IsSkuConversionBlocked, &out.IsSkuConversionBlocked + *out = new(bool) + **out = **in + } + if in.KeyCreationTime != nil { + in, out := &in.KeyCreationTime, &out.KeyCreationTime + *out = new(KeyCreationTime_STATUS) + (*in).DeepCopyInto(*out) + } + if in.KeyPolicy != nil { + in, out := &in.KeyPolicy, &out.KeyPolicy + *out = new(KeyPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(StorageAccount_Kind_STATUS) + **out = **in + } + if in.LargeFileSharesState != nil { + in, out := &in.LargeFileSharesState, &out.LargeFileSharesState + *out = new(StorageAccountProperties_LargeFileSharesState_STATUS) + **out = **in + } + if in.LastGeoFailoverTime != nil { + in, out := &in.LastGeoFailoverTime, &out.LastGeoFailoverTime + *out = new(string) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.MinimumTlsVersion != nil { + in, out := &in.MinimumTlsVersion, &out.MinimumTlsVersion + *out = new(StorageAccountProperties_MinimumTlsVersion_STATUS) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.NetworkAcls != nil { + in, out := &in.NetworkAcls, &out.NetworkAcls + *out = new(NetworkRuleSet_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PrimaryEndpoints != nil { + in, out := &in.PrimaryEndpoints, &out.PrimaryEndpoints + *out = new(Endpoints_STATUS) + (*in).DeepCopyInto(*out) + } + if in.PrimaryLocation != nil { + in, out := &in.PrimaryLocation, &out.PrimaryLocation + *out = new(string) + **out = **in + } + if in.PrivateEndpointConnections != nil { + in, out := &in.PrivateEndpointConnections, &out.PrivateEndpointConnections + *out = make([]PrivateEndpointConnection_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ProvisioningState != nil { + in, out := &in.ProvisioningState, &out.ProvisioningState + *out = new(StorageAccountProperties_ProvisioningState_STATUS) + **out = **in + } + if in.PublicNetworkAccess != nil { + in, out := &in.PublicNetworkAccess, &out.PublicNetworkAccess + *out = new(StorageAccountProperties_PublicNetworkAccess_STATUS) + **out = **in + } + if in.RoutingPreference != nil { + in, out := &in.RoutingPreference, &out.RoutingPreference + *out = new(RoutingPreference_STATUS) + (*in).DeepCopyInto(*out) + } + if in.SasPolicy != nil { + in, out := &in.SasPolicy, &out.SasPolicy + *out = new(SasPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.SecondaryEndpoints != nil { + in, out := &in.SecondaryEndpoints, &out.SecondaryEndpoints + *out = new(Endpoints_STATUS) + (*in).DeepCopyInto(*out) + } + if in.SecondaryLocation != nil { + in, out := &in.SecondaryLocation, &out.SecondaryLocation + *out = new(string) + **out = **in + } + if in.Sku != nil { + in, out := &in.Sku, &out.Sku + *out = new(Sku_STATUS) + (*in).DeepCopyInto(*out) + } + if in.StatusOfPrimary != nil { + in, out := &in.StatusOfPrimary, &out.StatusOfPrimary + *out = new(StorageAccountProperties_StatusOfPrimary_STATUS) + **out = **in + } + if in.StatusOfSecondary != nil { + in, out := &in.StatusOfSecondary, &out.StatusOfSecondary + *out = new(StorageAccountProperties_StatusOfSecondary_STATUS) + **out = **in + } + if in.StorageAccountSkuConversionStatus != nil { + in, out := &in.StorageAccountSkuConversionStatus, &out.StorageAccountSkuConversionStatus + *out = new(StorageAccountSkuConversionStatus_STATUS) + (*in).DeepCopyInto(*out) + } + if in.SupportsHttpsTrafficOnly != nil { + in, out := &in.SupportsHttpsTrafficOnly, &out.SupportsHttpsTrafficOnly + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccount_STATUS. +func (in *StorageAccount_STATUS) DeepCopy() *StorageAccount_STATUS { + if in == nil { + return nil + } + out := new(StorageAccount_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccount_STATUS_ARM) DeepCopyInto(out *StorageAccount_STATUS_ARM) { + *out = *in + if in.ExtendedLocation != nil { + in, out := &in.ExtendedLocation, &out.ExtendedLocation + *out = new(ExtendedLocation_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(Identity_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(StorageAccount_Kind_STATUS) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(StorageAccountProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Sku != nil { + in, out := &in.Sku, &out.Sku + *out = new(Sku_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccount_STATUS_ARM. +func (in *StorageAccount_STATUS_ARM) DeepCopy() *StorageAccount_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccount_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccount_Spec) DeepCopyInto(out *StorageAccount_Spec) { + *out = *in + if in.AccessTier != nil { + in, out := &in.AccessTier, &out.AccessTier + *out = new(StorageAccountPropertiesCreateParameters_AccessTier) + **out = **in + } + if in.AllowBlobPublicAccess != nil { + in, out := &in.AllowBlobPublicAccess, &out.AllowBlobPublicAccess + *out = new(bool) + **out = **in + } + if in.AllowCrossTenantReplication != nil { + in, out := &in.AllowCrossTenantReplication, &out.AllowCrossTenantReplication + *out = new(bool) + **out = **in + } + if in.AllowSharedKeyAccess != nil { + in, out := &in.AllowSharedKeyAccess, &out.AllowSharedKeyAccess + *out = new(bool) + **out = **in + } + if in.AllowedCopyScope != nil { + in, out := &in.AllowedCopyScope, &out.AllowedCopyScope + *out = new(StorageAccountPropertiesCreateParameters_AllowedCopyScope) + **out = **in + } + if in.AzureFilesIdentityBasedAuthentication != nil { + in, out := &in.AzureFilesIdentityBasedAuthentication, &out.AzureFilesIdentityBasedAuthentication + *out = new(AzureFilesIdentityBasedAuthentication) + (*in).DeepCopyInto(*out) + } + if in.CustomDomain != nil { + in, out := &in.CustomDomain, &out.CustomDomain + *out = new(CustomDomain) + (*in).DeepCopyInto(*out) + } + if in.DefaultToOAuthAuthentication != nil { + in, out := &in.DefaultToOAuthAuthentication, &out.DefaultToOAuthAuthentication + *out = new(bool) + **out = **in + } + if in.DnsEndpointType != nil { + in, out := &in.DnsEndpointType, &out.DnsEndpointType + *out = new(StorageAccountPropertiesCreateParameters_DnsEndpointType) + **out = **in + } + if in.Encryption != nil { + in, out := &in.Encryption, &out.Encryption + *out = new(Encryption) + (*in).DeepCopyInto(*out) + } + if in.ExtendedLocation != nil { + in, out := &in.ExtendedLocation, &out.ExtendedLocation + *out = new(ExtendedLocation) + (*in).DeepCopyInto(*out) + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(Identity) + (*in).DeepCopyInto(*out) + } + if in.ImmutableStorageWithVersioning != nil { + in, out := &in.ImmutableStorageWithVersioning, &out.ImmutableStorageWithVersioning + *out = new(ImmutableStorageAccount) + (*in).DeepCopyInto(*out) + } + if in.IsHnsEnabled != nil { + in, out := &in.IsHnsEnabled, &out.IsHnsEnabled + *out = new(bool) + **out = **in + } + if in.IsLocalUserEnabled != nil { + in, out := &in.IsLocalUserEnabled, &out.IsLocalUserEnabled + *out = new(bool) + **out = **in + } + if in.IsNfsV3Enabled != nil { + in, out := &in.IsNfsV3Enabled, &out.IsNfsV3Enabled + *out = new(bool) + **out = **in + } + if in.IsSftpEnabled != nil { + in, out := &in.IsSftpEnabled, &out.IsSftpEnabled + *out = new(bool) + **out = **in + } + if in.KeyPolicy != nil { + in, out := &in.KeyPolicy, &out.KeyPolicy + *out = new(KeyPolicy) + (*in).DeepCopyInto(*out) + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(StorageAccount_Kind_Spec) + **out = **in + } + if in.LargeFileSharesState != nil { + in, out := &in.LargeFileSharesState, &out.LargeFileSharesState + *out = new(StorageAccountPropertiesCreateParameters_LargeFileSharesState) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.MinimumTlsVersion != nil { + in, out := &in.MinimumTlsVersion, &out.MinimumTlsVersion + *out = new(StorageAccountPropertiesCreateParameters_MinimumTlsVersion) + **out = **in + } + if in.NetworkAcls != nil { + in, out := &in.NetworkAcls, &out.NetworkAcls + *out = new(NetworkRuleSet) + (*in).DeepCopyInto(*out) + } + if in.OperatorSpec != nil { + in, out := &in.OperatorSpec, &out.OperatorSpec + *out = new(StorageAccountOperatorSpec) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PublicNetworkAccess != nil { + in, out := &in.PublicNetworkAccess, &out.PublicNetworkAccess + *out = new(StorageAccountPropertiesCreateParameters_PublicNetworkAccess) + **out = **in + } + if in.RoutingPreference != nil { + in, out := &in.RoutingPreference, &out.RoutingPreference + *out = new(RoutingPreference) + (*in).DeepCopyInto(*out) + } + if in.SasPolicy != nil { + in, out := &in.SasPolicy, &out.SasPolicy + *out = new(SasPolicy) + (*in).DeepCopyInto(*out) + } + if in.Sku != nil { + in, out := &in.Sku, &out.Sku + *out = new(Sku) + (*in).DeepCopyInto(*out) + } + if in.SupportsHttpsTrafficOnly != nil { + in, out := &in.SupportsHttpsTrafficOnly, &out.SupportsHttpsTrafficOnly + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccount_Spec. +func (in *StorageAccount_Spec) DeepCopy() *StorageAccount_Spec { + if in == nil { + return nil + } + out := new(StorageAccount_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccount_Spec_ARM) DeepCopyInto(out *StorageAccount_Spec_ARM) { + *out = *in + if in.ExtendedLocation != nil { + in, out := &in.ExtendedLocation, &out.ExtendedLocation + *out = new(ExtendedLocation_ARM) + (*in).DeepCopyInto(*out) + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(Identity_ARM) + (*in).DeepCopyInto(*out) + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(StorageAccount_Kind_Spec) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(StorageAccountPropertiesCreateParameters_ARM) + (*in).DeepCopyInto(*out) + } + if in.Sku != nil { + in, out := &in.Sku, &out.Sku + *out = new(Sku_ARM) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccount_Spec_ARM. +func (in *StorageAccount_Spec_ARM) DeepCopy() *StorageAccount_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccount_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsBlobService) DeepCopyInto(out *StorageAccountsBlobService) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsBlobService. +func (in *StorageAccountsBlobService) DeepCopy() *StorageAccountsBlobService { + if in == nil { + return nil + } + out := new(StorageAccountsBlobService) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsBlobService) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsBlobServiceList) DeepCopyInto(out *StorageAccountsBlobServiceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsBlobService, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsBlobServiceList. +func (in *StorageAccountsBlobServiceList) DeepCopy() *StorageAccountsBlobServiceList { + if in == nil { + return nil + } + out := new(StorageAccountsBlobServiceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsBlobServiceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsBlobServicesContainer) DeepCopyInto(out *StorageAccountsBlobServicesContainer) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsBlobServicesContainer. +func (in *StorageAccountsBlobServicesContainer) DeepCopy() *StorageAccountsBlobServicesContainer { + if in == nil { + return nil + } + out := new(StorageAccountsBlobServicesContainer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsBlobServicesContainer) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsBlobServicesContainerList) DeepCopyInto(out *StorageAccountsBlobServicesContainerList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsBlobServicesContainer, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsBlobServicesContainerList. +func (in *StorageAccountsBlobServicesContainerList) DeepCopy() *StorageAccountsBlobServicesContainerList { + if in == nil { + return nil + } + out := new(StorageAccountsBlobServicesContainerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsBlobServicesContainerList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsFileService) DeepCopyInto(out *StorageAccountsFileService) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsFileService. +func (in *StorageAccountsFileService) DeepCopy() *StorageAccountsFileService { + if in == nil { + return nil + } + out := new(StorageAccountsFileService) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsFileService) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsFileServiceList) DeepCopyInto(out *StorageAccountsFileServiceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsFileService, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsFileServiceList. +func (in *StorageAccountsFileServiceList) DeepCopy() *StorageAccountsFileServiceList { + if in == nil { + return nil + } + out := new(StorageAccountsFileServiceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsFileServiceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsFileServicesShare) DeepCopyInto(out *StorageAccountsFileServicesShare) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsFileServicesShare. +func (in *StorageAccountsFileServicesShare) DeepCopy() *StorageAccountsFileServicesShare { + if in == nil { + return nil + } + out := new(StorageAccountsFileServicesShare) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsFileServicesShare) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsFileServicesShareList) DeepCopyInto(out *StorageAccountsFileServicesShareList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsFileServicesShare, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsFileServicesShareList. +func (in *StorageAccountsFileServicesShareList) DeepCopy() *StorageAccountsFileServicesShareList { + if in == nil { + return nil + } + out := new(StorageAccountsFileServicesShareList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsFileServicesShareList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsManagementPolicy) DeepCopyInto(out *StorageAccountsManagementPolicy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsManagementPolicy. +func (in *StorageAccountsManagementPolicy) DeepCopy() *StorageAccountsManagementPolicy { + if in == nil { + return nil + } + out := new(StorageAccountsManagementPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsManagementPolicy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsManagementPolicyList) DeepCopyInto(out *StorageAccountsManagementPolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsManagementPolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsManagementPolicyList. +func (in *StorageAccountsManagementPolicyList) DeepCopy() *StorageAccountsManagementPolicyList { + if in == nil { + return nil + } + out := new(StorageAccountsManagementPolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsManagementPolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsQueueService) DeepCopyInto(out *StorageAccountsQueueService) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsQueueService. +func (in *StorageAccountsQueueService) DeepCopy() *StorageAccountsQueueService { + if in == nil { + return nil + } + out := new(StorageAccountsQueueService) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsQueueService) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsQueueServiceList) DeepCopyInto(out *StorageAccountsQueueServiceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsQueueService, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsQueueServiceList. +func (in *StorageAccountsQueueServiceList) DeepCopy() *StorageAccountsQueueServiceList { + if in == nil { + return nil + } + out := new(StorageAccountsQueueServiceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsQueueServiceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsQueueServicesQueue) DeepCopyInto(out *StorageAccountsQueueServicesQueue) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsQueueServicesQueue. +func (in *StorageAccountsQueueServicesQueue) DeepCopy() *StorageAccountsQueueServicesQueue { + if in == nil { + return nil + } + out := new(StorageAccountsQueueServicesQueue) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsQueueServicesQueue) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsQueueServicesQueueList) DeepCopyInto(out *StorageAccountsQueueServicesQueueList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsQueueServicesQueue, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsQueueServicesQueueList. +func (in *StorageAccountsQueueServicesQueueList) DeepCopy() *StorageAccountsQueueServicesQueueList { + if in == nil { + return nil + } + out := new(StorageAccountsQueueServicesQueueList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsQueueServicesQueueList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsTableService) DeepCopyInto(out *StorageAccountsTableService) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsTableService. +func (in *StorageAccountsTableService) DeepCopy() *StorageAccountsTableService { + if in == nil { + return nil + } + out := new(StorageAccountsTableService) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsTableService) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsTableServiceList) DeepCopyInto(out *StorageAccountsTableServiceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsTableService, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsTableServiceList. +func (in *StorageAccountsTableServiceList) DeepCopy() *StorageAccountsTableServiceList { + if in == nil { + return nil + } + out := new(StorageAccountsTableServiceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsTableServiceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsTableServicesTable) DeepCopyInto(out *StorageAccountsTableServicesTable) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsTableServicesTable. +func (in *StorageAccountsTableServicesTable) DeepCopy() *StorageAccountsTableServicesTable { + if in == nil { + return nil + } + out := new(StorageAccountsTableServicesTable) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsTableServicesTable) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccountsTableServicesTableList) DeepCopyInto(out *StorageAccountsTableServicesTableList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageAccountsTableServicesTable, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccountsTableServicesTableList. +func (in *StorageAccountsTableServicesTableList) DeepCopy() *StorageAccountsTableServicesTableList { + if in == nil { + return nil + } + out := new(StorageAccountsTableServicesTableList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageAccountsTableServicesTableList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobService_Properties_STATUS_ARM) DeepCopyInto(out *StorageAccounts_BlobService_Properties_STATUS_ARM) { + *out = *in + if in.AutomaticSnapshotPolicyEnabled != nil { + in, out := &in.AutomaticSnapshotPolicyEnabled, &out.AutomaticSnapshotPolicyEnabled + *out = new(bool) + **out = **in + } + if in.ChangeFeed != nil { + in, out := &in.ChangeFeed, &out.ChangeFeed + *out = new(ChangeFeed_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.ContainerDeleteRetentionPolicy != nil { + in, out := &in.ContainerDeleteRetentionPolicy, &out.ContainerDeleteRetentionPolicy + *out = new(DeleteRetentionPolicy_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.DefaultServiceVersion != nil { + in, out := &in.DefaultServiceVersion, &out.DefaultServiceVersion + *out = new(string) + **out = **in + } + if in.DeleteRetentionPolicy != nil { + in, out := &in.DeleteRetentionPolicy, &out.DeleteRetentionPolicy + *out = new(DeleteRetentionPolicy_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.IsVersioningEnabled != nil { + in, out := &in.IsVersioningEnabled, &out.IsVersioningEnabled + *out = new(bool) + **out = **in + } + if in.LastAccessTimeTrackingPolicy != nil { + in, out := &in.LastAccessTimeTrackingPolicy, &out.LastAccessTimeTrackingPolicy + *out = new(LastAccessTimeTrackingPolicy_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.RestorePolicy != nil { + in, out := &in.RestorePolicy, &out.RestorePolicy + *out = new(RestorePolicyProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobService_Properties_STATUS_ARM. +func (in *StorageAccounts_BlobService_Properties_STATUS_ARM) DeepCopy() *StorageAccounts_BlobService_Properties_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobService_Properties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobService_Properties_Spec_ARM) DeepCopyInto(out *StorageAccounts_BlobService_Properties_Spec_ARM) { + *out = *in + if in.AutomaticSnapshotPolicyEnabled != nil { + in, out := &in.AutomaticSnapshotPolicyEnabled, &out.AutomaticSnapshotPolicyEnabled + *out = new(bool) + **out = **in + } + if in.ChangeFeed != nil { + in, out := &in.ChangeFeed, &out.ChangeFeed + *out = new(ChangeFeed_ARM) + (*in).DeepCopyInto(*out) + } + if in.ContainerDeleteRetentionPolicy != nil { + in, out := &in.ContainerDeleteRetentionPolicy, &out.ContainerDeleteRetentionPolicy + *out = new(DeleteRetentionPolicy_ARM) + (*in).DeepCopyInto(*out) + } + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_ARM) + (*in).DeepCopyInto(*out) + } + if in.DefaultServiceVersion != nil { + in, out := &in.DefaultServiceVersion, &out.DefaultServiceVersion + *out = new(string) + **out = **in + } + if in.DeleteRetentionPolicy != nil { + in, out := &in.DeleteRetentionPolicy, &out.DeleteRetentionPolicy + *out = new(DeleteRetentionPolicy_ARM) + (*in).DeepCopyInto(*out) + } + if in.IsVersioningEnabled != nil { + in, out := &in.IsVersioningEnabled, &out.IsVersioningEnabled + *out = new(bool) + **out = **in + } + if in.LastAccessTimeTrackingPolicy != nil { + in, out := &in.LastAccessTimeTrackingPolicy, &out.LastAccessTimeTrackingPolicy + *out = new(LastAccessTimeTrackingPolicy_ARM) + (*in).DeepCopyInto(*out) + } + if in.RestorePolicy != nil { + in, out := &in.RestorePolicy, &out.RestorePolicy + *out = new(RestorePolicyProperties_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobService_Properties_Spec_ARM. +func (in *StorageAccounts_BlobService_Properties_Spec_ARM) DeepCopy() *StorageAccounts_BlobService_Properties_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobService_Properties_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobService_STATUS) DeepCopyInto(out *StorageAccounts_BlobService_STATUS) { + *out = *in + if in.AutomaticSnapshotPolicyEnabled != nil { + in, out := &in.AutomaticSnapshotPolicyEnabled, &out.AutomaticSnapshotPolicyEnabled + *out = new(bool) + **out = **in + } + if in.ChangeFeed != nil { + in, out := &in.ChangeFeed, &out.ChangeFeed + *out = new(ChangeFeed_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ContainerDeleteRetentionPolicy != nil { + in, out := &in.ContainerDeleteRetentionPolicy, &out.ContainerDeleteRetentionPolicy + *out = new(DeleteRetentionPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_STATUS) + (*in).DeepCopyInto(*out) + } + if in.DefaultServiceVersion != nil { + in, out := &in.DefaultServiceVersion, &out.DefaultServiceVersion + *out = new(string) + **out = **in + } + if in.DeleteRetentionPolicy != nil { + in, out := &in.DeleteRetentionPolicy, &out.DeleteRetentionPolicy + *out = new(DeleteRetentionPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.IsVersioningEnabled != nil { + in, out := &in.IsVersioningEnabled, &out.IsVersioningEnabled + *out = new(bool) + **out = **in + } + if in.LastAccessTimeTrackingPolicy != nil { + in, out := &in.LastAccessTimeTrackingPolicy, &out.LastAccessTimeTrackingPolicy + *out = new(LastAccessTimeTrackingPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.RestorePolicy != nil { + in, out := &in.RestorePolicy, &out.RestorePolicy + *out = new(RestorePolicyProperties_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Sku != nil { + in, out := &in.Sku, &out.Sku + *out = new(Sku_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobService_STATUS. +func (in *StorageAccounts_BlobService_STATUS) DeepCopy() *StorageAccounts_BlobService_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobService_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobService_STATUS_ARM) DeepCopyInto(out *StorageAccounts_BlobService_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(StorageAccounts_BlobService_Properties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Sku != nil { + in, out := &in.Sku, &out.Sku + *out = new(Sku_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobService_STATUS_ARM. +func (in *StorageAccounts_BlobService_STATUS_ARM) DeepCopy() *StorageAccounts_BlobService_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobService_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobService_Spec) DeepCopyInto(out *StorageAccounts_BlobService_Spec) { + *out = *in + if in.AutomaticSnapshotPolicyEnabled != nil { + in, out := &in.AutomaticSnapshotPolicyEnabled, &out.AutomaticSnapshotPolicyEnabled + *out = new(bool) + **out = **in + } + if in.ChangeFeed != nil { + in, out := &in.ChangeFeed, &out.ChangeFeed + *out = new(ChangeFeed) + (*in).DeepCopyInto(*out) + } + if in.ContainerDeleteRetentionPolicy != nil { + in, out := &in.ContainerDeleteRetentionPolicy, &out.ContainerDeleteRetentionPolicy + *out = new(DeleteRetentionPolicy) + (*in).DeepCopyInto(*out) + } + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules) + (*in).DeepCopyInto(*out) + } + if in.DefaultServiceVersion != nil { + in, out := &in.DefaultServiceVersion, &out.DefaultServiceVersion + *out = new(string) + **out = **in + } + if in.DeleteRetentionPolicy != nil { + in, out := &in.DeleteRetentionPolicy, &out.DeleteRetentionPolicy + *out = new(DeleteRetentionPolicy) + (*in).DeepCopyInto(*out) + } + if in.IsVersioningEnabled != nil { + in, out := &in.IsVersioningEnabled, &out.IsVersioningEnabled + *out = new(bool) + **out = **in + } + if in.LastAccessTimeTrackingPolicy != nil { + in, out := &in.LastAccessTimeTrackingPolicy, &out.LastAccessTimeTrackingPolicy + *out = new(LastAccessTimeTrackingPolicy) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.RestorePolicy != nil { + in, out := &in.RestorePolicy, &out.RestorePolicy + *out = new(RestorePolicyProperties) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobService_Spec. +func (in *StorageAccounts_BlobService_Spec) DeepCopy() *StorageAccounts_BlobService_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobService_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobService_Spec_ARM) DeepCopyInto(out *StorageAccounts_BlobService_Spec_ARM) { + *out = *in + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(StorageAccounts_BlobService_Properties_Spec_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobService_Spec_ARM. +func (in *StorageAccounts_BlobService_Spec_ARM) DeepCopy() *StorageAccounts_BlobService_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobService_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobServices_Container_STATUS) DeepCopyInto(out *StorageAccounts_BlobServices_Container_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DefaultEncryptionScope != nil { + in, out := &in.DefaultEncryptionScope, &out.DefaultEncryptionScope + *out = new(string) + **out = **in + } + if in.Deleted != nil { + in, out := &in.Deleted, &out.Deleted + *out = new(bool) + **out = **in + } + if in.DeletedTime != nil { + in, out := &in.DeletedTime, &out.DeletedTime + *out = new(string) + **out = **in + } + if in.DenyEncryptionScopeOverride != nil { + in, out := &in.DenyEncryptionScopeOverride, &out.DenyEncryptionScopeOverride + *out = new(bool) + **out = **in + } + if in.EnableNfsV3AllSquash != nil { + in, out := &in.EnableNfsV3AllSquash, &out.EnableNfsV3AllSquash + *out = new(bool) + **out = **in + } + if in.EnableNfsV3RootSquash != nil { + in, out := &in.EnableNfsV3RootSquash, &out.EnableNfsV3RootSquash + *out = new(bool) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.HasImmutabilityPolicy != nil { + in, out := &in.HasImmutabilityPolicy, &out.HasImmutabilityPolicy + *out = new(bool) + **out = **in + } + if in.HasLegalHold != nil { + in, out := &in.HasLegalHold, &out.HasLegalHold + *out = new(bool) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.ImmutabilityPolicy != nil { + in, out := &in.ImmutabilityPolicy, &out.ImmutabilityPolicy + *out = new(ImmutabilityPolicyProperties_STATUS) + (*in).DeepCopyInto(*out) + } + if in.ImmutableStorageWithVersioning != nil { + in, out := &in.ImmutableStorageWithVersioning, &out.ImmutableStorageWithVersioning + *out = new(ImmutableStorageWithVersioning_STATUS) + (*in).DeepCopyInto(*out) + } + if in.LastModifiedTime != nil { + in, out := &in.LastModifiedTime, &out.LastModifiedTime + *out = new(string) + **out = **in + } + if in.LeaseDuration != nil { + in, out := &in.LeaseDuration, &out.LeaseDuration + *out = new(ContainerProperties_LeaseDuration_STATUS) + **out = **in + } + if in.LeaseState != nil { + in, out := &in.LeaseState, &out.LeaseState + *out = new(ContainerProperties_LeaseState_STATUS) + **out = **in + } + if in.LeaseStatus != nil { + in, out := &in.LeaseStatus, &out.LeaseStatus + *out = new(ContainerProperties_LeaseStatus_STATUS) + **out = **in + } + if in.LegalHold != nil { + in, out := &in.LegalHold, &out.LegalHold + *out = new(LegalHoldProperties_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PublicAccess != nil { + in, out := &in.PublicAccess, &out.PublicAccess + *out = new(ContainerProperties_PublicAccess_STATUS) + **out = **in + } + if in.RemainingRetentionDays != nil { + in, out := &in.RemainingRetentionDays, &out.RemainingRetentionDays + *out = new(int) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobServices_Container_STATUS. +func (in *StorageAccounts_BlobServices_Container_STATUS) DeepCopy() *StorageAccounts_BlobServices_Container_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobServices_Container_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobServices_Container_STATUS_ARM) DeepCopyInto(out *StorageAccounts_BlobServices_Container_STATUS_ARM) { + *out = *in + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(ContainerProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobServices_Container_STATUS_ARM. +func (in *StorageAccounts_BlobServices_Container_STATUS_ARM) DeepCopy() *StorageAccounts_BlobServices_Container_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobServices_Container_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobServices_Container_Spec) DeepCopyInto(out *StorageAccounts_BlobServices_Container_Spec) { + *out = *in + if in.DefaultEncryptionScope != nil { + in, out := &in.DefaultEncryptionScope, &out.DefaultEncryptionScope + *out = new(string) + **out = **in + } + if in.DenyEncryptionScopeOverride != nil { + in, out := &in.DenyEncryptionScopeOverride, &out.DenyEncryptionScopeOverride + *out = new(bool) + **out = **in + } + if in.EnableNfsV3AllSquash != nil { + in, out := &in.EnableNfsV3AllSquash, &out.EnableNfsV3AllSquash + *out = new(bool) + **out = **in + } + if in.EnableNfsV3RootSquash != nil { + in, out := &in.EnableNfsV3RootSquash, &out.EnableNfsV3RootSquash + *out = new(bool) + **out = **in + } + if in.ImmutableStorageWithVersioning != nil { + in, out := &in.ImmutableStorageWithVersioning, &out.ImmutableStorageWithVersioning + *out = new(ImmutableStorageWithVersioning) + (*in).DeepCopyInto(*out) + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PublicAccess != nil { + in, out := &in.PublicAccess, &out.PublicAccess + *out = new(ContainerProperties_PublicAccess) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobServices_Container_Spec. +func (in *StorageAccounts_BlobServices_Container_Spec) DeepCopy() *StorageAccounts_BlobServices_Container_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobServices_Container_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_BlobServices_Container_Spec_ARM) DeepCopyInto(out *StorageAccounts_BlobServices_Container_Spec_ARM) { + *out = *in + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(ContainerProperties_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_BlobServices_Container_Spec_ARM. +func (in *StorageAccounts_BlobServices_Container_Spec_ARM) DeepCopy() *StorageAccounts_BlobServices_Container_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_BlobServices_Container_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileService_Properties_STATUS_ARM) DeepCopyInto(out *StorageAccounts_FileService_Properties_STATUS_ARM) { + *out = *in + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.ProtocolSettings != nil { + in, out := &in.ProtocolSettings, &out.ProtocolSettings + *out = new(ProtocolSettings_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.ShareDeleteRetentionPolicy != nil { + in, out := &in.ShareDeleteRetentionPolicy, &out.ShareDeleteRetentionPolicy + *out = new(DeleteRetentionPolicy_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileService_Properties_STATUS_ARM. +func (in *StorageAccounts_FileService_Properties_STATUS_ARM) DeepCopy() *StorageAccounts_FileService_Properties_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_FileService_Properties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileService_Properties_Spec_ARM) DeepCopyInto(out *StorageAccounts_FileService_Properties_Spec_ARM) { + *out = *in + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_ARM) + (*in).DeepCopyInto(*out) + } + if in.ProtocolSettings != nil { + in, out := &in.ProtocolSettings, &out.ProtocolSettings + *out = new(ProtocolSettings_ARM) + (*in).DeepCopyInto(*out) + } + if in.ShareDeleteRetentionPolicy != nil { + in, out := &in.ShareDeleteRetentionPolicy, &out.ShareDeleteRetentionPolicy + *out = new(DeleteRetentionPolicy_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileService_Properties_Spec_ARM. +func (in *StorageAccounts_FileService_Properties_Spec_ARM) DeepCopy() *StorageAccounts_FileService_Properties_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_FileService_Properties_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileService_STATUS) DeepCopyInto(out *StorageAccounts_FileService_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.ProtocolSettings != nil { + in, out := &in.ProtocolSettings, &out.ProtocolSettings + *out = new(ProtocolSettings_STATUS) + (*in).DeepCopyInto(*out) + } + if in.ShareDeleteRetentionPolicy != nil { + in, out := &in.ShareDeleteRetentionPolicy, &out.ShareDeleteRetentionPolicy + *out = new(DeleteRetentionPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Sku != nil { + in, out := &in.Sku, &out.Sku + *out = new(Sku_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileService_STATUS. +func (in *StorageAccounts_FileService_STATUS) DeepCopy() *StorageAccounts_FileService_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_FileService_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileService_STATUS_ARM) DeepCopyInto(out *StorageAccounts_FileService_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(StorageAccounts_FileService_Properties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Sku != nil { + in, out := &in.Sku, &out.Sku + *out = new(Sku_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileService_STATUS_ARM. +func (in *StorageAccounts_FileService_STATUS_ARM) DeepCopy() *StorageAccounts_FileService_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_FileService_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileService_Spec) DeepCopyInto(out *StorageAccounts_FileService_Spec) { + *out = *in + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.ProtocolSettings != nil { + in, out := &in.ProtocolSettings, &out.ProtocolSettings + *out = new(ProtocolSettings) + (*in).DeepCopyInto(*out) + } + if in.ShareDeleteRetentionPolicy != nil { + in, out := &in.ShareDeleteRetentionPolicy, &out.ShareDeleteRetentionPolicy + *out = new(DeleteRetentionPolicy) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileService_Spec. +func (in *StorageAccounts_FileService_Spec) DeepCopy() *StorageAccounts_FileService_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_FileService_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileService_Spec_ARM) DeepCopyInto(out *StorageAccounts_FileService_Spec_ARM) { + *out = *in + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(StorageAccounts_FileService_Properties_Spec_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileService_Spec_ARM. +func (in *StorageAccounts_FileService_Spec_ARM) DeepCopy() *StorageAccounts_FileService_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_FileService_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileServices_Share_STATUS) DeepCopyInto(out *StorageAccounts_FileServices_Share_STATUS) { + *out = *in + if in.AccessTier != nil { + in, out := &in.AccessTier, &out.AccessTier + *out = new(FileShareProperties_AccessTier_STATUS) + **out = **in + } + if in.AccessTierChangeTime != nil { + in, out := &in.AccessTierChangeTime, &out.AccessTierChangeTime + *out = new(string) + **out = **in + } + if in.AccessTierStatus != nil { + in, out := &in.AccessTierStatus, &out.AccessTierStatus + *out = new(string) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Deleted != nil { + in, out := &in.Deleted, &out.Deleted + *out = new(bool) + **out = **in + } + if in.DeletedTime != nil { + in, out := &in.DeletedTime, &out.DeletedTime + *out = new(string) + **out = **in + } + if in.EnabledProtocols != nil { + in, out := &in.EnabledProtocols, &out.EnabledProtocols + *out = new(FileShareProperties_EnabledProtocols_STATUS) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.LastModifiedTime != nil { + in, out := &in.LastModifiedTime, &out.LastModifiedTime + *out = new(string) + **out = **in + } + if in.LeaseDuration != nil { + in, out := &in.LeaseDuration, &out.LeaseDuration + *out = new(FileShareProperties_LeaseDuration_STATUS) + **out = **in + } + if in.LeaseState != nil { + in, out := &in.LeaseState, &out.LeaseState + *out = new(FileShareProperties_LeaseState_STATUS) + **out = **in + } + if in.LeaseStatus != nil { + in, out := &in.LeaseStatus, &out.LeaseStatus + *out = new(FileShareProperties_LeaseStatus_STATUS) + **out = **in + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.RemainingRetentionDays != nil { + in, out := &in.RemainingRetentionDays, &out.RemainingRetentionDays + *out = new(int) + **out = **in + } + if in.RootSquash != nil { + in, out := &in.RootSquash, &out.RootSquash + *out = new(FileShareProperties_RootSquash_STATUS) + **out = **in + } + if in.ShareQuota != nil { + in, out := &in.ShareQuota, &out.ShareQuota + *out = new(int) + **out = **in + } + if in.ShareUsageBytes != nil { + in, out := &in.ShareUsageBytes, &out.ShareUsageBytes + *out = new(int) + **out = **in + } + if in.SignedIdentifiers != nil { + in, out := &in.SignedIdentifiers, &out.SignedIdentifiers + *out = make([]SignedIdentifier_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SnapshotTime != nil { + in, out := &in.SnapshotTime, &out.SnapshotTime + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileServices_Share_STATUS. +func (in *StorageAccounts_FileServices_Share_STATUS) DeepCopy() *StorageAccounts_FileServices_Share_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_FileServices_Share_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileServices_Share_STATUS_ARM) DeepCopyInto(out *StorageAccounts_FileServices_Share_STATUS_ARM) { + *out = *in + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(FileShareProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileServices_Share_STATUS_ARM. +func (in *StorageAccounts_FileServices_Share_STATUS_ARM) DeepCopy() *StorageAccounts_FileServices_Share_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_FileServices_Share_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileServices_Share_Spec) DeepCopyInto(out *StorageAccounts_FileServices_Share_Spec) { + *out = *in + if in.AccessTier != nil { + in, out := &in.AccessTier, &out.AccessTier + *out = new(FileShareProperties_AccessTier) + **out = **in + } + if in.EnabledProtocols != nil { + in, out := &in.EnabledProtocols, &out.EnabledProtocols + *out = new(FileShareProperties_EnabledProtocols) + **out = **in + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.RootSquash != nil { + in, out := &in.RootSquash, &out.RootSquash + *out = new(FileShareProperties_RootSquash) + **out = **in + } + if in.ShareQuota != nil { + in, out := &in.ShareQuota, &out.ShareQuota + *out = new(int) + **out = **in + } + if in.SignedIdentifiers != nil { + in, out := &in.SignedIdentifiers, &out.SignedIdentifiers + *out = make([]SignedIdentifier, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileServices_Share_Spec. +func (in *StorageAccounts_FileServices_Share_Spec) DeepCopy() *StorageAccounts_FileServices_Share_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_FileServices_Share_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_FileServices_Share_Spec_ARM) DeepCopyInto(out *StorageAccounts_FileServices_Share_Spec_ARM) { + *out = *in + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(FileShareProperties_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_FileServices_Share_Spec_ARM. +func (in *StorageAccounts_FileServices_Share_Spec_ARM) DeepCopy() *StorageAccounts_FileServices_Share_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_FileServices_Share_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_ManagementPolicy_STATUS) DeepCopyInto(out *StorageAccounts_ManagementPolicy_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.LastModifiedTime != nil { + in, out := &in.LastModifiedTime, &out.LastModifiedTime + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(ManagementPolicySchema_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_ManagementPolicy_STATUS. +func (in *StorageAccounts_ManagementPolicy_STATUS) DeepCopy() *StorageAccounts_ManagementPolicy_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_ManagementPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_ManagementPolicy_STATUS_ARM) DeepCopyInto(out *StorageAccounts_ManagementPolicy_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(ManagementPolicyProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_ManagementPolicy_STATUS_ARM. +func (in *StorageAccounts_ManagementPolicy_STATUS_ARM) DeepCopy() *StorageAccounts_ManagementPolicy_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_ManagementPolicy_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_ManagementPolicy_Spec) DeepCopyInto(out *StorageAccounts_ManagementPolicy_Spec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(ManagementPolicySchema) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_ManagementPolicy_Spec. +func (in *StorageAccounts_ManagementPolicy_Spec) DeepCopy() *StorageAccounts_ManagementPolicy_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_ManagementPolicy_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_ManagementPolicy_Spec_ARM) DeepCopyInto(out *StorageAccounts_ManagementPolicy_Spec_ARM) { + *out = *in + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(ManagementPolicyProperties_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_ManagementPolicy_Spec_ARM. +func (in *StorageAccounts_ManagementPolicy_Spec_ARM) DeepCopy() *StorageAccounts_ManagementPolicy_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_ManagementPolicy_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueService_Properties_STATUS_ARM) DeepCopyInto(out *StorageAccounts_QueueService_Properties_STATUS_ARM) { + *out = *in + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueService_Properties_STATUS_ARM. +func (in *StorageAccounts_QueueService_Properties_STATUS_ARM) DeepCopy() *StorageAccounts_QueueService_Properties_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueService_Properties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueService_Properties_Spec_ARM) DeepCopyInto(out *StorageAccounts_QueueService_Properties_Spec_ARM) { + *out = *in + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueService_Properties_Spec_ARM. +func (in *StorageAccounts_QueueService_Properties_Spec_ARM) DeepCopy() *StorageAccounts_QueueService_Properties_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueService_Properties_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueService_STATUS) DeepCopyInto(out *StorageAccounts_QueueService_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueService_STATUS. +func (in *StorageAccounts_QueueService_STATUS) DeepCopy() *StorageAccounts_QueueService_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueService_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueService_STATUS_ARM) DeepCopyInto(out *StorageAccounts_QueueService_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(StorageAccounts_QueueService_Properties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueService_STATUS_ARM. +func (in *StorageAccounts_QueueService_STATUS_ARM) DeepCopy() *StorageAccounts_QueueService_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueService_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueService_Spec) DeepCopyInto(out *StorageAccounts_QueueService_Spec) { + *out = *in + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueService_Spec. +func (in *StorageAccounts_QueueService_Spec) DeepCopy() *StorageAccounts_QueueService_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueService_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueService_Spec_ARM) DeepCopyInto(out *StorageAccounts_QueueService_Spec_ARM) { + *out = *in + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(StorageAccounts_QueueService_Properties_Spec_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueService_Spec_ARM. +func (in *StorageAccounts_QueueService_Spec_ARM) DeepCopy() *StorageAccounts_QueueService_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueService_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueServices_Queue_STATUS) DeepCopyInto(out *StorageAccounts_QueueServices_Queue_STATUS) { + *out = *in + if in.ApproximateMessageCount != nil { + in, out := &in.ApproximateMessageCount, &out.ApproximateMessageCount + *out = new(int) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueServices_Queue_STATUS. +func (in *StorageAccounts_QueueServices_Queue_STATUS) DeepCopy() *StorageAccounts_QueueServices_Queue_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueServices_Queue_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueServices_Queue_STATUS_ARM) DeepCopyInto(out *StorageAccounts_QueueServices_Queue_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(QueueProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueServices_Queue_STATUS_ARM. +func (in *StorageAccounts_QueueServices_Queue_STATUS_ARM) DeepCopy() *StorageAccounts_QueueServices_Queue_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueServices_Queue_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueServices_Queue_Spec) DeepCopyInto(out *StorageAccounts_QueueServices_Queue_Spec) { + *out = *in + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueServices_Queue_Spec. +func (in *StorageAccounts_QueueServices_Queue_Spec) DeepCopy() *StorageAccounts_QueueServices_Queue_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueServices_Queue_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_QueueServices_Queue_Spec_ARM) DeepCopyInto(out *StorageAccounts_QueueServices_Queue_Spec_ARM) { + *out = *in + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(QueueProperties_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_QueueServices_Queue_Spec_ARM. +func (in *StorageAccounts_QueueServices_Queue_Spec_ARM) DeepCopy() *StorageAccounts_QueueServices_Queue_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_QueueServices_Queue_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableService_Properties_STATUS_ARM) DeepCopyInto(out *StorageAccounts_TableService_Properties_STATUS_ARM) { + *out = *in + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableService_Properties_STATUS_ARM. +func (in *StorageAccounts_TableService_Properties_STATUS_ARM) DeepCopy() *StorageAccounts_TableService_Properties_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_TableService_Properties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableService_Properties_Spec_ARM) DeepCopyInto(out *StorageAccounts_TableService_Properties_Spec_ARM) { + *out = *in + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableService_Properties_Spec_ARM. +func (in *StorageAccounts_TableService_Properties_Spec_ARM) DeepCopy() *StorageAccounts_TableService_Properties_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_TableService_Properties_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableService_STATUS) DeepCopyInto(out *StorageAccounts_TableService_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableService_STATUS. +func (in *StorageAccounts_TableService_STATUS) DeepCopy() *StorageAccounts_TableService_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_TableService_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableService_STATUS_ARM) DeepCopyInto(out *StorageAccounts_TableService_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(StorageAccounts_TableService_Properties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableService_STATUS_ARM. +func (in *StorageAccounts_TableService_STATUS_ARM) DeepCopy() *StorageAccounts_TableService_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_TableService_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableService_Spec) DeepCopyInto(out *StorageAccounts_TableService_Spec) { + *out = *in + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(CorsRules) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableService_Spec. +func (in *StorageAccounts_TableService_Spec) DeepCopy() *StorageAccounts_TableService_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_TableService_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableService_Spec_ARM) DeepCopyInto(out *StorageAccounts_TableService_Spec_ARM) { + *out = *in + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(StorageAccounts_TableService_Properties_Spec_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableService_Spec_ARM. +func (in *StorageAccounts_TableService_Spec_ARM) DeepCopy() *StorageAccounts_TableService_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_TableService_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableServices_Table_STATUS) DeepCopyInto(out *StorageAccounts_TableServices_Table_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.SignedIdentifiers != nil { + in, out := &in.SignedIdentifiers, &out.SignedIdentifiers + *out = make([]TableSignedIdentifier_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.TableName != nil { + in, out := &in.TableName, &out.TableName + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableServices_Table_STATUS. +func (in *StorageAccounts_TableServices_Table_STATUS) DeepCopy() *StorageAccounts_TableServices_Table_STATUS { + if in == nil { + return nil + } + out := new(StorageAccounts_TableServices_Table_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableServices_Table_STATUS_ARM) DeepCopyInto(out *StorageAccounts_TableServices_Table_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(TableProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableServices_Table_STATUS_ARM. +func (in *StorageAccounts_TableServices_Table_STATUS_ARM) DeepCopy() *StorageAccounts_TableServices_Table_STATUS_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_TableServices_Table_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableServices_Table_Spec) DeepCopyInto(out *StorageAccounts_TableServices_Table_Spec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.SignedIdentifiers != nil { + in, out := &in.SignedIdentifiers, &out.SignedIdentifiers + *out = make([]TableSignedIdentifier, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableServices_Table_Spec. +func (in *StorageAccounts_TableServices_Table_Spec) DeepCopy() *StorageAccounts_TableServices_Table_Spec { + if in == nil { + return nil + } + out := new(StorageAccounts_TableServices_Table_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageAccounts_TableServices_Table_Spec_ARM) DeepCopyInto(out *StorageAccounts_TableServices_Table_Spec_ARM) { + *out = *in + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(TableProperties_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageAccounts_TableServices_Table_Spec_ARM. +func (in *StorageAccounts_TableServices_Table_Spec_ARM) DeepCopy() *StorageAccounts_TableServices_Table_Spec_ARM { + if in == nil { + return nil + } + out := new(StorageAccounts_TableServices_Table_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableAccessPolicy) DeepCopyInto(out *TableAccessPolicy) { + *out = *in + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = new(string) + **out = **in + } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableAccessPolicy. +func (in *TableAccessPolicy) DeepCopy() *TableAccessPolicy { + if in == nil { + return nil + } + out := new(TableAccessPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableAccessPolicy_ARM) DeepCopyInto(out *TableAccessPolicy_ARM) { + *out = *in + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = new(string) + **out = **in + } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableAccessPolicy_ARM. +func (in *TableAccessPolicy_ARM) DeepCopy() *TableAccessPolicy_ARM { + if in == nil { + return nil + } + out := new(TableAccessPolicy_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableAccessPolicy_STATUS) DeepCopyInto(out *TableAccessPolicy_STATUS) { + *out = *in + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = new(string) + **out = **in + } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableAccessPolicy_STATUS. +func (in *TableAccessPolicy_STATUS) DeepCopy() *TableAccessPolicy_STATUS { + if in == nil { + return nil + } + out := new(TableAccessPolicy_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableAccessPolicy_STATUS_ARM) DeepCopyInto(out *TableAccessPolicy_STATUS_ARM) { + *out = *in + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = new(string) + **out = **in + } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableAccessPolicy_STATUS_ARM. +func (in *TableAccessPolicy_STATUS_ARM) DeepCopy() *TableAccessPolicy_STATUS_ARM { + if in == nil { + return nil + } + out := new(TableAccessPolicy_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableProperties_ARM) DeepCopyInto(out *TableProperties_ARM) { + *out = *in + if in.SignedIdentifiers != nil { + in, out := &in.SignedIdentifiers, &out.SignedIdentifiers + *out = make([]TableSignedIdentifier_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableProperties_ARM. +func (in *TableProperties_ARM) DeepCopy() *TableProperties_ARM { + if in == nil { + return nil + } + out := new(TableProperties_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableProperties_STATUS_ARM) DeepCopyInto(out *TableProperties_STATUS_ARM) { + *out = *in + if in.SignedIdentifiers != nil { + in, out := &in.SignedIdentifiers, &out.SignedIdentifiers + *out = make([]TableSignedIdentifier_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.TableName != nil { + in, out := &in.TableName, &out.TableName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableProperties_STATUS_ARM. +func (in *TableProperties_STATUS_ARM) DeepCopy() *TableProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(TableProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableSignedIdentifier) DeepCopyInto(out *TableSignedIdentifier) { + *out = *in + if in.AccessPolicy != nil { + in, out := &in.AccessPolicy, &out.AccessPolicy + *out = new(TableAccessPolicy) + (*in).DeepCopyInto(*out) + } + if in.Reference != nil { + in, out := &in.Reference, &out.Reference + *out = new(genruntime.ResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableSignedIdentifier. +func (in *TableSignedIdentifier) DeepCopy() *TableSignedIdentifier { + if in == nil { + return nil + } + out := new(TableSignedIdentifier) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableSignedIdentifier_ARM) DeepCopyInto(out *TableSignedIdentifier_ARM) { + *out = *in + if in.AccessPolicy != nil { + in, out := &in.AccessPolicy, &out.AccessPolicy + *out = new(TableAccessPolicy_ARM) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableSignedIdentifier_ARM. +func (in *TableSignedIdentifier_ARM) DeepCopy() *TableSignedIdentifier_ARM { + if in == nil { + return nil + } + out := new(TableSignedIdentifier_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableSignedIdentifier_STATUS) DeepCopyInto(out *TableSignedIdentifier_STATUS) { + *out = *in + if in.AccessPolicy != nil { + in, out := &in.AccessPolicy, &out.AccessPolicy + *out = new(TableAccessPolicy_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableSignedIdentifier_STATUS. +func (in *TableSignedIdentifier_STATUS) DeepCopy() *TableSignedIdentifier_STATUS { + if in == nil { + return nil + } + out := new(TableSignedIdentifier_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableSignedIdentifier_STATUS_ARM) DeepCopyInto(out *TableSignedIdentifier_STATUS_ARM) { + *out = *in + if in.AccessPolicy != nil { + in, out := &in.AccessPolicy, &out.AccessPolicy + *out = new(TableAccessPolicy_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableSignedIdentifier_STATUS_ARM. +func (in *TableSignedIdentifier_STATUS_ARM) DeepCopy() *TableSignedIdentifier_STATUS_ARM { + if in == nil { + return nil + } + out := new(TableSignedIdentifier_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagFilter) DeepCopyInto(out *TagFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Op != nil { + in, out := &in.Op, &out.Op + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagFilter. +func (in *TagFilter) DeepCopy() *TagFilter { + if in == nil { + return nil + } + out := new(TagFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagFilter_ARM) DeepCopyInto(out *TagFilter_ARM) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Op != nil { + in, out := &in.Op, &out.Op + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagFilter_ARM. +func (in *TagFilter_ARM) DeepCopy() *TagFilter_ARM { + if in == nil { + return nil + } + out := new(TagFilter_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagFilter_STATUS) DeepCopyInto(out *TagFilter_STATUS) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Op != nil { + in, out := &in.Op, &out.Op + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagFilter_STATUS. +func (in *TagFilter_STATUS) DeepCopy() *TagFilter_STATUS { + if in == nil { + return nil + } + out := new(TagFilter_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagFilter_STATUS_ARM) DeepCopyInto(out *TagFilter_STATUS_ARM) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Op != nil { + in, out := &in.Op, &out.Op + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagFilter_STATUS_ARM. +func (in *TagFilter_STATUS_ARM) DeepCopy() *TagFilter_STATUS_ARM { + if in == nil { + return nil + } + out := new(TagFilter_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagProperty_STATUS) DeepCopyInto(out *TagProperty_STATUS) { + *out = *in + if in.ObjectIdentifier != nil { + in, out := &in.ObjectIdentifier, &out.ObjectIdentifier + *out = new(string) + **out = **in + } + if in.Tag != nil { + in, out := &in.Tag, &out.Tag + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Timestamp != nil { + in, out := &in.Timestamp, &out.Timestamp + *out = new(string) + **out = **in + } + if in.Upn != nil { + in, out := &in.Upn, &out.Upn + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagProperty_STATUS. +func (in *TagProperty_STATUS) DeepCopy() *TagProperty_STATUS { + if in == nil { + return nil + } + out := new(TagProperty_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagProperty_STATUS_ARM) DeepCopyInto(out *TagProperty_STATUS_ARM) { + *out = *in + if in.ObjectIdentifier != nil { + in, out := &in.ObjectIdentifier, &out.ObjectIdentifier + *out = new(string) + **out = **in + } + if in.Tag != nil { + in, out := &in.Tag, &out.Tag + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Timestamp != nil { + in, out := &in.Timestamp, &out.Timestamp + *out = new(string) + **out = **in + } + if in.Upn != nil { + in, out := &in.Upn, &out.Upn + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagProperty_STATUS_ARM. +func (in *TagProperty_STATUS_ARM) DeepCopy() *TagProperty_STATUS_ARM { + if in == nil { + return nil + } + out := new(TagProperty_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UpdateHistoryProperty_STATUS) DeepCopyInto(out *UpdateHistoryProperty_STATUS) { + *out = *in + if in.AllowProtectedAppendWrites != nil { + in, out := &in.AllowProtectedAppendWrites, &out.AllowProtectedAppendWrites + *out = new(bool) + **out = **in + } + if in.AllowProtectedAppendWritesAll != nil { + in, out := &in.AllowProtectedAppendWritesAll, &out.AllowProtectedAppendWritesAll + *out = new(bool) + **out = **in + } + if in.ImmutabilityPeriodSinceCreationInDays != nil { + in, out := &in.ImmutabilityPeriodSinceCreationInDays, &out.ImmutabilityPeriodSinceCreationInDays + *out = new(int) + **out = **in + } + if in.ObjectIdentifier != nil { + in, out := &in.ObjectIdentifier, &out.ObjectIdentifier + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Timestamp != nil { + in, out := &in.Timestamp, &out.Timestamp + *out = new(string) + **out = **in + } + if in.Update != nil { + in, out := &in.Update, &out.Update + *out = new(UpdateHistoryProperty_Update_STATUS) + **out = **in + } + if in.Upn != nil { + in, out := &in.Upn, &out.Upn + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateHistoryProperty_STATUS. +func (in *UpdateHistoryProperty_STATUS) DeepCopy() *UpdateHistoryProperty_STATUS { + if in == nil { + return nil + } + out := new(UpdateHistoryProperty_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UpdateHistoryProperty_STATUS_ARM) DeepCopyInto(out *UpdateHistoryProperty_STATUS_ARM) { + *out = *in + if in.AllowProtectedAppendWrites != nil { + in, out := &in.AllowProtectedAppendWrites, &out.AllowProtectedAppendWrites + *out = new(bool) + **out = **in + } + if in.AllowProtectedAppendWritesAll != nil { + in, out := &in.AllowProtectedAppendWritesAll, &out.AllowProtectedAppendWritesAll + *out = new(bool) + **out = **in + } + if in.ImmutabilityPeriodSinceCreationInDays != nil { + in, out := &in.ImmutabilityPeriodSinceCreationInDays, &out.ImmutabilityPeriodSinceCreationInDays + *out = new(int) + **out = **in + } + if in.ObjectIdentifier != nil { + in, out := &in.ObjectIdentifier, &out.ObjectIdentifier + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Timestamp != nil { + in, out := &in.Timestamp, &out.Timestamp + *out = new(string) + **out = **in + } + if in.Update != nil { + in, out := &in.Update, &out.Update + *out = new(UpdateHistoryProperty_Update_STATUS) + **out = **in + } + if in.Upn != nil { + in, out := &in.Upn, &out.Upn + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateHistoryProperty_STATUS_ARM. +func (in *UpdateHistoryProperty_STATUS_ARM) DeepCopy() *UpdateHistoryProperty_STATUS_ARM { + if in == nil { + return nil + } + out := new(UpdateHistoryProperty_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAssignedIdentityDetails) DeepCopyInto(out *UserAssignedIdentityDetails) { + *out = *in + out.Reference = in.Reference +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentityDetails. +func (in *UserAssignedIdentityDetails) DeepCopy() *UserAssignedIdentityDetails { + if in == nil { + return nil + } + out := new(UserAssignedIdentityDetails) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAssignedIdentityDetails_ARM) DeepCopyInto(out *UserAssignedIdentityDetails_ARM) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentityDetails_ARM. +func (in *UserAssignedIdentityDetails_ARM) DeepCopy() *UserAssignedIdentityDetails_ARM { + if in == nil { + return nil + } + out := new(UserAssignedIdentityDetails_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAssignedIdentity_STATUS) DeepCopyInto(out *UserAssignedIdentity_STATUS) { + *out = *in + if in.ClientId != nil { + in, out := &in.ClientId, &out.ClientId + *out = new(string) + **out = **in + } + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentity_STATUS. +func (in *UserAssignedIdentity_STATUS) DeepCopy() *UserAssignedIdentity_STATUS { + if in == nil { + return nil + } + out := new(UserAssignedIdentity_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAssignedIdentity_STATUS_ARM) DeepCopyInto(out *UserAssignedIdentity_STATUS_ARM) { + *out = *in + if in.ClientId != nil { + in, out := &in.ClientId, &out.ClientId + *out = new(string) + **out = **in + } + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentity_STATUS_ARM. +func (in *UserAssignedIdentity_STATUS_ARM) DeepCopy() *UserAssignedIdentity_STATUS_ARM { + if in == nil { + return nil + } + out := new(UserAssignedIdentity_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualNetworkRule) DeepCopyInto(out *VirtualNetworkRule) { + *out = *in + if in.Action != nil { + in, out := &in.Action, &out.Action + *out = new(VirtualNetworkRule_Action) + **out = **in + } + if in.Reference != nil { + in, out := &in.Reference, &out.Reference + *out = new(genruntime.ResourceReference) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(VirtualNetworkRule_State) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualNetworkRule. +func (in *VirtualNetworkRule) DeepCopy() *VirtualNetworkRule { + if in == nil { + return nil + } + out := new(VirtualNetworkRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualNetworkRule_ARM) DeepCopyInto(out *VirtualNetworkRule_ARM) { + *out = *in + if in.Action != nil { + in, out := &in.Action, &out.Action + *out = new(VirtualNetworkRule_Action) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(VirtualNetworkRule_State) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualNetworkRule_ARM. +func (in *VirtualNetworkRule_ARM) DeepCopy() *VirtualNetworkRule_ARM { + if in == nil { + return nil + } + out := new(VirtualNetworkRule_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualNetworkRule_STATUS) DeepCopyInto(out *VirtualNetworkRule_STATUS) { + *out = *in + if in.Action != nil { + in, out := &in.Action, &out.Action + *out = new(VirtualNetworkRule_Action_STATUS) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(VirtualNetworkRule_State_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualNetworkRule_STATUS. +func (in *VirtualNetworkRule_STATUS) DeepCopy() *VirtualNetworkRule_STATUS { + if in == nil { + return nil + } + out := new(VirtualNetworkRule_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualNetworkRule_STATUS_ARM) DeepCopyInto(out *VirtualNetworkRule_STATUS_ARM) { + *out = *in + if in.Action != nil { + in, out := &in.Action, &out.Action + *out = new(VirtualNetworkRule_Action_STATUS) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(VirtualNetworkRule_State_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualNetworkRule_STATUS_ARM. +func (in *VirtualNetworkRule_STATUS_ARM) DeepCopy() *VirtualNetworkRule_STATUS_ARM { + if in == nil { + return nil + } + out := new(VirtualNetworkRule_STATUS_ARM) + in.DeepCopyInto(out) + return out +} diff --git a/v2/api/storage/versions_matrix.md b/v2/api/storage/versions_matrix.md index 90d872e02b9..392d297d1f0 100644 --- a/v2/api/storage/versions_matrix.md +++ b/v2/api/storage/versions_matrix.md @@ -1,243 +1,245 @@ -| Type Definitions in package "storage" | v1api20210401 | v1api20220901 | -|----------------------------------------------------------------------|---------------|---------------| -| APIVersion | v1api20210401 | v1api20220901 | -| AccessPolicy | | v1api20220901 | -| AccessPolicy_STATUS | | v1api20220901 | -| AccountImmutabilityPolicyProperties | | v1api20220901 | -| AccountImmutabilityPolicyProperties_STATUS | | v1api20220901 | -| AccountImmutabilityPolicyProperties_State | | v1api20220901 | -| AccountImmutabilityPolicyProperties_State_STATUS | | v1api20220901 | -| ActiveDirectoryProperties | v1api20210401 | v1api20220901 | -| ActiveDirectoryProperties_AccountType | | v1api20220901 | -| ActiveDirectoryProperties_AccountType_STATUS | | v1api20220901 | -| ActiveDirectoryProperties_STATUS | v1api20210401 | v1api20220901 | -| AzureFilesIdentityBasedAuthentication | v1api20210401 | v1api20220901 | -| AzureFilesIdentityBasedAuthentication_DefaultSharePermission | v1api20210401 | v1api20220901 | -| AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS | v1api20210401 | v1api20220901 | -| AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions | v1api20210401 | v1api20220901 | -| AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS | v1api20210401 | v1api20220901 | -| AzureFilesIdentityBasedAuthentication_STATUS | v1api20210401 | v1api20220901 | -| BlobRestoreParameters_STATUS | v1api20210401 | v1api20220901 | -| BlobRestoreRange_STATUS | v1api20210401 | v1api20220901 | -| BlobRestoreStatus_STATUS | v1api20210401 | v1api20220901 | -| BlobRestoreStatus_Status_STATUS | v1api20210401 | v1api20220901 | -| ChangeFeed | v1api20210401 | v1api20220901 | -| ChangeFeed_STATUS | v1api20210401 | v1api20220901 | -| ContainerProperties | v1api20210401 | v1api20220901 | -| ContainerProperties_LeaseDuration_STATUS | v1api20210401 | v1api20220901 | -| ContainerProperties_LeaseState_STATUS | v1api20210401 | v1api20220901 | -| ContainerProperties_LeaseStatus_STATUS | v1api20210401 | v1api20220901 | -| ContainerProperties_PublicAccess | v1api20210401 | v1api20220901 | -| ContainerProperties_PublicAccess_STATUS | v1api20210401 | v1api20220901 | -| ContainerProperties_STATUS | v1api20210401 | v1api20220901 | -| CorsRule | v1api20210401 | v1api20220901 | -| CorsRule_AllowedMethods | v1api20210401 | v1api20220901 | -| CorsRule_AllowedMethods_STATUS | v1api20210401 | v1api20220901 | -| CorsRule_STATUS | v1api20210401 | v1api20220901 | -| CorsRules | v1api20210401 | v1api20220901 | -| CorsRules_STATUS | v1api20210401 | v1api20220901 | -| CustomDomain | v1api20210401 | v1api20220901 | -| CustomDomain_STATUS | v1api20210401 | v1api20220901 | -| DateAfterCreation | v1api20210401 | v1api20220901 | -| DateAfterCreation_STATUS | v1api20210401 | v1api20220901 | -| DateAfterModification | v1api20210401 | v1api20220901 | -| DateAfterModification_STATUS | v1api20210401 | v1api20220901 | -| DeleteRetentionPolicy | v1api20210401 | v1api20220901 | -| DeleteRetentionPolicy_STATUS | v1api20210401 | v1api20220901 | -| Encryption | v1api20210401 | v1api20220901 | -| EncryptionIdentity | v1api20210401 | v1api20220901 | -| EncryptionIdentity_STATUS | v1api20210401 | v1api20220901 | -| EncryptionService | v1api20210401 | v1api20220901 | -| EncryptionService_KeyType | v1api20210401 | v1api20220901 | -| EncryptionService_KeyType_STATUS | v1api20210401 | v1api20220901 | -| EncryptionService_STATUS | v1api20210401 | v1api20220901 | -| EncryptionServices | v1api20210401 | v1api20220901 | -| EncryptionServices_STATUS | v1api20210401 | v1api20220901 | -| Encryption_KeySource | v1api20210401 | v1api20220901 | -| Encryption_KeySource_STATUS | v1api20210401 | v1api20220901 | -| Encryption_STATUS | v1api20210401 | v1api20220901 | -| Endpoints_STATUS | v1api20210401 | v1api20220901 | -| ExtendedLocation | v1api20210401 | v1api20220901 | -| ExtendedLocationType | v1api20210401 | v1api20220901 | -| ExtendedLocationType_STATUS | v1api20210401 | v1api20220901 | -| ExtendedLocation_STATUS | v1api20210401 | v1api20220901 | -| FileShareProperties | | v1api20220901 | -| FileShareProperties_AccessTier | | v1api20220901 | -| FileShareProperties_AccessTier_STATUS | | v1api20220901 | -| FileShareProperties_EnabledProtocols | | v1api20220901 | -| FileShareProperties_EnabledProtocols_STATUS | | v1api20220901 | -| FileShareProperties_LeaseDuration_STATUS | | v1api20220901 | -| FileShareProperties_LeaseState_STATUS | | v1api20220901 | -| FileShareProperties_LeaseStatus_STATUS | | v1api20220901 | -| FileShareProperties_RootSquash | | v1api20220901 | -| FileShareProperties_RootSquash_STATUS | | v1api20220901 | -| FileShareProperties_STATUS | | v1api20220901 | -| GeoReplicationStats_STATUS | v1api20210401 | v1api20220901 | -| GeoReplicationStats_Status_STATUS | v1api20210401 | v1api20220901 | -| IPRule | v1api20210401 | v1api20220901 | -| IPRule_Action | v1api20210401 | v1api20220901 | -| IPRule_Action_STATUS | v1api20210401 | v1api20220901 | -| IPRule_STATUS | v1api20210401 | v1api20220901 | -| Identity | v1api20210401 | v1api20220901 | -| Identity_STATUS | v1api20210401 | v1api20220901 | -| Identity_Type | v1api20210401 | v1api20220901 | -| Identity_Type_STATUS | v1api20210401 | v1api20220901 | -| ImmutabilityPolicyProperties_STATUS | v1api20210401 | v1api20220901 | -| ImmutabilityPolicyProperty_STATUS | v1api20210401 | v1api20220901 | -| ImmutabilityPolicyProperty_State_STATUS | v1api20210401 | v1api20220901 | -| ImmutableStorageAccount | | v1api20220901 | -| ImmutableStorageAccount_STATUS | | v1api20220901 | -| ImmutableStorageWithVersioning | v1api20210401 | v1api20220901 | -| ImmutableStorageWithVersioning_MigrationState_STATUS | v1api20210401 | v1api20220901 | -| ImmutableStorageWithVersioning_STATUS | v1api20210401 | v1api20220901 | -| KeyCreationTime_STATUS | v1api20210401 | v1api20220901 | -| KeyPolicy | v1api20210401 | v1api20220901 | -| KeyPolicy_STATUS | v1api20210401 | v1api20220901 | -| KeyVaultProperties | v1api20210401 | v1api20220901 | -| KeyVaultProperties_STATUS | v1api20210401 | v1api20220901 | -| LastAccessTimeTrackingPolicy | v1api20210401 | v1api20220901 | -| LastAccessTimeTrackingPolicy_Name | v1api20210401 | v1api20220901 | -| LastAccessTimeTrackingPolicy_Name_STATUS | v1api20210401 | v1api20220901 | -| LastAccessTimeTrackingPolicy_STATUS | v1api20210401 | v1api20220901 | -| LegalHoldProperties_STATUS | v1api20210401 | v1api20220901 | -| ManagementPolicyAction | v1api20210401 | v1api20220901 | -| ManagementPolicyAction_STATUS | v1api20210401 | v1api20220901 | -| ManagementPolicyBaseBlob | v1api20210401 | v1api20220901 | -| ManagementPolicyBaseBlob_STATUS | v1api20210401 | v1api20220901 | -| ManagementPolicyDefinition | v1api20210401 | v1api20220901 | -| ManagementPolicyDefinition_STATUS | v1api20210401 | v1api20220901 | -| ManagementPolicyFilter | v1api20210401 | v1api20220901 | -| ManagementPolicyFilter_STATUS | v1api20210401 | v1api20220901 | -| ManagementPolicyProperties | v1api20210401 | v1api20220901 | -| ManagementPolicyProperties_STATUS | v1api20210401 | v1api20220901 | -| ManagementPolicyRule | v1api20210401 | v1api20220901 | -| ManagementPolicyRule_STATUS | v1api20210401 | v1api20220901 | -| ManagementPolicyRule_Type | v1api20210401 | v1api20220901 | -| ManagementPolicyRule_Type_STATUS | v1api20210401 | v1api20220901 | -| ManagementPolicySchema | v1api20210401 | v1api20220901 | -| ManagementPolicySchema_STATUS | v1api20210401 | v1api20220901 | -| ManagementPolicySnapShot | v1api20210401 | v1api20220901 | -| ManagementPolicySnapShot_STATUS | v1api20210401 | v1api20220901 | -| ManagementPolicyVersion | v1api20210401 | v1api20220901 | -| ManagementPolicyVersion_STATUS | v1api20210401 | v1api20220901 | -| Multichannel | | v1api20220901 | -| Multichannel_STATUS | | v1api20220901 | -| NetworkRuleSet | v1api20210401 | v1api20220901 | -| NetworkRuleSet_Bypass | v1api20210401 | v1api20220901 | -| NetworkRuleSet_Bypass_STATUS | v1api20210401 | v1api20220901 | -| NetworkRuleSet_DefaultAction | v1api20210401 | v1api20220901 | -| NetworkRuleSet_DefaultAction_STATUS | v1api20210401 | v1api20220901 | -| NetworkRuleSet_STATUS | v1api20210401 | v1api20220901 | -| PrivateEndpointConnection_STATUS | v1api20210401 | v1api20220901 | -| ProtectedAppendWritesHistory_STATUS | | v1api20220901 | -| ProtocolSettings | | v1api20220901 | -| ProtocolSettings_STATUS | | v1api20220901 | -| QueueProperties | v1api20210401 | v1api20220901 | -| QueueProperties_STATUS | v1api20210401 | v1api20220901 | -| ResourceAccessRule | v1api20210401 | v1api20220901 | -| ResourceAccessRule_STATUS | v1api20210401 | v1api20220901 | -| RestorePolicyProperties | v1api20210401 | v1api20220901 | -| RestorePolicyProperties_STATUS | v1api20210401 | v1api20220901 | -| RoutingPreference | v1api20210401 | v1api20220901 | -| RoutingPreference_RoutingChoice | v1api20210401 | v1api20220901 | -| RoutingPreference_RoutingChoice_STATUS | v1api20210401 | v1api20220901 | -| RoutingPreference_STATUS | v1api20210401 | v1api20220901 | -| SasPolicy | v1api20210401 | v1api20220901 | -| SasPolicy_ExpirationAction | v1api20210401 | v1api20220901 | -| SasPolicy_ExpirationAction_STATUS | v1api20210401 | v1api20220901 | -| SasPolicy_STATUS | v1api20210401 | v1api20220901 | -| SignedIdentifier | | v1api20220901 | -| SignedIdentifier_STATUS | | v1api20220901 | -| Sku | v1api20210401 | v1api20220901 | -| SkuName | v1api20210401 | v1api20220901 | -| SkuName_STATUS | v1api20210401 | v1api20220901 | -| Sku_STATUS | v1api20210401 | v1api20220901 | -| SmbSetting | | v1api20220901 | -| SmbSetting_STATUS | | v1api20220901 | -| StorageAccount | v1api20210401 | v1api20220901 | -| StorageAccountInternetEndpoints_STATUS | v1api20210401 | v1api20220901 | -| StorageAccountMicrosoftEndpoints_STATUS | v1api20210401 | v1api20220901 | -| StorageAccountPropertiesCreateParameters | v1api20210401 | v1api20220901 | -| StorageAccountPropertiesCreateParameters_AccessTier | v1api20210401 | v1api20220901 | -| StorageAccountPropertiesCreateParameters_AllowedCopyScope | | v1api20220901 | -| StorageAccountPropertiesCreateParameters_DnsEndpointType | | v1api20220901 | -| StorageAccountPropertiesCreateParameters_LargeFileSharesState | v1api20210401 | v1api20220901 | -| StorageAccountPropertiesCreateParameters_MinimumTlsVersion | v1api20210401 | v1api20220901 | -| StorageAccountPropertiesCreateParameters_PublicNetworkAccess | | v1api20220901 | -| StorageAccountProperties_AccessTier_STATUS | v1api20210401 | v1api20220901 | -| StorageAccountProperties_AllowedCopyScope_STATUS | | v1api20220901 | -| StorageAccountProperties_DnsEndpointType_STATUS | | v1api20220901 | -| StorageAccountProperties_LargeFileSharesState_STATUS | v1api20210401 | v1api20220901 | -| StorageAccountProperties_MinimumTlsVersion_STATUS | v1api20210401 | v1api20220901 | -| StorageAccountProperties_ProvisioningState_STATUS | v1api20210401 | v1api20220901 | -| StorageAccountProperties_PublicNetworkAccess_STATUS | | v1api20220901 | -| StorageAccountProperties_STATUS | v1api20210401 | v1api20220901 | -| StorageAccountProperties_StatusOfPrimary_STATUS | v1api20210401 | v1api20220901 | -| StorageAccountProperties_StatusOfSecondary_STATUS | v1api20210401 | v1api20220901 | -| StorageAccountSkuConversionStatus_STATUS | | v1api20220901 | -| StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS | | v1api20220901 | -| StorageAccount_Kind_STATUS | v1api20210401 | v1api20220901 | -| StorageAccount_Kind_Spec | v1api20210401 | v1api20220901 | -| StorageAccount_STATUS | v1api20210401 | v1api20220901 | -| StorageAccount_Spec | v1api20210401 | v1api20220901 | -| StorageAccountsBlobService | v1api20210401 | v1api20220901 | -| StorageAccountsBlobServicesContainer | v1api20210401 | v1api20220901 | -| StorageAccountsFileService | | v1api20220901 | -| StorageAccountsFileServicesShare | | v1api20220901 | -| StorageAccountsManagementPolicy | v1api20210401 | v1api20220901 | -| StorageAccountsQueueService | v1api20210401 | v1api20220901 | -| StorageAccountsQueueServicesQueue | v1api20210401 | v1api20220901 | -| StorageAccountsTableService | | v1api20220901 | -| StorageAccountsTableServicesTable | | v1api20220901 | -| StorageAccounts_BlobService_Name_Spec | v1api20210401 | v1api20220901 | -| StorageAccounts_BlobService_Properties_STATUS | v1api20210401 | v1api20220901 | -| StorageAccounts_BlobService_Properties_Spec | v1api20210401 | v1api20220901 | -| StorageAccounts_BlobService_STATUS | v1api20210401 | v1api20220901 | -| StorageAccounts_BlobService_Spec | v1api20210401 | v1api20220901 | -| StorageAccounts_BlobServices_Container_STATUS | v1api20210401 | v1api20220901 | -| StorageAccounts_BlobServices_Container_Spec | v1api20210401 | v1api20220901 | -| StorageAccounts_FileService_Name_Spec | | v1api20220901 | -| StorageAccounts_FileService_Properties_STATUS | | v1api20220901 | -| StorageAccounts_FileService_Properties_Spec | | v1api20220901 | -| StorageAccounts_FileService_STATUS | | v1api20220901 | -| StorageAccounts_FileService_Spec | | v1api20220901 | -| StorageAccounts_FileServices_Share_STATUS | | v1api20220901 | -| StorageAccounts_FileServices_Share_Spec | | v1api20220901 | -| StorageAccounts_ManagementPolicy_Name_Spec | v1api20210401 | v1api20220901 | -| StorageAccounts_ManagementPolicy_STATUS | v1api20210401 | v1api20220901 | -| StorageAccounts_ManagementPolicy_Spec | v1api20210401 | v1api20220901 | -| StorageAccounts_QueueService_Name_Spec | v1api20210401 | v1api20220901 | -| StorageAccounts_QueueService_Properties_STATUS | v1api20210401 | v1api20220901 | -| StorageAccounts_QueueService_Properties_Spec | v1api20210401 | v1api20220901 | -| StorageAccounts_QueueService_STATUS | v1api20210401 | v1api20220901 | -| StorageAccounts_QueueService_Spec | v1api20210401 | v1api20220901 | -| StorageAccounts_QueueServices_Queue_STATUS | v1api20210401 | v1api20220901 | -| StorageAccounts_QueueServices_Queue_Spec | v1api20210401 | v1api20220901 | -| StorageAccounts_TableService_Name_Spec | | v1api20220901 | -| StorageAccounts_TableService_Properties_STATUS | | v1api20220901 | -| StorageAccounts_TableService_Properties_Spec | | v1api20220901 | -| StorageAccounts_TableService_STATUS | | v1api20220901 | -| StorageAccounts_TableService_Spec | | v1api20220901 | -| StorageAccounts_TableServices_Table_STATUS | | v1api20220901 | -| StorageAccounts_TableServices_Table_Spec | | v1api20220901 | -| TableAccessPolicy | | v1api20220901 | -| TableAccessPolicy_STATUS | | v1api20220901 | -| TableProperties | | v1api20220901 | -| TableProperties_STATUS | | v1api20220901 | -| TableSignedIdentifier | | v1api20220901 | -| TableSignedIdentifier_STATUS | | v1api20220901 | -| TagFilter | v1api20210401 | v1api20220901 | -| TagFilter_STATUS | v1api20210401 | v1api20220901 | -| TagProperty_STATUS | v1api20210401 | v1api20220901 | -| Tier | v1api20210401 | v1api20220901 | -| Tier_STATUS | v1api20210401 | v1api20220901 | -| UpdateHistoryProperty_STATUS | v1api20210401 | v1api20220901 | -| UpdateHistoryProperty_Update_STATUS | v1api20210401 | v1api20220901 | -| UserAssignedIdentityDetails | v1api20210401 | v1api20220901 | -| UserAssignedIdentity_STATUS | v1api20210401 | v1api20220901 | -| VirtualNetworkRule | v1api20210401 | v1api20220901 | -| VirtualNetworkRule_Action | v1api20210401 | v1api20220901 | -| VirtualNetworkRule_Action_STATUS | v1api20210401 | v1api20220901 | -| VirtualNetworkRule_STATUS | v1api20210401 | v1api20220901 | -| VirtualNetworkRule_State | v1api20210401 | v1api20220901 | -| VirtualNetworkRule_State_STATUS | v1api20210401 | v1api20220901 | +| Type Definitions in package "storage" | v1api20210401 | v1api20220901 | v1api20230101 | +|----------------------------------------------------------------------|---------------|---------------|---------------| +| APIVersion | v1api20210401 | v1api20220901 | v1api20230101 | +| AccessPolicy | | v1api20220901 | v1api20230101 | +| AccessPolicy_STATUS | | v1api20220901 | v1api20230101 | +| AccountImmutabilityPolicyProperties | | v1api20220901 | v1api20230101 | +| AccountImmutabilityPolicyProperties_STATUS | | v1api20220901 | v1api20230101 | +| AccountImmutabilityPolicyProperties_State | | v1api20220901 | v1api20230101 | +| AccountImmutabilityPolicyProperties_State_STATUS | | v1api20220901 | v1api20230101 | +| ActiveDirectoryProperties | v1api20210401 | v1api20220901 | v1api20230101 | +| ActiveDirectoryProperties_AccountType | | v1api20220901 | v1api20230101 | +| ActiveDirectoryProperties_AccountType_STATUS | | v1api20220901 | v1api20230101 | +| ActiveDirectoryProperties_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| AzureFilesIdentityBasedAuthentication | v1api20210401 | v1api20220901 | v1api20230101 | +| AzureFilesIdentityBasedAuthentication_DefaultSharePermission | v1api20210401 | v1api20220901 | v1api20230101 | +| AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions | v1api20210401 | v1api20220901 | v1api20230101 | +| AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| AzureFilesIdentityBasedAuthentication_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| BlobRestoreParameters_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| BlobRestoreRange_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| BlobRestoreStatus_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| BlobRestoreStatus_Status_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ChangeFeed | v1api20210401 | v1api20220901 | v1api20230101 | +| ChangeFeed_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ContainerProperties | v1api20210401 | v1api20220901 | v1api20230101 | +| ContainerProperties_LeaseDuration_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ContainerProperties_LeaseState_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ContainerProperties_LeaseStatus_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ContainerProperties_PublicAccess | v1api20210401 | v1api20220901 | v1api20230101 | +| ContainerProperties_PublicAccess_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ContainerProperties_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| CorsRule | v1api20210401 | v1api20220901 | v1api20230101 | +| CorsRule_AllowedMethods | v1api20210401 | v1api20220901 | v1api20230101 | +| CorsRule_AllowedMethods_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| CorsRule_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| CorsRules | v1api20210401 | v1api20220901 | v1api20230101 | +| CorsRules_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| CustomDomain | v1api20210401 | v1api20220901 | v1api20230101 | +| CustomDomain_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| DateAfterCreation | v1api20210401 | v1api20220901 | v1api20230101 | +| DateAfterCreation_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| DateAfterModification | v1api20210401 | v1api20220901 | v1api20230101 | +| DateAfterModification_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| DeleteRetentionPolicy | v1api20210401 | v1api20220901 | v1api20230101 | +| DeleteRetentionPolicy_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| Encryption | v1api20210401 | v1api20220901 | v1api20230101 | +| EncryptionIdentity | v1api20210401 | v1api20220901 | v1api20230101 | +| EncryptionIdentity_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| EncryptionService | v1api20210401 | v1api20220901 | v1api20230101 | +| EncryptionService_KeyType | v1api20210401 | v1api20220901 | v1api20230101 | +| EncryptionService_KeyType_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| EncryptionService_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| EncryptionServices | v1api20210401 | v1api20220901 | v1api20230101 | +| EncryptionServices_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| Encryption_KeySource | v1api20210401 | v1api20220901 | v1api20230101 | +| Encryption_KeySource_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| Encryption_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| Endpoints_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ExtendedLocation | v1api20210401 | v1api20220901 | v1api20230101 | +| ExtendedLocationType | v1api20210401 | v1api20220901 | v1api20230101 | +| ExtendedLocationType_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ExtendedLocation_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| FileShareProperties | | v1api20220901 | v1api20230101 | +| FileShareProperties_AccessTier | | v1api20220901 | v1api20230101 | +| FileShareProperties_AccessTier_STATUS | | v1api20220901 | v1api20230101 | +| FileShareProperties_EnabledProtocols | | v1api20220901 | v1api20230101 | +| FileShareProperties_EnabledProtocols_STATUS | | v1api20220901 | v1api20230101 | +| FileShareProperties_LeaseDuration_STATUS | | v1api20220901 | v1api20230101 | +| FileShareProperties_LeaseState_STATUS | | v1api20220901 | v1api20230101 | +| FileShareProperties_LeaseStatus_STATUS | | v1api20220901 | v1api20230101 | +| FileShareProperties_RootSquash | | v1api20220901 | v1api20230101 | +| FileShareProperties_RootSquash_STATUS | | v1api20220901 | v1api20230101 | +| FileShareProperties_STATUS | | v1api20220901 | v1api20230101 | +| GeoReplicationStats_PostFailoverRedundancy_STATUS | | | v1api20230101 | +| GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS | | | v1api20230101 | +| GeoReplicationStats_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| GeoReplicationStats_Status_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| IPRule | v1api20210401 | v1api20220901 | v1api20230101 | +| IPRule_Action | v1api20210401 | v1api20220901 | v1api20230101 | +| IPRule_Action_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| IPRule_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| Identity | v1api20210401 | v1api20220901 | v1api20230101 | +| Identity_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| Identity_Type | v1api20210401 | v1api20220901 | v1api20230101 | +| Identity_Type_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ImmutabilityPolicyProperties_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ImmutabilityPolicyProperty_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ImmutabilityPolicyProperty_State_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ImmutableStorageAccount | | v1api20220901 | v1api20230101 | +| ImmutableStorageAccount_STATUS | | v1api20220901 | v1api20230101 | +| ImmutableStorageWithVersioning | v1api20210401 | v1api20220901 | v1api20230101 | +| ImmutableStorageWithVersioning_MigrationState_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ImmutableStorageWithVersioning_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| KeyCreationTime_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| KeyPolicy | v1api20210401 | v1api20220901 | v1api20230101 | +| KeyPolicy_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| KeyVaultProperties | v1api20210401 | v1api20220901 | v1api20230101 | +| KeyVaultProperties_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| LastAccessTimeTrackingPolicy | v1api20210401 | v1api20220901 | v1api20230101 | +| LastAccessTimeTrackingPolicy_Name | v1api20210401 | v1api20220901 | v1api20230101 | +| LastAccessTimeTrackingPolicy_Name_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| LastAccessTimeTrackingPolicy_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| LegalHoldProperties_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyAction | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyAction_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyBaseBlob | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyBaseBlob_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyDefinition | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyDefinition_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyFilter | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyFilter_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyProperties | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyProperties_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyRule | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyRule_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyRule_Type | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyRule_Type_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicySchema | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicySchema_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicySnapShot | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicySnapShot_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyVersion | v1api20210401 | v1api20220901 | v1api20230101 | +| ManagementPolicyVersion_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| Multichannel | | v1api20220901 | v1api20230101 | +| Multichannel_STATUS | | v1api20220901 | v1api20230101 | +| NetworkRuleSet | v1api20210401 | v1api20220901 | v1api20230101 | +| NetworkRuleSet_Bypass | v1api20210401 | v1api20220901 | v1api20230101 | +| NetworkRuleSet_Bypass_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| NetworkRuleSet_DefaultAction | v1api20210401 | v1api20220901 | v1api20230101 | +| NetworkRuleSet_DefaultAction_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| NetworkRuleSet_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| PrivateEndpointConnection_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ProtectedAppendWritesHistory_STATUS | | v1api20220901 | v1api20230101 | +| ProtocolSettings | | v1api20220901 | v1api20230101 | +| ProtocolSettings_STATUS | | v1api20220901 | v1api20230101 | +| QueueProperties | v1api20210401 | v1api20220901 | v1api20230101 | +| QueueProperties_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| ResourceAccessRule | v1api20210401 | v1api20220901 | v1api20230101 | +| ResourceAccessRule_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| RestorePolicyProperties | v1api20210401 | v1api20220901 | v1api20230101 | +| RestorePolicyProperties_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| RoutingPreference | v1api20210401 | v1api20220901 | v1api20230101 | +| RoutingPreference_RoutingChoice | v1api20210401 | v1api20220901 | v1api20230101 | +| RoutingPreference_RoutingChoice_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| RoutingPreference_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| SasPolicy | v1api20210401 | v1api20220901 | v1api20230101 | +| SasPolicy_ExpirationAction | v1api20210401 | v1api20220901 | v1api20230101 | +| SasPolicy_ExpirationAction_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| SasPolicy_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| SignedIdentifier | | v1api20220901 | v1api20230101 | +| SignedIdentifier_STATUS | | v1api20220901 | v1api20230101 | +| Sku | v1api20210401 | v1api20220901 | v1api20230101 | +| SkuName | v1api20210401 | v1api20220901 | v1api20230101 | +| SkuName_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| Sku_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| SmbSetting | | v1api20220901 | v1api20230101 | +| SmbSetting_STATUS | | v1api20220901 | v1api20230101 | +| StorageAccount | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountInternetEndpoints_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountMicrosoftEndpoints_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountPropertiesCreateParameters | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountPropertiesCreateParameters_AccessTier | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountPropertiesCreateParameters_AllowedCopyScope | | v1api20220901 | v1api20230101 | +| StorageAccountPropertiesCreateParameters_DnsEndpointType | | v1api20220901 | v1api20230101 | +| StorageAccountPropertiesCreateParameters_LargeFileSharesState | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountPropertiesCreateParameters_MinimumTlsVersion | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountPropertiesCreateParameters_PublicNetworkAccess | | v1api20220901 | v1api20230101 | +| StorageAccountProperties_AccessTier_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountProperties_AllowedCopyScope_STATUS | | v1api20220901 | v1api20230101 | +| StorageAccountProperties_DnsEndpointType_STATUS | | v1api20220901 | v1api20230101 | +| StorageAccountProperties_LargeFileSharesState_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountProperties_MinimumTlsVersion_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountProperties_ProvisioningState_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountProperties_PublicNetworkAccess_STATUS | | v1api20220901 | v1api20230101 | +| StorageAccountProperties_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountProperties_StatusOfPrimary_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountProperties_StatusOfSecondary_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountSkuConversionStatus_STATUS | | v1api20220901 | v1api20230101 | +| StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS | | v1api20220901 | v1api20230101 | +| StorageAccount_Kind_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccount_Kind_Spec | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccount_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccount_Spec | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountsBlobService | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountsBlobServicesContainer | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountsFileService | | v1api20220901 | v1api20230101 | +| StorageAccountsFileServicesShare | | v1api20220901 | v1api20230101 | +| StorageAccountsManagementPolicy | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountsQueueService | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountsQueueServicesQueue | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccountsTableService | | v1api20220901 | v1api20230101 | +| StorageAccountsTableServicesTable | | v1api20220901 | v1api20230101 | +| StorageAccounts_BlobService_Name_Spec | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_BlobService_Properties_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_BlobService_Properties_Spec | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_BlobService_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_BlobService_Spec | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_BlobServices_Container_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_BlobServices_Container_Spec | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_FileService_Name_Spec | | v1api20220901 | v1api20230101 | +| StorageAccounts_FileService_Properties_STATUS | | v1api20220901 | v1api20230101 | +| StorageAccounts_FileService_Properties_Spec | | v1api20220901 | v1api20230101 | +| StorageAccounts_FileService_STATUS | | v1api20220901 | v1api20230101 | +| StorageAccounts_FileService_Spec | | v1api20220901 | v1api20230101 | +| StorageAccounts_FileServices_Share_STATUS | | v1api20220901 | v1api20230101 | +| StorageAccounts_FileServices_Share_Spec | | v1api20220901 | v1api20230101 | +| StorageAccounts_ManagementPolicy_Name_Spec | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_ManagementPolicy_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_ManagementPolicy_Spec | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_QueueService_Name_Spec | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_QueueService_Properties_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_QueueService_Properties_Spec | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_QueueService_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_QueueService_Spec | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_QueueServices_Queue_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_QueueServices_Queue_Spec | v1api20210401 | v1api20220901 | v1api20230101 | +| StorageAccounts_TableService_Name_Spec | | v1api20220901 | v1api20230101 | +| StorageAccounts_TableService_Properties_STATUS | | v1api20220901 | v1api20230101 | +| StorageAccounts_TableService_Properties_Spec | | v1api20220901 | v1api20230101 | +| StorageAccounts_TableService_STATUS | | v1api20220901 | v1api20230101 | +| StorageAccounts_TableService_Spec | | v1api20220901 | v1api20230101 | +| StorageAccounts_TableServices_Table_STATUS | | v1api20220901 | v1api20230101 | +| StorageAccounts_TableServices_Table_Spec | | v1api20220901 | v1api20230101 | +| TableAccessPolicy | | v1api20220901 | v1api20230101 | +| TableAccessPolicy_STATUS | | v1api20220901 | v1api20230101 | +| TableProperties | | v1api20220901 | v1api20230101 | +| TableProperties_STATUS | | v1api20220901 | v1api20230101 | +| TableSignedIdentifier | | v1api20220901 | v1api20230101 | +| TableSignedIdentifier_STATUS | | v1api20220901 | v1api20230101 | +| TagFilter | v1api20210401 | v1api20220901 | v1api20230101 | +| TagFilter_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| TagProperty_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| Tier | v1api20210401 | v1api20220901 | v1api20230101 | +| Tier_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| UpdateHistoryProperty_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| UpdateHistoryProperty_Update_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| UserAssignedIdentityDetails | v1api20210401 | v1api20220901 | v1api20230101 | +| UserAssignedIdentity_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| VirtualNetworkRule | v1api20210401 | v1api20220901 | v1api20230101 | +| VirtualNetworkRule_Action | v1api20210401 | v1api20220901 | v1api20230101 | +| VirtualNetworkRule_Action_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| VirtualNetworkRule_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | +| VirtualNetworkRule_State | v1api20210401 | v1api20220901 | v1api20230101 | +| VirtualNetworkRule_State_STATUS | v1api20210401 | v1api20220901 | v1api20230101 | diff --git a/v2/azure-arm.yaml b/v2/azure-arm.yaml index 09f5a37c44b..da1934ee979 100644 --- a/v2/azure-arm.yaml +++ b/v2/azure-arm.yaml @@ -2442,6 +2442,68 @@ objectModelConfiguration: SignedIdentifier: Id: $armReference: true + 2023-01-01: + StorageAccount: + $export: true + $supportedFrom: v2.5.0 + $azureGeneratedSecrets: + - Key1 + - Key2 + - WebEndpoint + - BlobEndpoint + - FileEndpoint + - QueueEndpoint + - TableEndpoint + - DfsEndpoint + $generatedConfigs: + WebEndpoint: $.Status.PrimaryEndpoints.Web + BlobEndpoint: $.Status.PrimaryEndpoints.Blob + FileEndpoint: $.Status.PrimaryEndpoints.File + QueueEndpoint: $.Status.PrimaryEndpoints.Queue + TableEndpoint: $.Status.PrimaryEndpoints.Table + DfsEndpoint: $.Status.PrimaryEndpoints.Dfs + StorageAccounts_BlobService: + $exportAs: StorageAccountsBlobService + $supportedFrom: v2.5.0 + StorageAccounts_BlobServices_Container: + $exportAs: StorageAccountsBlobServicesContainer + $supportedFrom: v2.5.0 + StorageAccounts_QueueService: + $exportAs: StorageAccountsQueueService + $supportedFrom: v2.5.0 + StorageAccounts_QueueServices_Queue: + $exportAs: StorageAccountsQueueServicesQueue + $supportedFrom: v2.5.0 + StorageAccounts_ManagementPolicy: + $exportAs: StorageAccountsManagementPolicy + $supportedFrom: v2.5.0 + VirtualNetworkRule: + Id: + $armReference: true + EncryptionIdentity: + UserAssignedIdentity: + $armReference: true + ResourceAccessRule: + ResourceId: + $armReference: true + StorageAccounts_TableService: + $exportAs: StorageAccountsTableService + $supportedFrom: v2.5.0 + StorageAccounts_TableServices_Table: + $exportAs: StorageAccountsTableServicesTable + $supportedFrom: v2.5.0 + TableSignedIdentifier: + Id: + $armReference: true + StorageAccounts_FileService: + $exportAs: StorageAccountsFileService + $supportedFrom: v2.5.0 + StorageAccounts_FileServices_Share: + $exportAs: StorageAccountsFileServicesShare + $supportedFrom: v2.5.0 + SignedIdentifier: + Id: + $armReference: true subscription: 2021-10-01: Alias: diff --git a/v2/cmd/asoctl/internal/importing/importable_arm_resource_test.go b/v2/cmd/asoctl/internal/importing/importable_arm_resource_test.go index b2dc3035d15..c84181ae580 100644 --- a/v2/cmd/asoctl/internal/importing/importable_arm_resource_test.go +++ b/v2/cmd/asoctl/internal/importing/importable_arm_resource_test.go @@ -104,7 +104,7 @@ func Test_ARMResourceImporter_GroupVersionKindFromARMID(t *testing.T) { armId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aso-rg/providers/Microsoft.Storage/storageAccounts/aso-storage", expectedGroup: "storage.azure.com", expectedKind: "StorageAccount", - expectedVersion: "v1api20220901", + expectedVersion: "v1api20230101", }, { name: "managed cluster", diff --git a/v2/internal/controllers/controller_resources_gen.go b/v2/internal/controllers/controller_resources_gen.go index ccb08714375..482a705dada 100644 --- a/v2/internal/controllers/controller_resources_gen.go +++ b/v2/internal/controllers/controller_resources_gen.go @@ -158,6 +158,8 @@ import ( storage_v20210401s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage" storage_v20220901 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901" storage_v20220901s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901/storage" + storage_v20230101 "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101" + storage_v20230101s "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage" subscription_customizations "github.com/Azure/azure-service-operator/v2/api/subscription/customizations" subscription_v20211001 "github.com/Azure/azure-service-operator/v2/api/subscription/v1api20211001" subscription_v20211001s "github.com/Azure/azure-service-operator/v2/api/subscription/v1api20211001/storage" @@ -918,16 +920,16 @@ func getKnownStorageTypes() []*registration.StorageType { }, }, }) - result = append(result, ®istration.StorageType{Obj: new(storage_v20220901s.StorageAccount)}) - result = append(result, ®istration.StorageType{Obj: new(storage_v20220901s.StorageAccountsBlobService)}) - result = append(result, ®istration.StorageType{Obj: new(storage_v20220901s.StorageAccountsBlobServicesContainer)}) - result = append(result, ®istration.StorageType{Obj: new(storage_v20220901s.StorageAccountsFileService)}) - result = append(result, ®istration.StorageType{Obj: new(storage_v20220901s.StorageAccountsFileServicesShare)}) - result = append(result, ®istration.StorageType{Obj: new(storage_v20220901s.StorageAccountsManagementPolicy)}) - result = append(result, ®istration.StorageType{Obj: new(storage_v20220901s.StorageAccountsQueueService)}) - result = append(result, ®istration.StorageType{Obj: new(storage_v20220901s.StorageAccountsQueueServicesQueue)}) - result = append(result, ®istration.StorageType{Obj: new(storage_v20220901s.StorageAccountsTableService)}) - result = append(result, ®istration.StorageType{Obj: new(storage_v20220901s.StorageAccountsTableServicesTable)}) + result = append(result, ®istration.StorageType{Obj: new(storage_v20230101s.StorageAccount)}) + result = append(result, ®istration.StorageType{Obj: new(storage_v20230101s.StorageAccountsBlobService)}) + result = append(result, ®istration.StorageType{Obj: new(storage_v20230101s.StorageAccountsBlobServicesContainer)}) + result = append(result, ®istration.StorageType{Obj: new(storage_v20230101s.StorageAccountsFileService)}) + result = append(result, ®istration.StorageType{Obj: new(storage_v20230101s.StorageAccountsFileServicesShare)}) + result = append(result, ®istration.StorageType{Obj: new(storage_v20230101s.StorageAccountsManagementPolicy)}) + result = append(result, ®istration.StorageType{Obj: new(storage_v20230101s.StorageAccountsQueueService)}) + result = append(result, ®istration.StorageType{Obj: new(storage_v20230101s.StorageAccountsQueueServicesQueue)}) + result = append(result, ®istration.StorageType{Obj: new(storage_v20230101s.StorageAccountsTableService)}) + result = append(result, ®istration.StorageType{Obj: new(storage_v20230101s.StorageAccountsTableServicesTable)}) result = append(result, ®istration.StorageType{Obj: new(subscription_v20211001s.Alias)}) result = append(result, ®istration.StorageType{ Obj: new(synapse_v20210601s.Workspace), @@ -1481,6 +1483,30 @@ func getKnownTypes() []client.Object { new(storage_v20220901s.StorageAccountsQueueServicesQueue), new(storage_v20220901s.StorageAccountsTableService), new(storage_v20220901s.StorageAccountsTableServicesTable)) + result = append( + result, + new(storage_v20230101.StorageAccount), + new(storage_v20230101.StorageAccountsBlobService), + new(storage_v20230101.StorageAccountsBlobServicesContainer), + new(storage_v20230101.StorageAccountsFileService), + new(storage_v20230101.StorageAccountsFileServicesShare), + new(storage_v20230101.StorageAccountsManagementPolicy), + new(storage_v20230101.StorageAccountsQueueService), + new(storage_v20230101.StorageAccountsQueueServicesQueue), + new(storage_v20230101.StorageAccountsTableService), + new(storage_v20230101.StorageAccountsTableServicesTable)) + result = append( + result, + new(storage_v20230101s.StorageAccount), + new(storage_v20230101s.StorageAccountsBlobService), + new(storage_v20230101s.StorageAccountsBlobServicesContainer), + new(storage_v20230101s.StorageAccountsFileService), + new(storage_v20230101s.StorageAccountsFileServicesShare), + new(storage_v20230101s.StorageAccountsManagementPolicy), + new(storage_v20230101s.StorageAccountsQueueService), + new(storage_v20230101s.StorageAccountsQueueServicesQueue), + new(storage_v20230101s.StorageAccountsTableService), + new(storage_v20230101s.StorageAccountsTableServicesTable)) result = append(result, new(subscription_v20211001.Alias)) result = append(result, new(subscription_v20211001s.Alias)) result = append(result, new(synapse_v20210601.Workspace), new(synapse_v20210601.WorkspacesBigDataPool)) @@ -1616,6 +1642,8 @@ func createScheme() *runtime.Scheme { _ = storage_v20210401s.AddToScheme(scheme) _ = storage_v20220901.AddToScheme(scheme) _ = storage_v20220901s.AddToScheme(scheme) + _ = storage_v20230101.AddToScheme(scheme) + _ = storage_v20230101s.AddToScheme(scheme) _ = subscription_v20211001.AddToScheme(scheme) _ = subscription_v20211001s.AddToScheme(scheme) _ = synapse_v20210601.AddToScheme(scheme) diff --git a/v2/internal/controllers/crd_storage_storageaccount_20220901_test.go b/v2/internal/controllers/crd_storage_storageaccount_20230101_test.go similarity index 97% rename from v2/internal/controllers/crd_storage_storageaccount_20220901_test.go rename to v2/internal/controllers/crd_storage_storageaccount_20230101_test.go index 6c0e36f7190..29821ef1b66 100644 --- a/v2/internal/controllers/crd_storage_storageaccount_20220901_test.go +++ b/v2/internal/controllers/crd_storage_storageaccount_20230101_test.go @@ -13,20 +13,20 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" resources "github.com/Azure/azure-service-operator/v2/api/resources/v1api20200601" - storage "github.com/Azure/azure-service-operator/v2/api/storage/v1api20220901" + storage "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101" "github.com/Azure/azure-service-operator/v2/internal/testcommon" "github.com/Azure/azure-service-operator/v2/internal/util/to" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) -func Test_Storage_StorageAccount_20220901_CRUD(t *testing.T) { +func Test_Storage_StorageAccount_20230101_CRUD(t *testing.T) { t.Parallel() tc := globalTestContext.ForTest(t) rg := tc.CreateTestResourceGroupAndWait() - acct := newStorageAccount20220901(tc, rg) + acct := newStorageAccount20230101(tc, rg) tc.CreateResourceAndWait(acct) @@ -210,14 +210,14 @@ func StorageAccount_FileServices_Share_CRUD(tc *testcommon.KubePerTestContext, f defer tc.DeleteResourceAndWait(share) } -func Test_Storage_StorageAccount_SecretsFromAzure(t *testing.T) { +func Test_Storage_StorageAccount_20230101_SecretsFromAzure(t *testing.T) { t.Parallel() tc := globalTestContext.ForTest(t) rg := tc.CreateTestResourceGroupAndWait() // Initially with no OperatorSpec.Secrets, to ensure no secrets are created - acct := newStorageAccount20220901(tc, rg) + acct := newStorageAccount20230101(tc, rg) tc.CreateResourceAndWait(acct) @@ -373,7 +373,7 @@ func StorageAccount_ManagementPolicy_CRUD(tc *testcommon.KubePerTestContext, blo defer tc.DeleteResourceAndWait(managementPolicy) } -func newStorageAccount20220901(tc *testcommon.KubePerTestContext, rg *resources.ResourceGroup) *storage.StorageAccount { +func newStorageAccount20230101(tc *testcommon.KubePerTestContext, rg *resources.ResourceGroup) *storage.StorageAccount { // Create a storage account acct := &storage.StorageAccount{ ObjectMeta: tc.MakeObjectMetaWithName(tc.NoSpaceNamer.GenerateName("stor")), diff --git a/v2/internal/controllers/owner_arm_id_negative_test.go b/v2/internal/controllers/owner_arm_id_negative_test.go index b4e6a07034d..53edc690d6d 100644 --- a/v2/internal/controllers/owner_arm_id_negative_test.go +++ b/v2/internal/controllers/owner_arm_id_negative_test.go @@ -27,7 +27,7 @@ func Test_OwnerIsARMIDSetWithName_Rejected(t *testing.T) { armID := *rg.Status.Id // Now create a storage account - acct := newStorageAccount20220901(tc, rg) + acct := newStorageAccount20230101(tc, rg) acct.Spec.Owner.ARMID = armID // Create the storage account from ARM ID @@ -44,7 +44,7 @@ func Test_OwnerIsARMIDOfWrongType_Rejected(t *testing.T) { badARMID := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachines/myvm", tc.AzureSubscription, "nonexistrg") // Now create a storage account - acct := newStorageAccount20220901(tc, rg) + acct := newStorageAccount20230101(tc, rg) acct.Spec.Owner = testcommon.AsARMIDOwner(badARMID) // Create the storage account from ARM ID @@ -69,7 +69,7 @@ func Test_OwnerIsARMIDFromDifferentSubscription_ResourceFails(t *testing.T) { scopedCredentialName := "other-subscription-secret" // Now create a storage account - acct := newStorageAccount20220901(tc, rg) + acct := newStorageAccount20230101(tc, rg) acct.Spec.Owner = testcommon.AsARMIDOwner(armID) acct.Annotations = map[string]string{annotations.PerResourceSecret: scopedCredentialName} diff --git a/v2/internal/controllers/owner_arm_id_test.go b/v2/internal/controllers/owner_arm_id_test.go index 773be7b2486..ce0e435b0ad 100644 --- a/v2/internal/controllers/owner_arm_id_test.go +++ b/v2/internal/controllers/owner_arm_id_test.go @@ -30,7 +30,7 @@ func Test_OwnerIsARMIDOfResourceGroup_ResourceSuccessfullyReconciled(t *testing. armID := *rg.Status.Id // Now create a storage account - acct := newStorageAccount20220901(tc, rg) + acct := newStorageAccount20230101(tc, rg) acct.Spec.Owner = testcommon.AsARMIDOwner(armID) // Create the storage account from ARM ID @@ -63,7 +63,7 @@ func Test_OwnerIsARMIDOfParent_ChildResourceSuccessfullyReconciled(t *testing.T) rg := tc.CreateTestResourceGroupAndWait() // Now create a storage account - acct := newStorageAccount20220901(tc, rg) + acct := newStorageAccount20230101(tc, rg) tc.CreateResourceAndWait(acct) // and a blob service diff --git a/v2/internal/controllers/recordings/Test_OwnerIsARMIDFromDifferentSubscription_ResourceFails.yaml b/v2/internal/controllers/recordings/Test_OwnerIsARMIDFromDifferentSubscription_ResourceFails.yaml index 7fd5b2439ce..099704dd859 100644 --- a/v2/internal/controllers/recordings/Test_OwnerIsARMIDFromDifferentSubscription_ResourceFails.yaml +++ b/v2/internal/controllers/recordings/Test_OwnerIsARMIDFromDifferentSubscription_ResourceFails.yaml @@ -35,9 +35,9 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 3E3991FF49934EC3B0B51744865B85D6 Ref B: CO6AA3150219031 Ref C: 2023-09-01T21:27:05Z' - status: 200 OK - code: 200 + - 'Ref A: F66590153E6C4156ABB9D5376ABFF5F9 Ref B: CO6AA3150219019 Ref C: 2023-11-28T18:50:12Z' + status: 201 Created + code: 201 duration: "" - request: body: "" @@ -69,7 +69,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 532FE37ABA27462CB4DCFBA2E1779092 Ref B: CO6AA3150219031 Ref C: 2023-09-01T21:27:05Z' + - 'Ref A: A534FC6B9B69441793F7DC00A9D9B0BD Ref B: CO6AA3150219019 Ref C: 2023-11-28T18:50:12Z' status: 200 OK code: 200 duration: "" @@ -93,7 +93,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRGTlNCRUYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRGTlNCRUYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367942203763579&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=e3GAS0BGgFHGk8df3tQxkcpaAQWhSTHRMZUOM_g03l0Horm7EcYFRGJUFiugwcwW5YxEEJPLCqIC9YUyZ_MgGO7EV1pirInfVAfGG_BygXKx8JorUpr12JH473XrtdmqHneDOwDT_YTHzsGgrx-ZXIQxzXVJPTkgIJOrxBVOOTHyPSYLJHBax1SalmDtL6pGSbpuYFBLfQ73Rp99BM4Hrd6rv_jS8jffnevx4OJARZtnuyXXzPwLWd83JTfycdywL7uHjivrcmWvAd9k0fW9MPNsmGdfpcZUQRYHeNxcKQXpRnv7Y5jF22lTMjjDES8fc93Y2_BrWg6iltlHcohZUg&h=2j1CsrYkbV1eLlhUIr2pm0Io1APKkgq1SKb4H3klgL4 Pragma: - no-cache Retry-After: @@ -105,7 +105,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 2D781CB9473E496EAD57438A30A8DF2F Ref B: CO6AA3150219031 Ref C: 2023-09-01T21:27:13Z' + - 'Ref A: 6227CAB3FCC142779A7334ACF0461656 Ref B: CO6AA3150219019 Ref C: 2023-11-28T18:50:20Z' status: 202 Accepted code: 202 duration: "" @@ -115,7 +115,7 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRGTlNCRUYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRGTlNCRUYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367942203763579&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=e3GAS0BGgFHGk8df3tQxkcpaAQWhSTHRMZUOM_g03l0Horm7EcYFRGJUFiugwcwW5YxEEJPLCqIC9YUyZ_MgGO7EV1pirInfVAfGG_BygXKx8JorUpr12JH473XrtdmqHneDOwDT_YTHzsGgrx-ZXIQxzXVJPTkgIJOrxBVOOTHyPSYLJHBax1SalmDtL6pGSbpuYFBLfQ73Rp99BM4Hrd6rv_jS8jffnevx4OJARZtnuyXXzPwLWd83JTfycdywL7uHjivrcmWvAd9k0fW9MPNsmGdfpcZUQRYHeNxcKQXpRnv7Y5jF22lTMjjDES8fc93Y2_BrWg6iltlHcohZUg&h=2j1CsrYkbV1eLlhUIr2pm0Io1APKkgq1SKb4H3klgL4 method: GET response: body: "" @@ -135,7 +135,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 5546685F0DC248008F59CCD7F31C4456 Ref B: CO6AA3150219031 Ref C: 2023-09-01T21:27:28Z' + - 'Ref A: 37B21FF8379342419052B4B6D7214CBB Ref B: CO6AA3150219019 Ref C: 2023-11-28T18:50:35Z' status: 200 OK code: 200 duration: "" diff --git a/v2/internal/controllers/recordings/Test_OwnerIsARMIDOfParent_ChildResourceSuccessfullyReconciled.yaml b/v2/internal/controllers/recordings/Test_OwnerIsARMIDOfParent_ChildResourceSuccessfullyReconciled.yaml index b51e595bb6f..4ccaf253448 100644 --- a/v2/internal/controllers/recordings/Test_OwnerIsARMIDOfParent_ChildResourceSuccessfullyReconciled.yaml +++ b/v2/internal/controllers/recordings/Test_OwnerIsARMIDOfParent_ChildResourceSuccessfullyReconciled.yaml @@ -35,7 +35,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: F23472F05C414FBD84D33D61A0A722BD Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:27:35Z' + - 'Ref A: D0BC701378C4426AB3CC01BD8B6A54C9 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:06Z' status: 201 Created code: 201 duration: "" @@ -69,7 +69,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 3D51AF8C410749459D03CC102DECC6A0 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:27:35Z' + - 'Ref A: B2518FF37FFA4ECB9B792D0C9AC3F91E Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:06Z' status: 200 OK code: 200 duration: "" @@ -85,7 +85,7 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy?api-version=2023-01-01 method: PUT response: body: "" @@ -99,7 +99,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/08086687-5aeb-4fee-b163-a0b3e99fafe2?monitor=true&api-version=2022-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/13a724cc-4b93-428b-9f2d-d9a5f2106ae1?monitor=true&api-version=2023-01-01&t=638368191115446947&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=BVmBjF21KC86n37BOSZ4Lv8qfVyFLm0Dh6UXx-cI02hcT9XjnYWMPGznj9GOoC82v2uD0ZfVhSJYuTiKR451WM5ThMRdpXovF8vUjNuaEGWkwIvjJCS_oOnRKbZdvOx4RtJ2JsPYm0Iaxk3rT6M6CBoZLLUr118vcyoY6S5blMQ2glcsxZOd3Pw4P-AI4w2Y43dHZtsbLeOg-PdOjh3atX-mZ9g7KnrX2xeERcLTd-8bIwVQRjUJcQaA8zyx_RrrLnMO67OCo8COjV0Dzk9HiGDsbYkwQSpeOcXn173m0sI71lZx-umihXazoGdmDCI_cC5ukuNPovyzSRcm07QG-w&h=tJ5VsU400hmv1_dcBoqdIJdoJu0HXzDr-fCkql3X3p4 Pragma: - no-cache Retry-After: @@ -111,7 +111,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 0DA97A05636748B8800F5779CA7F7C10 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:27:37Z' + - 'Ref A: 20FDC3BB4017474CADFEB34FA51E7C69 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:08Z' status: 202 Accepted code: 202 duration: "" @@ -121,7 +121,7 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/08086687-5aeb-4fee-b163-a0b3e99fafe2?monitor=true&api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/13a724cc-4b93-428b-9f2d-d9a5f2106ae1?monitor=true&api-version=2023-01-01&t=638368191115446947&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=BVmBjF21KC86n37BOSZ4Lv8qfVyFLm0Dh6UXx-cI02hcT9XjnYWMPGznj9GOoC82v2uD0ZfVhSJYuTiKR451WM5ThMRdpXovF8vUjNuaEGWkwIvjJCS_oOnRKbZdvOx4RtJ2JsPYm0Iaxk3rT6M6CBoZLLUr118vcyoY6S5blMQ2glcsxZOd3Pw4P-AI4w2Y43dHZtsbLeOg-PdOjh3atX-mZ9g7KnrX2xeERcLTd-8bIwVQRjUJcQaA8zyx_RrrLnMO67OCo8COjV0Dzk9HiGDsbYkwQSpeOcXn173m0sI71lZx-umihXazoGdmDCI_cC5ukuNPovyzSRcm07QG-w&h=tJ5VsU400hmv1_dcBoqdIJdoJu0HXzDr-fCkql3X3p4 method: GET response: body: "" @@ -135,7 +135,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/08086687-5aeb-4fee-b163-a0b3e99fafe2?monitor=true&api-version=2022-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/13a724cc-4b93-428b-9f2d-d9a5f2106ae1?monitor=true&api-version=2023-01-01&t=638368191126690704&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=cjimWl4L2TdYUoeLuClvhibay_uIz38ATJGAqFF74Pr-Fuu6nEE14Hgl-IZD5FyKT9YZP0n8kzOESx9YK6Q1gsSXnruu52yujAycav4dQD2OfUkh_RZOUk-MlYdcxwAbrdi73TI0N5cQKLVclRir0R0zejgxo2v0Xql-hC5AsVsXI5QAJJ_Gpka2qm-9sBW06PQ6a79TkVP-cRdlf32-Nux5CMq2vIzM6LLwty3XcMVf2oWizL151xmB-MfiCs3Tl1iaxVfOcCUtLOvclsSwmNy3N_a1VFauAPulC_PcS_00S0OYOgx3kq3ezPAyr9NYRxQHoT_zIjnUMyDy-Mv_YA&h=94mH7k_pI7In7egFy4TIkSyVm0ryzmZD5op1uG1PGt8 Pragma: - no-cache Retry-After: @@ -147,7 +147,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 37F995CED2A540DB88F8C755DE7A8942 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:27:41Z' + - 'Ref A: C9F3CC6047C44CD7AD5C6F2F119BECB8 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:12Z' status: 202 Accepted code: 202 duration: "" @@ -157,15 +157,15 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/08086687-5aeb-4fee-b163-a0b3e99fafe2?monitor=true&api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/13a724cc-4b93-428b-9f2d-d9a5f2106ae1?monitor=true&api-version=2023-01-01&t=638368191115446947&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=BVmBjF21KC86n37BOSZ4Lv8qfVyFLm0Dh6UXx-cI02hcT9XjnYWMPGznj9GOoC82v2uD0ZfVhSJYuTiKR451WM5ThMRdpXovF8vUjNuaEGWkwIvjJCS_oOnRKbZdvOx4RtJ2JsPYm0Iaxk3rT6M6CBoZLLUr118vcyoY6S5blMQ2glcsxZOd3Pw4P-AI4w2Y43dHZtsbLeOg-PdOjh3atX-mZ9g7KnrX2xeERcLTd-8bIwVQRjUJcQaA8zyx_RrrLnMO67OCo8COjV0Dzk9HiGDsbYkwQSpeOcXn173m0sI71lZx-umihXazoGdmDCI_cC5ukuNPovyzSRcm07QG-w&h=tJ5VsU400hmv1_dcBoqdIJdoJu0HXzDr-fCkql3X3p4 method: GET response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy","name":"asoteststorzgzeqy","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorzgzeqy.dfs.core.windows.net/","web":"https://asoteststorzgzeqy.z5.web.core.windows.net/","blob":"https://asoteststorzgzeqy.blob.core.windows.net/","queue":"https://asoteststorzgzeqy.queue.core.windows.net/","table":"https://asoteststorzgzeqy.table.core.windows.net/","file":"https://asoteststorzgzeqy.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy","name":"asoteststorzgzeqy","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorzgzeqy.dfs.core.windows.net/","web":"https://asoteststorzgzeqy.z5.web.core.windows.net/","blob":"https://asoteststorzgzeqy.blob.core.windows.net/","queue":"https://asoteststorzgzeqy.queue.core.windows.net/","table":"https://asoteststorzgzeqy.table.core.windows.net/","file":"https://asoteststorzgzeqy.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache Content-Length: - - "1432" + - "1448" Content-Type: - application/json Expires: @@ -179,7 +179,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: F74746E4334E4113833191A2A635959C Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:27:58Z' + - 'Ref A: D0565A4F678B4DD99C8887F4A4BE10C5 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:29Z' status: 200 OK code: 200 duration: "" @@ -191,15 +191,15 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy?api-version=2023-01-01 method: GET response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy","name":"asoteststorzgzeqy","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorzgzeqy.dfs.core.windows.net/","web":"https://asoteststorzgzeqy.z5.web.core.windows.net/","blob":"https://asoteststorzgzeqy.blob.core.windows.net/","queue":"https://asoteststorzgzeqy.queue.core.windows.net/","table":"https://asoteststorzgzeqy.table.core.windows.net/","file":"https://asoteststorzgzeqy.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy","name":"asoteststorzgzeqy","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorzgzeqy.dfs.core.windows.net/","web":"https://asoteststorzgzeqy.z5.web.core.windows.net/","blob":"https://asoteststorzgzeqy.blob.core.windows.net/","queue":"https://asoteststorzgzeqy.queue.core.windows.net/","table":"https://asoteststorzgzeqy.table.core.windows.net/","file":"https://asoteststorzgzeqy.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache Content-Length: - - "1432" + - "1448" Content-Type: - application/json Expires: @@ -213,7 +213,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: E4DCB89D8AA14739A80F6F3B83C02C92 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:27:58Z' + - 'Ref A: A0E1F12360834FFE800208286B782407 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:29Z' status: 200 OK code: 200 duration: "" @@ -251,7 +251,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 4C3CE7E407AD46C7A551B66F46BBC6D4 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:28:02Z' + - 'Ref A: 17CD1E3D451C49EAADABAAF19E43CDBA Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:33Z' status: 200 OK code: 200 duration: "" @@ -285,7 +285,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: AE01AC655D4243A5AB9B95EEB9D4FE8A Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:28:03Z' + - 'Ref A: A8EA564A91604D68BC72B98A1688C039 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:34Z' status: 200 OK code: 200 duration: "" @@ -313,7 +313,7 @@ interactions: Content-Type: - application/json Etag: - - '"0x8DBAB1930A2C5A0"' + - '"0x8DBF07CE3D09A2F"' Expires: - "-1" Pragma: @@ -325,7 +325,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: FA4EA127E13D4631A0E2DA0A676CB703 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:28:07Z' + - 'Ref A: D1311B05FC7F46C3A6DB04746C8DBACC Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:38Z' status: 201 Created code: 201 duration: "" @@ -338,7 +338,7 @@ interactions: url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy/blobServices/default/containers/asotest-container-lxzhpo?api-version=2022-09-01 method: GET response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy/blobServices/default/containers/asotest-container-lxzhpo","name":"asotest-container-lxzhpo","type":"Microsoft.Storage/storageAccounts/blobServices/containers","etag":"\"0x8DBAB1930A2C5A0\"","properties":{"deleted":false,"remainingRetentionDays":0,"defaultEncryptionScope":"$account-encryption-key","denyEncryptionScopeOverride":false,"publicAccess":"None","leaseStatus":"Unlocked","leaseState":"Available","lastModifiedTime":"2001-02-03T04:05:06Z","legalHold":{"hasLegalHold":false,"tags":[]},"hasImmutabilityPolicy":false,"hasLegalHold":false}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy/blobServices/default/containers/asotest-container-lxzhpo","name":"asotest-container-lxzhpo","type":"Microsoft.Storage/storageAccounts/blobServices/containers","etag":"\"0x8DBF07CE3D09A2F\"","properties":{"deleted":false,"remainingRetentionDays":0,"defaultEncryptionScope":"$account-encryption-key","denyEncryptionScopeOverride":false,"publicAccess":"None","leaseStatus":"Unlocked","leaseState":"Available","lastModifiedTime":"2001-02-03T04:05:06Z","legalHold":{"hasLegalHold":false,"tags":[]},"hasImmutabilityPolicy":false,"hasLegalHold":false}}' headers: Cache-Control: - no-cache @@ -347,7 +347,7 @@ interactions: Content-Type: - application/json Etag: - - '"0x8DBAB1930A2C5A0"' + - '"0x8DBF07CE3D09A2F"' Expires: - "-1" Pragma: @@ -359,7 +359,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 690A6E4AB26D44DAA90A19E61DCB78AB Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:28:09Z' + - 'Ref A: 27F205A16B684E8B8F6EA6297ECC98CB Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:40Z' status: 200 OK code: 200 duration: "" @@ -374,7 +374,7 @@ interactions: url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy/blobServices/default/containers/asotest-container-lxzhpo?api-version=2022-09-01 method: GET response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy/blobServices/default/containers/asotest-container-lxzhpo","name":"asotest-container-lxzhpo","type":"Microsoft.Storage/storageAccounts/blobServices/containers","etag":"\"0x8DBAB1930A2C5A0\"","properties":{"deleted":false,"remainingRetentionDays":0,"defaultEncryptionScope":"$account-encryption-key","denyEncryptionScopeOverride":false,"publicAccess":"None","leaseStatus":"Unlocked","leaseState":"Available","lastModifiedTime":"2001-02-03T04:05:06Z","legalHold":{"hasLegalHold":false,"tags":[]},"hasImmutabilityPolicy":false,"hasLegalHold":false}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy/blobServices/default/containers/asotest-container-lxzhpo","name":"asotest-container-lxzhpo","type":"Microsoft.Storage/storageAccounts/blobServices/containers","etag":"\"0x8DBF07CE3D09A2F\"","properties":{"deleted":false,"remainingRetentionDays":0,"defaultEncryptionScope":"$account-encryption-key","denyEncryptionScopeOverride":false,"publicAccess":"None","leaseStatus":"Unlocked","leaseState":"Available","lastModifiedTime":"2001-02-03T04:05:06Z","legalHold":{"hasLegalHold":false,"tags":[]},"hasImmutabilityPolicy":false,"hasLegalHold":false}}' headers: Cache-Control: - no-cache @@ -383,7 +383,7 @@ interactions: Content-Type: - application/json Etag: - - '"0x8DBAB1930A2C5A0"' + - '"0x8DBF07CE3D09A2F"' Expires: - "-1" Pragma: @@ -395,7 +395,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: C236C99E64F34B9DB36269794AC5C0CD Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:28:09Z' + - 'Ref A: 1296ECEE219541EB83F2A1524644315A Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:40Z' status: 200 OK code: 200 duration: "" @@ -423,7 +423,7 @@ interactions: Content-Type: - application/json Etag: - - '"0x8DBAB1933994F47"' + - '"0x8DBF07CE6C79846"' Expires: - "-1" Pragma: @@ -435,7 +435,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: F97079808A9B4CAE8B7EFD71BF1EE666 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:28:12Z' + - 'Ref A: 264DEEF66B4D446882F0FE00A188A1AC Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:44Z' status: 200 OK code: 200 duration: "" @@ -450,7 +450,7 @@ interactions: url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy/blobServices/default/containers/asotest-container-lxzhpo?api-version=2022-09-01 method: GET response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy/blobServices/default/containers/asotest-container-lxzhpo","name":"asotest-container-lxzhpo","type":"Microsoft.Storage/storageAccounts/blobServices/containers","etag":"\"0x8DBAB1933994F47\"","properties":{"deleted":false,"remainingRetentionDays":0,"defaultEncryptionScope":"$account-encryption-key","denyEncryptionScopeOverride":false,"metadata":{"tag1":"value1"},"publicAccess":"None","leaseStatus":"Unlocked","leaseState":"Available","lastModifiedTime":"2001-02-03T04:05:06Z","legalHold":{"hasLegalHold":false,"tags":[]},"hasImmutabilityPolicy":false,"hasLegalHold":false}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy/blobServices/default/containers/asotest-container-lxzhpo","name":"asotest-container-lxzhpo","type":"Microsoft.Storage/storageAccounts/blobServices/containers","etag":"\"0x8DBF07CE6C79846\"","properties":{"deleted":false,"remainingRetentionDays":0,"defaultEncryptionScope":"$account-encryption-key","denyEncryptionScopeOverride":false,"metadata":{"tag1":"value1"},"publicAccess":"None","leaseStatus":"Unlocked","leaseState":"Available","lastModifiedTime":"2001-02-03T04:05:06Z","legalHold":{"hasLegalHold":false,"tags":[]},"hasImmutabilityPolicy":false,"hasLegalHold":false}}' headers: Cache-Control: - no-cache @@ -459,7 +459,7 @@ interactions: Content-Type: - application/json Etag: - - '"0x8DBAB1933994F47"' + - '"0x8DBF07CE6C79846"' Expires: - "-1" Pragma: @@ -471,7 +471,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 44D6F9FC2FAD4DBC8A2CF8748BCB6299 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:28:13Z' + - 'Ref A: 8B3935F8038246139B642B8DA9572A23 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:44Z' status: 200 OK code: 200 duration: "" @@ -505,7 +505,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 16CF6B8020B241D8BA301E4D5595D0CE Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:28:17Z' + - 'Ref A: E0059CE869B142E49B732255199AC35E Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:49Z' status: 200 OK code: 200 duration: "" @@ -521,7 +521,7 @@ interactions: method: GET response: body: '{"error":{"code":"ContainerNotFound","message":"The specified container - does not exist.\nRequestId:706dcb60-f01e-000e-1202-ddaca6000000\nTime:2001-02-03T04:05:06Z"}}' + does not exist.\nRequestId:b0fb4a5e-d01e-005c-1865-222485000000\nTime:2001-02-03T04:05:06Z"}}' headers: Cache-Control: - no-cache @@ -540,7 +540,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: CE47D8EE43F04AEFBEA98971962801E4 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:28:22Z' + - 'Ref A: 06F6EE529E8F4C2EA0DFD39C20318DBA Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:54Z' status: 404 Not Found code: 404 duration: "" @@ -564,7 +564,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638368191542788043&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=dYjfnfCwkw-Zj2ywTGWmOD-z8im7kKG2j542yttSFHmtX8teizG6vtyRTBiaOeTmmzTVU5lRtCUCf6-klEqEO3fBfQ24vGZcnWJaJfMumDaOncug3c6iya5Jd6F8DMyZG13iw60x34MMjrP2wab55CBWOXwFq9MYX4JbwVGK8ukPka2mtKMU6zQj38skq9xpJX835bg-g5LvzTa-kThRbMEK2EZEzJUKMW9DMxQ2i_V43owDKa5o_7JV-2yVBcBWfK9bLR33KdfqWtLx6mp3latZrn5zOrWlRRhkeylr27_-DWTq8WlNhUVyLl4gGw4WrKaVbB2VdfW8B7vgkXIbkA&h=f9a9XE0XuzNxZNEpRl7KoWIjFKCB8vqr0U1CSdRVliE Pragma: - no-cache Retry-After: @@ -576,7 +576,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 53802B1F759945ABBA4AA32261A05540 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:28:23Z' + - 'Ref A: 1F8FF334CA7F44249B837EA20B28F1F7 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:45:54Z' status: 202 Accepted code: 202 duration: "" @@ -586,7 +586,7 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638368191542788043&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=dYjfnfCwkw-Zj2ywTGWmOD-z8im7kKG2j542yttSFHmtX8teizG6vtyRTBiaOeTmmzTVU5lRtCUCf6-klEqEO3fBfQ24vGZcnWJaJfMumDaOncug3c6iya5Jd6F8DMyZG13iw60x34MMjrP2wab55CBWOXwFq9MYX4JbwVGK8ukPka2mtKMU6zQj38skq9xpJX835bg-g5LvzTa-kThRbMEK2EZEzJUKMW9DMxQ2i_V43owDKa5o_7JV-2yVBcBWfK9bLR33KdfqWtLx6mp3latZrn5zOrWlRRhkeylr27_-DWTq8WlNhUVyLl4gGw4WrKaVbB2VdfW8B7vgkXIbkA&h=f9a9XE0XuzNxZNEpRl7KoWIjFKCB8vqr0U1CSdRVliE method: GET response: body: "" @@ -598,7 +598,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638368191694167634&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=ifS_FsHXKIzo9aKv6jg1eorrbdkkRLwEbvNG3NQbmqbgEX9gXg7yFAZsopCZtUc5fFEoNrLT7LYfeXQh_BMWOl3Ek7zFl_Bi6qJ5tWUo5ZdITy5JarwjeFE3gE_g0OtX7IYIAR6AO6AE1_KPc4w8rqofetODmdemLnQy1CuUM2A-ge65alZYKTXLjUmqlAqg0JpamB5Ol2bgjy0AQlHbws0vXM0vRysMCimYeNsxwN2pqlKdYsxY4SI3VM3eWm4M_djAaq4N6GTzt3kp4mYwNfQQ-qivyL_1uwlQW2PtzG5fOeQM-r_cfSS0ZJ0f0x9OqmP6H2_28KRax2JOJxnYkQ&h=5JionJcMcuYllX9wMp75gn6qyNS5yUa-tp_G6uB4UKI Pragma: - no-cache Retry-After: @@ -610,7 +610,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 795E4771EE764CF49EBB88AE16153B08 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:28:38Z' + - 'Ref A: 1A9C6A84457648588001A17EB4260B17 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:46:09Z' status: 202 Accepted code: 202 duration: "" @@ -620,7 +620,7 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638368191542788043&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=dYjfnfCwkw-Zj2ywTGWmOD-z8im7kKG2j542yttSFHmtX8teizG6vtyRTBiaOeTmmzTVU5lRtCUCf6-klEqEO3fBfQ24vGZcnWJaJfMumDaOncug3c6iya5Jd6F8DMyZG13iw60x34MMjrP2wab55CBWOXwFq9MYX4JbwVGK8ukPka2mtKMU6zQj38skq9xpJX835bg-g5LvzTa-kThRbMEK2EZEzJUKMW9DMxQ2i_V43owDKa5o_7JV-2yVBcBWfK9bLR33KdfqWtLx6mp3latZrn5zOrWlRRhkeylr27_-DWTq8WlNhUVyLl4gGw4WrKaVbB2VdfW8B7vgkXIbkA&h=f9a9XE0XuzNxZNEpRl7KoWIjFKCB8vqr0U1CSdRVliE method: GET response: body: "" @@ -632,7 +632,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638368191845023431&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=kZUIQa82FoT-hP-7QbkOYSSiUcAxcnoK6ENH9lFdXOueszyJEuRjKBMUppheBC1HgSgfnK9ILb3LHPzIWq1d4PsvJgg8mpXNNBzkXNIHx6aBzrvkg3MqhSV8yC09tvI_5vA_nTcBgxA3IR8nU9zYKa_8hPsyEb2J3WwYm1nFiDb7lg3DgDweprHkJXhNHuwGXIHz3y3ZU8U-SvKlkznruZkmrHp0m4cvOmg5vUXYvlQun2eZxKyxx0dqUGUeqKBtoHd4gbKEy0l5G4vTcAlJRtYkTAimTHQhV-toF3NDjx1SkFDQQfkO6pXcwFfL1P4IiHi_tbFDwC4n9Cpqay2dIA&h=yrqhXCEOy-L63vkdAn3JMaard5ETKM0v-CHpAdbBE2s Pragma: - no-cache Retry-After: @@ -644,7 +644,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: FD60C6FC213E41BBB2D8A46CE92412BB Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:28:54Z' + - 'Ref A: 6FC8509022704745ACC5B08060DA59FE Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:46:24Z' status: 202 Accepted code: 202 duration: "" @@ -654,7 +654,7 @@ interactions: headers: Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638368191542788043&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=dYjfnfCwkw-Zj2ywTGWmOD-z8im7kKG2j542yttSFHmtX8teizG6vtyRTBiaOeTmmzTVU5lRtCUCf6-klEqEO3fBfQ24vGZcnWJaJfMumDaOncug3c6iya5Jd6F8DMyZG13iw60x34MMjrP2wab55CBWOXwFq9MYX4JbwVGK8ukPka2mtKMU6zQj38skq9xpJX835bg-g5LvzTa-kThRbMEK2EZEzJUKMW9DMxQ2i_V43owDKa5o_7JV-2yVBcBWfK9bLR33KdfqWtLx6mp3latZrn5zOrWlRRhkeylr27_-DWTq8WlNhUVyLl4gGw4WrKaVbB2VdfW8B7vgkXIbkA&h=f9a9XE0XuzNxZNEpRl7KoWIjFKCB8vqr0U1CSdRVliE method: GET response: body: "" @@ -666,7 +666,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638368191995607667&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=NyEHscC62xpjFawyfXet0CJSAL_zUl4E_QImrnAKxd8Rt_21v6vgYK-v9XPsal6s89o1_-22HHWlv03ruKISwsx4z_zJVZ6olJo094cmKBJzLLCeBPFWCQydEnXBV1iGA3RiWZB3Oq2OP4t_B7Y2ssGEz69wlJIjbTPajgwLyXeUZqXtlDjcfHMqmUUG9mHWlBjik-GWW3B0xUYm_omqCz2pMnCA7fSWKE8QA0YtTpYu5QuEPi67-7FSvHT_9CP8PecNUXLCF741OlUhLKhLuGWqeiEnTrdOhC5GsVi5pl2UVgwTMeg3pkIqXh8-U9ByLKihbTjZaAeGSHSNHQwZFA&h=YIaafRWS1ZXd0QMhvNxF8upvD3Ib92gbnamxGQnKUkU Pragma: - no-cache Retry-After: @@ -678,7 +678,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 505A69CB859B4767AD588A8717311992 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:29:09Z' + - 'Ref A: 52629583AF8B4D078B1F5F0ED077F859 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:46:39Z' status: 202 Accepted code: 202 duration: "" @@ -688,7 +688,7 @@ interactions: headers: Test-Request-Attempt: - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638368191542788043&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=dYjfnfCwkw-Zj2ywTGWmOD-z8im7kKG2j542yttSFHmtX8teizG6vtyRTBiaOeTmmzTVU5lRtCUCf6-klEqEO3fBfQ24vGZcnWJaJfMumDaOncug3c6iya5Jd6F8DMyZG13iw60x34MMjrP2wab55CBWOXwFq9MYX4JbwVGK8ukPka2mtKMU6zQj38skq9xpJX835bg-g5LvzTa-kThRbMEK2EZEzJUKMW9DMxQ2i_V43owDKa5o_7JV-2yVBcBWfK9bLR33KdfqWtLx6mp3latZrn5zOrWlRRhkeylr27_-DWTq8WlNhUVyLl4gGw4WrKaVbB2VdfW8B7vgkXIbkA&h=f9a9XE0XuzNxZNEpRl7KoWIjFKCB8vqr0U1CSdRVliE method: GET response: body: "" @@ -700,7 +700,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638368192145559879&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=Yc9Wqo1HY_rgG4ZpHpKE9WX4ZgA--7IeAf44cHm2C1O5O5-AxAhfMoWVF_bWKLz_1I2P2RP_VNaF_sygTh2RBjmYNS8Q3MZnl01tbygWOllaH--k8sk_0wB0Qn7wYNeJOtrXZhCOzie8KvMDo-YjgK-bboi1xDK86rnqiZv3hPNTW2w6OloovCKSzGgRF89whTwZATyaIQvh7_eTMLyGpJzyS70nI-MeU-KRKMiNHozau2vQjZDW5FL8oMe2JGUGyZ9k10ifUHO8TUAmjcFkIqEWXP8fQBUQPlDGVgIt7BTXm1K_vw_t1RWWs4sPePApUwDW0E-oUPcUYincKSb0gA&h=OtlVqeE7VWAtvLAtUSNm5f3jJkvOaMvTqxTB-86OQkk Pragma: - no-cache Retry-After: @@ -712,7 +712,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: E3EA213EEB1449F1831D50BD1CA9E7DD Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:29:24Z' + - 'Ref A: 9D90EFE8F2DD408EACFDA8AB49F14CF6 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:46:54Z' status: 202 Accepted code: 202 duration: "" @@ -722,7 +722,7 @@ interactions: headers: Test-Request-Attempt: - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRIT09XRFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638368191542788043&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=dYjfnfCwkw-Zj2ywTGWmOD-z8im7kKG2j542yttSFHmtX8teizG6vtyRTBiaOeTmmzTVU5lRtCUCf6-klEqEO3fBfQ24vGZcnWJaJfMumDaOncug3c6iya5Jd6F8DMyZG13iw60x34MMjrP2wab55CBWOXwFq9MYX4JbwVGK8ukPka2mtKMU6zQj38skq9xpJX835bg-g5LvzTa-kThRbMEK2EZEzJUKMW9DMxQ2i_V43owDKa5o_7JV-2yVBcBWfK9bLR33KdfqWtLx6mp3latZrn5zOrWlRRhkeylr27_-DWTq8WlNhUVyLl4gGw4WrKaVbB2VdfW8B7vgkXIbkA&h=f9a9XE0XuzNxZNEpRl7KoWIjFKCB8vqr0U1CSdRVliE method: GET response: body: "" @@ -742,7 +742,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: EF084A53DF0C45EC8268B438D27F8BA3 Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:29:39Z' + - 'Ref A: 6B84A52305F840E28E546D2251B788A1 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:47:09Z' status: 200 OK code: 200 duration: "" @@ -754,7 +754,7 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-hoowdu/providers/Microsoft.Storage/storageAccounts/asoteststorzgzeqy?api-version=2023-01-01 method: DELETE response: body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-hoowdu'' @@ -779,7 +779,7 @@ interactions: X-Ms-Failure-Cause: - gateway X-Msedge-Ref: - - 'Ref A: BA18336334894CE3840B00ED7E20376F Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:29:43Z' + - 'Ref A: 0A48C28342C54187ABA1695294E186E1 Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:47:14Z' status: 404 Not Found code: 404 duration: "" @@ -818,7 +818,7 @@ interactions: X-Ms-Failure-Cause: - gateway X-Msedge-Ref: - - 'Ref A: CAB4A41D3DBE46AE96D0CC595BEFCE0D Ref B: CO6AA3150220051 Ref C: 2023-09-01T18:29:48Z' + - 'Ref A: D6F0135CC2E048A1A0C1DBFD400B44CD Ref B: CO6AA3150219049 Ref C: 2023-11-29T01:47:19Z' status: 404 Not Found code: 404 duration: "" diff --git a/v2/internal/controllers/recordings/Test_OwnerIsARMIDOfResourceGroup_ResourceSuccessfullyReconciled.yaml b/v2/internal/controllers/recordings/Test_OwnerIsARMIDOfResourceGroup_ResourceSuccessfullyReconciled.yaml index 37b29a6efd1..da109a94de1 100644 --- a/v2/internal/controllers/recordings/Test_OwnerIsARMIDOfResourceGroup_ResourceSuccessfullyReconciled.yaml +++ b/v2/internal/controllers/recordings/Test_OwnerIsARMIDOfResourceGroup_ResourceSuccessfullyReconciled.yaml @@ -35,7 +35,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 8F26C2F0C48E4BEEB1930E95B167DE72 Ref B: CO6AA3150218017 Ref C: 2023-09-01T18:04:49Z' + - 'Ref A: 4622FDC554B64C5D80A6F547EF13289E Ref B: CO6AA3150219051 Ref C: 2023-11-29T00:30:19Z' status: 201 Created code: 201 duration: "" @@ -69,7 +69,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 778BCFE3351F4FE1B6BA92BFE24A82C6 Ref B: CO6AA3150218017 Ref C: 2023-09-01T18:04:50Z' + - 'Ref A: 65EED00304A34BCEA2875DA1DED0C735 Ref B: CO6AA3150219051 Ref C: 2023-11-29T00:30:20Z' status: 200 OK code: 200 duration: "" @@ -85,7 +85,7 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz?api-version=2023-01-01 method: PUT response: body: "" @@ -99,7 +99,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/cabb8259-18a4-4fc4-ab0f-d200945ffeb1?monitor=true&api-version=2022-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/179f7c69-9c18-42fc-9c83-c052b6b3d5e1?monitor=true&api-version=2023-01-01&t=638368146250132681&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=jLNF3mHtHDj79pnbZFKuJkyeKQsQYVf1bWmUoBo4nRNRpbWP5ITV77yXOpovXnYdr0ENjrBsa4U8--yxJ8uXpvdXKrlj6MIaqJUKvgg0a6doBk2iFvhnSRmKWjPVRfA8dihgSMhrsTyVYU4ZURV7Dl5g5xYWg5Ol0Ud1Pd79M6vXLyGep15aNDwhirzQGq7YTco1sc51j4pJVM9vsWnKOdQqFD--XQRFt3KwNx6YWmoJfdURprodoWIXWkDxOVdc059r8c4j-WUTRO4pB3Siu5eldn-8T_uwpyHxCQkrfBqGdgXQxS6o58EtFhOHxR7VX-u7zE6sz-I7F3cPIzoTvQ&h=fsllDIfaXrYJZ8zHroeyNMd9OLW8kFAl7r2BS5Rs_qs Pragma: - no-cache Retry-After: @@ -111,7 +111,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: B552CCECBFC5470996BEE7254CB4D901 Ref B: CO6AA3150218017 Ref C: 2023-09-01T18:04:51Z' + - 'Ref A: E6807447F88542CEAF2C15259AF79D40 Ref B: CO6AA3150219051 Ref C: 2023-11-29T00:30:22Z' status: 202 Accepted code: 202 duration: "" @@ -121,7 +121,7 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/cabb8259-18a4-4fc4-ab0f-d200945ffeb1?monitor=true&api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/179f7c69-9c18-42fc-9c83-c052b6b3d5e1?monitor=true&api-version=2023-01-01&t=638368146250132681&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=jLNF3mHtHDj79pnbZFKuJkyeKQsQYVf1bWmUoBo4nRNRpbWP5ITV77yXOpovXnYdr0ENjrBsa4U8--yxJ8uXpvdXKrlj6MIaqJUKvgg0a6doBk2iFvhnSRmKWjPVRfA8dihgSMhrsTyVYU4ZURV7Dl5g5xYWg5Ol0Ud1Pd79M6vXLyGep15aNDwhirzQGq7YTco1sc51j4pJVM9vsWnKOdQqFD--XQRFt3KwNx6YWmoJfdURprodoWIXWkDxOVdc059r8c4j-WUTRO4pB3Siu5eldn-8T_uwpyHxCQkrfBqGdgXQxS6o58EtFhOHxR7VX-u7zE6sz-I7F3cPIzoTvQ&h=fsllDIfaXrYJZ8zHroeyNMd9OLW8kFAl7r2BS5Rs_qs method: GET response: body: "" @@ -135,7 +135,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/cabb8259-18a4-4fc4-ab0f-d200945ffeb1?monitor=true&api-version=2022-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/179f7c69-9c18-42fc-9c83-c052b6b3d5e1?monitor=true&api-version=2023-01-01&t=638368146261483735&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=RRfX2089MyweQF_vMptViLPm9i697NVbZPiBGt74p0Nk3q86ykwPI8-3vnlidrmDTgWMeakx04d6giKdgee733GFDiqEaKLJHEQOSROIqvYIVv_fhovnZ9srTYOC_BNOIkf5kGu3NC8VdOpL8EPKtSydZnpF9btlP2x8wUy6Nk5JsbZ_zWsJ2bCU-HyaA-VVWOoiSo7pQ2PO8vdaBMWCoomkacl1ea3lqTdanbC_2fDFqB-7m9Fqd5LTHSSfg0oabByOZPFKAM-cOk92M0naqyqUkh6Ka-aOfBAFwBOPfliaTKlhgcD3gIBqbseluiz0ZIasZp_W0Q1LZ432LHO19Q&h=1a1gQ8qKRrMglhlBBn-GkLHxTlWDZvATK-1MtMfPuz0 Pragma: - no-cache Retry-After: @@ -147,7 +147,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 3A6C8789100549CA87DEA79DAF774F5F Ref B: CO6AA3150218017 Ref C: 2023-09-01T18:04:55Z' + - 'Ref A: E73DCAFA46D241A0A3AB6715F3CAC5DB Ref B: CO6AA3150219051 Ref C: 2023-11-29T00:30:26Z' status: 202 Accepted code: 202 duration: "" @@ -157,15 +157,15 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/cabb8259-18a4-4fc4-ab0f-d200945ffeb1?monitor=true&api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/179f7c69-9c18-42fc-9c83-c052b6b3d5e1?monitor=true&api-version=2023-01-01&t=638368146250132681&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=jLNF3mHtHDj79pnbZFKuJkyeKQsQYVf1bWmUoBo4nRNRpbWP5ITV77yXOpovXnYdr0ENjrBsa4U8--yxJ8uXpvdXKrlj6MIaqJUKvgg0a6doBk2iFvhnSRmKWjPVRfA8dihgSMhrsTyVYU4ZURV7Dl5g5xYWg5Ol0Ud1Pd79M6vXLyGep15aNDwhirzQGq7YTco1sc51j4pJVM9vsWnKOdQqFD--XQRFt3KwNx6YWmoJfdURprodoWIXWkDxOVdc059r8c4j-WUTRO4pB3Siu5eldn-8T_uwpyHxCQkrfBqGdgXQxS6o58EtFhOHxR7VX-u7zE6sz-I7F3cPIzoTvQ&h=fsllDIfaXrYJZ8zHroeyNMd9OLW8kFAl7r2BS5Rs_qs method: GET response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz","name":"asoteststorbpzrrz","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorbpzrrz.dfs.core.windows.net/","web":"https://asoteststorbpzrrz.z5.web.core.windows.net/","blob":"https://asoteststorbpzrrz.blob.core.windows.net/","queue":"https://asoteststorbpzrrz.queue.core.windows.net/","table":"https://asoteststorbpzrrz.table.core.windows.net/","file":"https://asoteststorbpzrrz.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz","name":"asoteststorbpzrrz","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorbpzrrz.dfs.core.windows.net/","web":"https://asoteststorbpzrrz.z5.web.core.windows.net/","blob":"https://asoteststorbpzrrz.blob.core.windows.net/","queue":"https://asoteststorbpzrrz.queue.core.windows.net/","table":"https://asoteststorbpzrrz.table.core.windows.net/","file":"https://asoteststorbpzrrz.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache Content-Length: - - "1432" + - "1448" Content-Type: - application/json Expires: @@ -179,7 +179,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 2ABA2147C3AB4D63820CF5E6302A2C06 Ref B: CO6AA3150218017 Ref C: 2023-09-01T18:05:12Z' + - 'Ref A: E744B11B0A934FBAA0FB6716B1E53C93 Ref B: CO6AA3150219051 Ref C: 2023-11-29T00:30:43Z' status: 200 OK code: 200 duration: "" @@ -191,15 +191,15 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz?api-version=2023-01-01 method: GET response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz","name":"asoteststorbpzrrz","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorbpzrrz.dfs.core.windows.net/","web":"https://asoteststorbpzrrz.z5.web.core.windows.net/","blob":"https://asoteststorbpzrrz.blob.core.windows.net/","queue":"https://asoteststorbpzrrz.queue.core.windows.net/","table":"https://asoteststorbpzrrz.table.core.windows.net/","file":"https://asoteststorbpzrrz.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz","name":"asoteststorbpzrrz","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorbpzrrz.dfs.core.windows.net/","web":"https://asoteststorbpzrrz.z5.web.core.windows.net/","blob":"https://asoteststorbpzrrz.blob.core.windows.net/","queue":"https://asoteststorbpzrrz.queue.core.windows.net/","table":"https://asoteststorbpzrrz.table.core.windows.net/","file":"https://asoteststorbpzrrz.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache Content-Length: - - "1432" + - "1448" Content-Type: - application/json Expires: @@ -213,7 +213,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 87B6E7DA4A3F4E6D9DF396ADE543FE85 Ref B: CO6AA3150218017 Ref C: 2023-09-01T18:05:13Z' + - 'Ref A: 245ED5FB924C4983A6A865C78C14FDB0 Ref B: CO6AA3150219051 Ref C: 2023-11-29T00:30:43Z' status: 200 OK code: 200 duration: "" @@ -229,15 +229,15 @@ interactions: - application/json Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz?api-version=2023-01-01 method: PUT response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz","name":"asoteststorbpzrrz","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{"tag1":"value1"},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorbpzrrz.dfs.core.windows.net/","web":"https://asoteststorbpzrrz.z5.web.core.windows.net/","blob":"https://asoteststorbpzrrz.blob.core.windows.net/","queue":"https://asoteststorbpzrrz.queue.core.windows.net/","table":"https://asoteststorbpzrrz.table.core.windows.net/","file":"https://asoteststorbpzrrz.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz","name":"asoteststorbpzrrz","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{"tag1":"value1"},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorbpzrrz.dfs.core.windows.net/","web":"https://asoteststorbpzrrz.z5.web.core.windows.net/","blob":"https://asoteststorbpzrrz.blob.core.windows.net/","queue":"https://asoteststorbpzrrz.queue.core.windows.net/","table":"https://asoteststorbpzrrz.table.core.windows.net/","file":"https://asoteststorbpzrrz.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache Content-Length: - - "1447" + - "1463" Content-Type: - application/json Expires: @@ -251,7 +251,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 585B5A812E4F401E92339B022D1CF0DF Ref B: CO6AA3150218017 Ref C: 2023-09-01T18:05:16Z' + - 'Ref A: 2C510881C35D42B791E2FD0005FFC0D5 Ref B: CO6AA3150219051 Ref C: 2023-11-29T00:30:47Z' status: 200 OK code: 200 duration: "" @@ -263,15 +263,15 @@ interactions: - application/json Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz?api-version=2023-01-01 method: GET response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz","name":"asoteststorbpzrrz","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{"tag1":"value1"},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorbpzrrz.dfs.core.windows.net/","web":"https://asoteststorbpzrrz.z5.web.core.windows.net/","blob":"https://asoteststorbpzrrz.blob.core.windows.net/","queue":"https://asoteststorbpzrrz.queue.core.windows.net/","table":"https://asoteststorbpzrrz.table.core.windows.net/","file":"https://asoteststorbpzrrz.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz","name":"asoteststorbpzrrz","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{"tag1":"value1"},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorbpzrrz.dfs.core.windows.net/","web":"https://asoteststorbpzrrz.z5.web.core.windows.net/","blob":"https://asoteststorbpzrrz.blob.core.windows.net/","queue":"https://asoteststorbpzrrz.queue.core.windows.net/","table":"https://asoteststorbpzrrz.table.core.windows.net/","file":"https://asoteststorbpzrrz.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache Content-Length: - - "1447" + - "1463" Content-Type: - application/json Expires: @@ -285,7 +285,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: E687733EB33743DE89B0C774BF0D103A Ref B: CO6AA3150218017 Ref C: 2023-09-01T18:05:18Z' + - 'Ref A: 193FE5BCB8E24085944F647FC3D1AD9A Ref B: CO6AA3150219051 Ref C: 2023-11-29T00:30:48Z' status: 200 OK code: 200 duration: "" @@ -297,7 +297,7 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz?api-version=2023-01-01 method: DELETE response: body: "" @@ -319,7 +319,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 2FCC813057FF4154B50ED11B599A05E8 Ref B: CO6AA3150218017 Ref C: 2023-09-01T18:05:21Z' + - 'Ref A: 6F3D75C020AE4FD8865AFA24B5BCC3F0 Ref B: CO6AA3150219051 Ref C: 2023-11-29T00:30:52Z' status: 200 OK code: 200 duration: "" @@ -330,7 +330,7 @@ interactions: Accept: - application/json Test-Request-Attempt: - - "2" + - "0" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-drfmps/providers/Microsoft.Storage/storageAccounts/asoteststorbpzrrz?api-version=2022-09-01 method: GET response: @@ -357,7 +357,7 @@ interactions: X-Ms-Failure-Cause: - gateway X-Msedge-Ref: - - 'Ref A: EF516024158343EAB662D36E30FAAE07 Ref B: CO6AA3150218017 Ref C: 2023-09-01T18:05:26Z' + - 'Ref A: 2B11495262CA45A68429855D4C27D3A1 Ref B: CO6AA3150219051 Ref C: 2023-11-29T00:30:57Z' status: 404 Not Found code: 404 duration: "" @@ -381,7 +381,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREUkZNUFMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREUkZNUFMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638368146574107044&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=BgMs7t0uAP66y8S2502E5B4ZC67yuFByEaACmjXJylPZDjTMMgNlgxh2kV5VaoT5XC5iDobpoIAwZslvAzz9wfeUGVRX2P-Ww9tFObJXgk7qv018C8mcijoiynCW5cjq8ysa5Php81KccaDLCwOyGVb7NsLLbdtrSBFH0D7S4dGNlKnJnjYga1hilHZEgAyA5bslySaAwGDQYLngrdsq3Lnw7_spQyU-LFDg4M6hHj0ViWbAi2ODbPRkDUxfDqNoMD_afGAgwNzLDQOGXsk_Ajqa8jhsnJR1cWHcX7WX0rai-g9VKgh12zZVUcHVkMTtzbs0SysaOFb4Xk_qKaJULw&h=6SDvkuSDP5rIEQGQrj28gfonEjYU4lbIYz07gPPtMXs Pragma: - no-cache Retry-After: @@ -393,7 +393,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 6CF978626FCC4F2FB181E43211199636 Ref B: CO6AA3150218017 Ref C: 2023-09-01T18:05:26Z' + - 'Ref A: 794DB2C327BE470DA1D16DE6EA50569C Ref B: CO6AA3150219051 Ref C: 2023-11-29T00:30:57Z' status: 202 Accepted code: 202 duration: "" @@ -403,7 +403,7 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREUkZNUFMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREUkZNUFMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638368146574107044&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=BgMs7t0uAP66y8S2502E5B4ZC67yuFByEaACmjXJylPZDjTMMgNlgxh2kV5VaoT5XC5iDobpoIAwZslvAzz9wfeUGVRX2P-Ww9tFObJXgk7qv018C8mcijoiynCW5cjq8ysa5Php81KccaDLCwOyGVb7NsLLbdtrSBFH0D7S4dGNlKnJnjYga1hilHZEgAyA5bslySaAwGDQYLngrdsq3Lnw7_spQyU-LFDg4M6hHj0ViWbAi2ODbPRkDUxfDqNoMD_afGAgwNzLDQOGXsk_Ajqa8jhsnJR1cWHcX7WX0rai-g9VKgh12zZVUcHVkMTtzbs0SysaOFb4Xk_qKaJULw&h=6SDvkuSDP5rIEQGQrj28gfonEjYU4lbIYz07gPPtMXs method: GET response: body: "" @@ -423,7 +423,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: BAEDFF9AE9CC4EE79D5B6537A100BA74 Ref B: CO6AA3150218017 Ref C: 2023-09-01T18:05:43Z' + - 'Ref A: 6713BCD2ED8F45CDB2D7CA4C87DE497D Ref B: CO6AA3150219051 Ref C: 2023-11-29T00:31:12Z' status: 200 OK code: 200 duration: "" diff --git a/v2/internal/controllers/recordings/Test_OwnerIsARMIDOfWrongType_Rejected.yaml b/v2/internal/controllers/recordings/Test_OwnerIsARMIDOfWrongType_Rejected.yaml index 9f30f4f2d20..6a306154c57 100644 --- a/v2/internal/controllers/recordings/Test_OwnerIsARMIDOfWrongType_Rejected.yaml +++ b/v2/internal/controllers/recordings/Test_OwnerIsARMIDOfWrongType_Rejected.yaml @@ -35,7 +35,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 940A86212F9644ADA83518CDBB1271D8 Ref B: CO6AA3150219027 Ref C: 2023-09-01T22:11:32Z' + - 'Ref A: CDA5142FBE204B90940DC262B6F806C7 Ref B: CO6AA3150220053 Ref C: 2023-11-28T18:52:08Z' status: 201 Created code: 201 duration: "" @@ -69,7 +69,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: F2E8DB66D4EE452E847CBFE3B4A7A170 Ref B: CO6AA3150219027 Ref C: 2023-09-01T22:11:33Z' + - 'Ref A: 4F54853100CC40C5BEE6D40F6408A620 Ref B: CO6AA3150220053 Ref C: 2023-11-28T18:52:08Z' status: 200 OK code: 200 duration: "" @@ -93,7 +93,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRUUVZQVUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRUUVZQVUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367943320782696&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=Ro05bLAqvDXS5QeEd-zyON5XEmWrmglggdPU6pOHskVL0qJ5ZQ7GnKVv9Wvqd-zcEfyWeuKsgVySav-SbsL5Zr70jvpTeK5sqQAbd4gzE8rPGpXlOdhkWcEQiDJJpeAG280sCq1QHcrKIyuI0Xduu5t_hG36ol6M7kV8x74HRrzPafhHRS6tEdgSNrbaAEYAyKb5zDF7ZqQ3KY8g0R0aOeEujGn7SLcuc7H1eBU1rwT8teNOdCh59ntIbw3KpgEukf4w3De8kdY9FqeHGiTAVff03ZZEuZdrAUJqdhAJAe60COAfowhI7OVUQe_a9hzoSrq3QxtV0KoXKUjOcrwakA&h=xUGF7hp00ZbOdvYP4DFf6KtQ738WL8qYY2526xvkSKs Pragma: - no-cache Retry-After: @@ -105,7 +105,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 3D04055E0A8D45C6B327E555291DE329 Ref B: CO6AA3150219027 Ref C: 2023-09-01T22:11:34Z' + - 'Ref A: 956CA1319CFD4C20823FD687DD53D04D Ref B: CO6AA3150220053 Ref C: 2023-11-28T18:52:11Z' status: 202 Accepted code: 202 duration: "" @@ -115,7 +115,7 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRUUVZQVUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRUUVZQVUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367943320782696&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=Ro05bLAqvDXS5QeEd-zyON5XEmWrmglggdPU6pOHskVL0qJ5ZQ7GnKVv9Wvqd-zcEfyWeuKsgVySav-SbsL5Zr70jvpTeK5sqQAbd4gzE8rPGpXlOdhkWcEQiDJJpeAG280sCq1QHcrKIyuI0Xduu5t_hG36ol6M7kV8x74HRrzPafhHRS6tEdgSNrbaAEYAyKb5zDF7ZqQ3KY8g0R0aOeEujGn7SLcuc7H1eBU1rwT8teNOdCh59ntIbw3KpgEukf4w3De8kdY9FqeHGiTAVff03ZZEuZdrAUJqdhAJAe60COAfowhI7OVUQe_a9hzoSrq3QxtV0KoXKUjOcrwakA&h=xUGF7hp00ZbOdvYP4DFf6KtQ738WL8qYY2526xvkSKs method: GET response: body: "" @@ -135,7 +135,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: BF495087336E4E34BA9230050ED908C7 Ref B: CO6AA3150219027 Ref C: 2023-09-01T22:11:50Z' + - 'Ref A: DDFCBCBF9A3C4DAFA298C41552602F10 Ref B: CO6AA3150220053 Ref C: 2023-11-28T18:52:27Z' status: 200 OK code: 200 duration: "" diff --git a/v2/internal/controllers/recordings/Test_OwnerIsARMIDSetWithName_Rejected.yaml b/v2/internal/controllers/recordings/Test_OwnerIsARMIDSetWithName_Rejected.yaml index b684eca253a..b2e0de81f4d 100644 --- a/v2/internal/controllers/recordings/Test_OwnerIsARMIDSetWithName_Rejected.yaml +++ b/v2/internal/controllers/recordings/Test_OwnerIsARMIDSetWithName_Rejected.yaml @@ -35,7 +35,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 349DC951900C4FD8B95A59030FFC383D Ref B: CO6AA3150218037 Ref C: 2023-09-01T19:35:46Z' + - 'Ref A: 04115C2A64C342B69F4C2836F76227A0 Ref B: CO6AA3150218009 Ref C: 2023-11-28T18:51:13Z' status: 201 Created code: 201 duration: "" @@ -69,7 +69,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: B811D771571C4CE696D63BE031A405E0 Ref B: CO6AA3150218037 Ref C: 2023-09-01T19:35:46Z' + - 'Ref A: B51767F4E16D456BB123F8513A6DE86D Ref B: CO6AA3150218009 Ref C: 2023-11-28T18:51:13Z' status: 200 OK code: 200 duration: "" @@ -93,7 +93,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRYUEVETEotV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRYUEVETEotV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367942760165880&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=HG0RpP-xou4HMIzq9gbjLrGRwFmjUWR3ug8sWNm1-lxMLqSwQq-nURLDPTJ52ezx15nfCLjduOvC8hIyzX-dxc52DZN-K-WH3x-rG5WNsVa2nG8RStFudDUrWZYRcmjDDPYe-53DwsLA6Zg_cOy0JXw9z4tsONS_K0jcm2drYafgl_edKdvSi5TVnhOpaMKRu5DNkq87TLWanSq0I4sDBNMTP8u9jBLCbQh5C9-69zjg2BJ2lQWxeytR5-yH8wsq3nMh4IESJp6Th54AJJX0dFD8J3nLXw8EJ-r9IuKYNbzGLqy_t12-iOHcPn0A-ofy3y1jpL9J20cSRb1jNPPJHg&h=YE0nuBeb4sAKEP25YE4pfh3a7oofqe_6IvpqmwSUY5U Pragma: - no-cache Retry-After: @@ -105,7 +105,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 39C886FD46D144EDBF4942D2B885B7A4 Ref B: CO6AA3150218037 Ref C: 2023-09-01T19:35:48Z' + - 'Ref A: F6106133FD8C47C0BB16BD26780620E2 Ref B: CO6AA3150218009 Ref C: 2023-11-28T18:51:15Z' status: 202 Accepted code: 202 duration: "" @@ -115,7 +115,7 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRYUEVETEotV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRYUEVETEotV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367942760165880&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=HG0RpP-xou4HMIzq9gbjLrGRwFmjUWR3ug8sWNm1-lxMLqSwQq-nURLDPTJ52ezx15nfCLjduOvC8hIyzX-dxc52DZN-K-WH3x-rG5WNsVa2nG8RStFudDUrWZYRcmjDDPYe-53DwsLA6Zg_cOy0JXw9z4tsONS_K0jcm2drYafgl_edKdvSi5TVnhOpaMKRu5DNkq87TLWanSq0I4sDBNMTP8u9jBLCbQh5C9-69zjg2BJ2lQWxeytR5-yH8wsq3nMh4IESJp6Th54AJJX0dFD8J3nLXw8EJ-r9IuKYNbzGLqy_t12-iOHcPn0A-ofy3y1jpL9J20cSRb1jNPPJHg&h=YE0nuBeb4sAKEP25YE4pfh3a7oofqe_6IvpqmwSUY5U method: GET response: body: "" @@ -135,7 +135,7 @@ interactions: X-Content-Type-Options: - nosniff X-Msedge-Ref: - - 'Ref A: 22981FB784E24DE28D969BDBA446A2F7 Ref B: CO6AA3150218037 Ref C: 2023-09-01T19:36:03Z' + - 'Ref A: 3192844FEE9F4FFAA6BAD7343295A2AA Ref B: CO6AA3150218009 Ref C: 2023-11-28T18:51:31Z' status: 200 OK code: 200 duration: "" diff --git a/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Storage_v1api20230101_CreationAndDeletion.yaml b/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Storage_v1api20230101_CreationAndDeletion.yaml new file mode 100644 index 00000000000..0300e4b9d0c --- /dev/null +++ b/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Storage_v1api20230101_CreationAndDeletion.yaml @@ -0,0 +1,1498 @@ +--- +version: 1 +interactions: +- request: + body: '{"location":"westus2","name":"asotest-rg-jcwhqp","tags":{"CreatedAt":"2001-02-03T04:05:06Z"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "93" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp?api-version=2020-06-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp","name":"asotest-rg-jcwhqp","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "276" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 249F30B39B4D498A9A8518A8B7FC0A55 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:29:46Z' + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp","name":"asotest-rg-jcwhqp","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "276" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 47D2A5F94B97404E9A4CA95A272E0131 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:29:46Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"kind":"StorageV2","location":"westcentralus","name":"asotestldokrl","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "146" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl?api-version=2023-01-01 + method: PUT + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westcentralus/asyncoperations/9907fc64-2e78-4fa3-95d8-76ca2d04ef9b?monitor=true&api-version=2023-01-01&t=638367929932494442&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=MPNFjdx90Wf3p3EDkJOZeTFiu0bdZbtAznVD7bYkI7hDBNX8W2nCOZP_1x7HDAoZFlJ9l8CO7ylYDqErGcOlMqhnSa7q61Fk5ePdYCGU78l-kxPcNqH10yPJ6XV_J1gchTfAVJ25lwyv631bBTZka0pmvGR1d8GWo5dQgx2Exc2ZlSwQyvbeXuehXXHwmyHcr98JJDUhk2wAaCvz8vVOFRkCNOpM6AAZxH_chx3wSrkRe7g4KyLDNoNAy9F4yrxlmDjyqsM03s22t_vlqPJgCpG9w4GWh56W6UvcZFpMKymiYbbaisnn2SOmzr7bt_h10IIPcs-HQLgQQ1aKb-Pvmg&h=uxYFH2KNNQTfBst4RTX9DElI0rBn4jqLw2BBOFCzyk4 + Pragma: + - no-cache + Retry-After: + - "17" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: F81F2EBE1D444ADB8A7F602D02C89025 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:29:49Z' + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westcentralus/asyncoperations/9907fc64-2e78-4fa3-95d8-76ca2d04ef9b?monitor=true&api-version=2023-01-01&t=638367929932494442&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=MPNFjdx90Wf3p3EDkJOZeTFiu0bdZbtAznVD7bYkI7hDBNX8W2nCOZP_1x7HDAoZFlJ9l8CO7ylYDqErGcOlMqhnSa7q61Fk5ePdYCGU78l-kxPcNqH10yPJ6XV_J1gchTfAVJ25lwyv631bBTZka0pmvGR1d8GWo5dQgx2Exc2ZlSwQyvbeXuehXXHwmyHcr98JJDUhk2wAaCvz8vVOFRkCNOpM6AAZxH_chx3wSrkRe7g4KyLDNoNAy9F4yrxlmDjyqsM03s22t_vlqPJgCpG9w4GWh56W6UvcZFpMKymiYbbaisnn2SOmzr7bt_h10IIPcs-HQLgQQ1aKb-Pvmg&h=uxYFH2KNNQTfBst4RTX9DElI0rBn4jqLw2BBOFCzyk4 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westcentralus/asyncoperations/9907fc64-2e78-4fa3-95d8-76ca2d04ef9b?monitor=true&api-version=2023-01-01&t=638367929944999429&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=Q0CvVFFkOX0R190lu_JENCUcJY3tlXANKLNR0t5-hVS8QwpBUw0govy2tHWc5zE1_YbxSJNE48wN64bZlXM4lT1s0cntxtSEidlovZPoCCu9QkyquaXD0BQlx83clrr-Dgqmyr8dKkH3QYrMEBSV75HS_PArQSBydT4fLtgGeklKTR7HrUxSAE0Azs8vZTtYWYAETeP5qWTY9QhcgxT_vSgivr3e30Okq1l1jKBXPKCnoOQpto3Hruk-x3XQ5KMp0lx409VF6Xk6vJwgxuU1v8RS-IGvE-XMqo4wvWNyGB7GzAIohIM0Iw4-TOER_i-z3No_djxDya_XKZZWkTdf4A&h=Lqw55IMXGiqtHsgvROiN5rZ4UYYNrAYo01lsBvyO1U8 + Pragma: + - no-cache + Retry-After: + - "17" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 1CC3D7B954DD4390895A9382A9F33AEC Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:29:54Z' + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westcentralus/asyncoperations/9907fc64-2e78-4fa3-95d8-76ca2d04ef9b?monitor=true&api-version=2023-01-01&t=638367929932494442&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=MPNFjdx90Wf3p3EDkJOZeTFiu0bdZbtAznVD7bYkI7hDBNX8W2nCOZP_1x7HDAoZFlJ9l8CO7ylYDqErGcOlMqhnSa7q61Fk5ePdYCGU78l-kxPcNqH10yPJ6XV_J1gchTfAVJ25lwyv631bBTZka0pmvGR1d8GWo5dQgx2Exc2ZlSwQyvbeXuehXXHwmyHcr98JJDUhk2wAaCvz8vVOFRkCNOpM6AAZxH_chx3wSrkRe7g4KyLDNoNAy9F4yrxlmDjyqsM03s22t_vlqPJgCpG9w4GWh56W6UvcZFpMKymiYbbaisnn2SOmzr7bt_h10IIPcs-HQLgQQ1aKb-Pvmg&h=uxYFH2KNNQTfBst4RTX9DElI0rBn4jqLw2BBOFCzyk4 + method: GET + response: + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl","name":"asotestldokrl","type":"Microsoft.Storage/storageAccounts","location":"westcentralus","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"allowCrossTenantReplication":false,"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asotestldokrl.dfs.core.windows.net/","web":"https://asotestldokrl.z4.web.core.windows.net/","blob":"https://asotestldokrl.blob.core.windows.net/","queue":"https://asotestldokrl.queue.core.windows.net/","table":"https://asotestldokrl.table.core.windows.net/","file":"https://asotestldokrl.file.core.windows.net/"},"primaryLocation":"westcentralus","statusOfPrimary":"available"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1464" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 3507B2E038CB4B819E43CB815CE4F5CC Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:11Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl?api-version=2023-01-01 + method: GET + response: + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl","name":"asotestldokrl","type":"Microsoft.Storage/storageAccounts","location":"westcentralus","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"allowCrossTenantReplication":false,"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asotestldokrl.dfs.core.windows.net/","web":"https://asotestldokrl.z4.web.core.windows.net/","blob":"https://asotestldokrl.blob.core.windows.net/","queue":"https://asotestldokrl.queue.core.windows.net/","table":"https://asotestldokrl.table.core.windows.net/","file":"https://asotestldokrl.file.core.windows.net/"},"primaryLocation":"westcentralus","statusOfPrimary":"available"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1464" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 225A2DC26A0A4BAE8C4E6DC38693D1DD Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:11Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"default"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "18" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/tableServices/default?api-version=2023-01-01 + method: PUT + response: + body: '{"name":"default"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "18" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: E2CB6B952D534F4E86E3FF49561174B2 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:20Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"default"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "18" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/fileServices/default?api-version=2023-01-01 + method: PUT + response: + body: '{"name":"default"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "18" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 122055A8D07847D0971535044AD5CF38 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:20Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/tableServices/default?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/tableServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/tableServices","properties":{"cors":{"corsRules":[]}}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "286" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: F17E20899670485183445AF39AD50F00 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:20Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"default"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "18" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/blobServices/default?api-version=2023-01-01 + method: PUT + response: + body: '{"name":"default"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "18" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: D804530330444B4489B404D29E7E65B1 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:20Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/fileServices/default?api-version=2023-01-01 + method: GET + response: + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "417" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: BA7BB76E53AB40E99EE00B2EC72CE8E5 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:20Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/blobServices/default?api-version=2023-01-01 + method: GET + response: + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/blobServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/blobServices","properties":{"cors":{"corsRules":[]},"deleteRetentionPolicy":{"allowPermanentDelete":false,"enabled":false}}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "403" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 4B8D546FC5D44183896F71CB0D481371 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:20Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"default","properties":{"policy":{"rules":[{"definition":{"actions":{"version":{"delete":{"daysAfterCreationGreaterThan":30}}},"filters":{"blobIndexMatch":null,"blobTypes":["blockBlob"],"prefixMatch":["sample-container/blob1"]}},"enabled":true,"name":"test-rule","type":"Lifecycle"}]}}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "294" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/managementPolicies/default?api-version=2023-01-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/managementPolicies/default","name":"DefaultManagementPolicy","type":"Microsoft.Storage/storageAccounts/managementPolicies","properties":{"policy":{"rules":[{"enabled":true,"name":"test-rule","type":"Lifecycle","definition":{"actions":{"version":{"delete":{"daysAfterCreationGreaterThan":30.0}}},"filters":{"blobTypes":["blockBlob"],"prefixMatch":["sample-container/blob1"]}}}]},"lastModifiedTime":"2001-02-03T04:05:06Z"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "579" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 985C327EA5D141539BF887B62BB736D4 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:20Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/managementPolicies/default?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/managementPolicies/default","name":"DefaultManagementPolicy","type":"Microsoft.Storage/storageAccounts/managementPolicies","properties":{"policy":{"rules":[{"enabled":true,"name":"test-rule","type":"Lifecycle","definition":{"actions":{"version":{"delete":{"daysAfterCreationGreaterThan":30.0}}},"filters":{"blobTypes":["blockBlob"],"prefixMatch":["sample-container/blob1"]}}}]},"lastModifiedTime":"2001-02-03T04:05:06Z"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "579" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 3B61353EA83F42BFA8DDBE0891907EB9 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:20Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"default"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "18" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/queueServices/default?api-version=2023-01-01 + method: PUT + response: + body: '{"name":"default"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "18" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: BCEF32ABC10248D2868B88FAF4004468 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:20Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/queueServices/default?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/queueServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/queueServices","properties":{"logging":{"version":"1.0","delete":false,"read":false,"write":false,"retentionPolicy":{"enabled":false}},"cors":{"corsRules":[]}}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "392" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: FB4ECDBCECAA47E79C45BF8CCD20707C Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:22Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"asotestydurmg"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "24" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/queueServices/default/queues/asotestydurmg?api-version=2023-01-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/queueServices/default/queues/asotestydurmg","name":"asotestydurmg","type":"Microsoft.Storage/storageAccounts/queueServices/queues","properties":{"metadata":{}}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "310" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: DFB280D62F0B49869F42BE2C02C06805 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:52Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/queueServices/default/queues/asotestydurmg?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/queueServices/default/queues/asotestydurmg","name":"asotestydurmg","type":"Microsoft.Storage/storageAccounts/queueServices/queues","properties":{"metadata":{},"approximateMessageCount":0}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "338" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 595350CFA40240649AEBE928067A372F Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:52Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"asotestfkdwgo"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "24" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/fileServices/default/shares/asotestfkdwgo?api-version=2023-01-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/fileServices/default/shares/asotestfkdwgo","name":"asotestfkdwgo","type":"Microsoft.Storage/storageAccounts/fileServices/shares"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "279" + Content-Type: + - application/json + Etag: + - '"0x8DBF04027002FAB"' + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 2F2A6605AE9542BEA84806202E46611B Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:52Z' + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"name":"asotestezisjh"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "24" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/blobServices/default/containers/asotestezisjh?api-version=2023-01-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/blobServices/default/containers/asotestezisjh","name":"asotestezisjh","type":"Microsoft.Storage/storageAccounts/blobServices/containers"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "287" + Content-Type: + - application/json + Etag: + - '"0x8DBF0402719055A"' + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 7CF36417577B40A09EEAC4003D4F2A13 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:52Z' + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"name":"asotestmmnsgp"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "24" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/tableServices/default/tables/asotestmmnsgp?api-version=2023-01-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/tableServices/default/tables/asotestmmnsgp","name":"asotestmmnsgp","type":"Microsoft.Storage/storageAccounts/tableServices/tables","properties":{"tableName":"asotestmmnsgp"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "324" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 9ED0C3E163164483B6F0A55C349A04A7 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:52Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/tableServices/default/tables/asotestmmnsgp?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/tableServices/default/tables/asotestmmnsgp","name":"asotestmmnsgp","type":"Microsoft.Storage/storageAccounts/tableServices/tables","properties":{"signedIdentifiers":[],"tableName":"asotestmmnsgp"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "347" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: CC2CAB0F48804B8C949DA3632225068F Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:52Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/fileServices/default/shares/asotestfkdwgo?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/fileServices/default/shares/asotestfkdwgo","name":"asotestfkdwgo","type":"Microsoft.Storage/storageAccounts/fileServices/shares","etag":"\"0x8DBF04027002FAB\"","properties":{"leaseStatus":"unlocked","leaseState":"available","signedIdentifiers":[],"accessTier":"TransactionOptimized","accessTierChangeTime":"2001-02-03T04:05:06Z","lastModifiedTime":"2001-02-03T04:05:06Z","shareQuota":5120}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "556" + Content-Type: + - application/json + Etag: + - '"0x8DBF04027002FAB"' + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 95667BAFCE8D4A249CFF423844FF3523 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:53Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/blobServices/default/containers/asotestezisjh?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/blobServices/default/containers/asotestezisjh","name":"asotestezisjh","type":"Microsoft.Storage/storageAccounts/blobServices/containers","etag":"\"0x8DBF0402719055A\"","properties":{"deleted":false,"remainingRetentionDays":0,"defaultEncryptionScope":"$account-encryption-key","denyEncryptionScopeOverride":false,"publicAccess":"None","leaseStatus":"Unlocked","leaseState":"Available","lastModifiedTime":"2001-02-03T04:05:06Z","legalHold":{"hasLegalHold":false,"tags":[]},"hasImmutabilityPolicy":false,"hasLegalHold":false}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "681" + Content-Type: + - application/json + Etag: + - '"0x8DBF0402719055A"' + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: A3C38E8CD224411FB4DB2F927C8BEA85 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:53Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/fileServices/default/shares/asotestfkdwgo?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/fileServices/default/shares/asotestfkdwgo","name":"asotestfkdwgo","type":"Microsoft.Storage/storageAccounts/fileServices/shares","etag":"\"0x8DBF04027002FAB\"","properties":{"leaseStatus":"unlocked","leaseState":"available","signedIdentifiers":[],"accessTier":"TransactionOptimized","accessTierChangeTime":"2001-02-03T04:05:06Z","lastModifiedTime":"2001-02-03T04:05:06Z","shareQuota":5120}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "556" + Content-Type: + - application/json + Etag: + - '"0x8DBF04027002FAB"' + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 0257AB2B1D244C2FAB4B116A54B271E0 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:53Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/blobServices/default/containers/asotestezisjh?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/blobServices/default/containers/asotestezisjh","name":"asotestezisjh","type":"Microsoft.Storage/storageAccounts/blobServices/containers","etag":"\"0x8DBF0402719055A\"","properties":{"deleted":false,"remainingRetentionDays":0,"defaultEncryptionScope":"$account-encryption-key","denyEncryptionScopeOverride":false,"publicAccess":"None","leaseStatus":"Unlocked","leaseState":"Available","lastModifiedTime":"2001-02-03T04:05:06Z","legalHold":{"hasLegalHold":false,"tags":[]},"hasImmutabilityPolicy":false,"hasLegalHold":false}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "681" + Content-Type: + - application/json + Etag: + - '"0x8DBF0402719055A"' + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 92A7D05B99904F35969532F9F1137C2F Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:53Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp?api-version=2020-06-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRKQ1dIUVAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367930544966484&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=XB3hviQN0eC4-v39zsDgyqbsW8fuKk93aSBKefFCvF7YouScmmHjXe4K85KMDQwfOSroVcP7JLdX1mmuUiegiBxHI4-qWYwJYbae2HlQrmTDXvvaX2c9WceKu0ZkkKj9Yau3le1W7KXhDwzfA8UO78vHcE4b4C_07GtfesUm1cwQrq6zH7Gcc8Ygb1u1-divUiONwvIbjrfY9W7zDzCiidNaTR7nzEtViSqna9RGUAUYjWStBZxuX_0xL9lm9CcAnslmpgfDr5bI0mG3UYoAuJ51q95KWRa_RPjUaI86uqDXpj051HLGY2tQOZEQDQURWV4X-tAlyc3V1llocvQplg&h=BoO34fy_Azmgdxey7Z_sGElu2nIjdTATuWMMOCKXNx0 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: E1A948FDE074406E838EB6CF36BEE6FD Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:30:54Z' + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRKQ1dIUVAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367930544966484&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=XB3hviQN0eC4-v39zsDgyqbsW8fuKk93aSBKefFCvF7YouScmmHjXe4K85KMDQwfOSroVcP7JLdX1mmuUiegiBxHI4-qWYwJYbae2HlQrmTDXvvaX2c9WceKu0ZkkKj9Yau3le1W7KXhDwzfA8UO78vHcE4b4C_07GtfesUm1cwQrq6zH7Gcc8Ygb1u1-divUiONwvIbjrfY9W7zDzCiidNaTR7nzEtViSqna9RGUAUYjWStBZxuX_0xL9lm9CcAnslmpgfDr5bI0mG3UYoAuJ51q95KWRa_RPjUaI86uqDXpj051HLGY2tQOZEQDQURWV4X-tAlyc3V1llocvQplg&h=BoO34fy_Azmgdxey7Z_sGElu2nIjdTATuWMMOCKXNx0 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRKQ1dIUVAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367930696140806&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=j-ujGqcnNS7DRM5xfPw9gYNrzFxh8f_Qv8Pd9Gi6D54Hev7jyXon2mZPl1T4ZZoLbF4_rwcoG5WxbnOCgvoQIEQTkh2But6R2eq6rYTbN6uPYaIVu-ZsESX4BCnHYNuc-9bkB4FTkpv6M6hNCdbVpKoTX1d-ze1x2f02uNl9gyZ1n6pwxh3ma7y_XNq3OvOBA9HTjO-btjXPhKXHekT3zQ_rMxjWvkGM7Y7CxRZk69i-bqT-n7TOwPrPpgheMezLTeseDl6HNl6bTuppSZd4RjSNmANtxcmc7oxuEj4Jjrx9Dt4i5ZiwQTFqxUAV9C1GetaQitg-wetX_dZ7OLvyyQ&h=DebfmDAjd4pPBOXMl8sO8TghejyoJsl9tlY-4F08oRU + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: D88E152D54B241C6B0DC52FA5B90A21E Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:31:09Z' + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRKQ1dIUVAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367930544966484&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=XB3hviQN0eC4-v39zsDgyqbsW8fuKk93aSBKefFCvF7YouScmmHjXe4K85KMDQwfOSroVcP7JLdX1mmuUiegiBxHI4-qWYwJYbae2HlQrmTDXvvaX2c9WceKu0ZkkKj9Yau3le1W7KXhDwzfA8UO78vHcE4b4C_07GtfesUm1cwQrq6zH7Gcc8Ygb1u1-divUiONwvIbjrfY9W7zDzCiidNaTR7nzEtViSqna9RGUAUYjWStBZxuX_0xL9lm9CcAnslmpgfDr5bI0mG3UYoAuJ51q95KWRa_RPjUaI86uqDXpj051HLGY2tQOZEQDQURWV4X-tAlyc3V1llocvQplg&h=BoO34fy_Azmgdxey7Z_sGElu2nIjdTATuWMMOCKXNx0 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRKQ1dIUVAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367930846532562&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=ZT2YtCvTTdCQPoLOhTvdlDNuHk53QFlUKteNKMRXY4NqLkeyasRY2-YNK58wjp4FoqKcVQ-Nar4PKJDN3qg3_iECKw_11xGStzOrM7w3aAM-VjghtUHEFkD0CThKNDJWd61czXrqKJJ7r4jZ3bISx4Ug_DxN-oHF4B01noadgYtJKrvD7Sf882zqXJ8CFAD2Jgs734ctz1g6RLZlUGUe6z9gKQn4wcRN3ydDGi-hlMzCB0zRzqQ5-hn7O56C-9ZVboNVEih3flcqWcTr4kNgJpGdrhQoyOMCI0-YOzVQopBd2WpUnJbxl5UHfs7LHRnkfc_FLvrgoBmipvsBFWRuKw&h=Wls0lI0XnKJrSLcANlixlfUihsHH_myMGglegx1wxN8 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 19D209BAF2EB4EA7ADBE350A8AA83F7C Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:31:24Z' + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRKQ1dIUVAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367930544966484&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=XB3hviQN0eC4-v39zsDgyqbsW8fuKk93aSBKefFCvF7YouScmmHjXe4K85KMDQwfOSroVcP7JLdX1mmuUiegiBxHI4-qWYwJYbae2HlQrmTDXvvaX2c9WceKu0ZkkKj9Yau3le1W7KXhDwzfA8UO78vHcE4b4C_07GtfesUm1cwQrq6zH7Gcc8Ygb1u1-divUiONwvIbjrfY9W7zDzCiidNaTR7nzEtViSqna9RGUAUYjWStBZxuX_0xL9lm9CcAnslmpgfDr5bI0mG3UYoAuJ51q95KWRa_RPjUaI86uqDXpj051HLGY2tQOZEQDQURWV4X-tAlyc3V1llocvQplg&h=BoO34fy_Azmgdxey7Z_sGElu2nIjdTATuWMMOCKXNx0 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRKQ1dIUVAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367930997063611&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=NP4AeEPEyNMQavjmkByn7X3elFU76oF8fMG7iHLLpy7trecRTgD-0XAeuW3Xs0BW_h16SNJiojx5LEtjM60lmyBmSQjhQcojQrj1F-4te5wfjBdh7NislXAFhacwCqamOA7LtmHJfxhSuK3EZAtYGuOw-vO7EdLob54tWjKrGIQK4-1z55SdJELKWfIglHg6ShTM4Cx6n5Yl62oliz0jQZ59nTgSi3To2ILIZVoWHNp-kZUIjD5KgNWOp5wqvmGTW-dkIKEJuMJtQHrCx5Sjqp2yXlEvLC2irSsiwlQwAFALnGsOsZgtNbz_lkrcZEcMCV_wjKVoOFwHnsSCZBelog&h=tEKK8idJYCEMHQeGh29yQNP_6OpVfFNrSv4Ju30Bxmw + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 01C1F29DEAAB4142812CD0F7232AEAF2 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:31:39Z' + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRKQ1dIUVAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367930544966484&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=XB3hviQN0eC4-v39zsDgyqbsW8fuKk93aSBKefFCvF7YouScmmHjXe4K85KMDQwfOSroVcP7JLdX1mmuUiegiBxHI4-qWYwJYbae2HlQrmTDXvvaX2c9WceKu0ZkkKj9Yau3le1W7KXhDwzfA8UO78vHcE4b4C_07GtfesUm1cwQrq6zH7Gcc8Ygb1u1-divUiONwvIbjrfY9W7zDzCiidNaTR7nzEtViSqna9RGUAUYjWStBZxuX_0xL9lm9CcAnslmpgfDr5bI0mG3UYoAuJ51q95KWRa_RPjUaI86uqDXpj051HLGY2tQOZEQDQURWV4X-tAlyc3V1llocvQplg&h=BoO34fy_Azmgdxey7Z_sGElu2nIjdTATuWMMOCKXNx0 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: F54406CDACF947E28731813950F59E57 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:31:54Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-jcwhqp'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "109" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: 13E8E72A44C9414FAA410913C42CEA73 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:31:59Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/queueServices/default?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform + ''delete'' on resource(s) of type ''storageAccounts/queueServices'', because + the parent resource ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "331" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: 8FCEC013EEB54DE9A6723264117481D9 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:32:04Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/managementPolicies/default?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Storage/storageAccounts/asotestldokrl'' + under resource group ''asotest-rg-jcwhqp'' was not found. For more details please + go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "236" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: 862BBB0B38F845D0A4F55A6AB7A36298 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:32:04Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/fileServices/default?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform + ''delete'' on resource(s) of type ''storageAccounts/fileServices'', because + the parent resource ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "330" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: D01069F3A719445583510A48B01CABD9 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:32:04Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/blobServices/default?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform + ''delete'' on resource(s) of type ''storageAccounts/blobServices'', because + the parent resource ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "330" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: 3D86D88B872349E79B9FB52F87BC3690 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:32:04Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/tableServices/default?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform + ''delete'' on resource(s) of type ''storageAccounts/tableServices'', because + the parent resource ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "331" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: A9CCBA1A88FF448EBCF9F0902D89CD63 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:32:04Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/tableServices/default/tables/asotestmmnsgp?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform + ''delete'' on resource(s) of type ''storageAccounts/tableServices'', because + the parent resource ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "331" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: 36412F1480BD434EBE5C04932667545F Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:32:09Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/queueServices/default/queues/asotestydurmg?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform + ''delete'' on resource(s) of type ''storageAccounts/queueServices'', because + the parent resource ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "331" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: E33FA8AD76E44186AD5DD54CFF42183D Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:32:09Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/blobServices/default/containers/asotestezisjh?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform + ''delete'' on resource(s) of type ''storageAccounts/blobServices'', because + the parent resource ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "330" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: 3FC50B92A80241BD830127DE30694F34 Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:32:09Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl/fileServices/default/shares/asotestfkdwgo?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform + ''delete'' on resource(s) of type ''storageAccounts/fileServices'', because + the parent resource ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-jcwhqp/providers/Microsoft.Storage/storageAccounts/asotestldokrl'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "330" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: 93E6F786E149486D944BCC94F5A6485F Ref B: CO6AA3150218019 Ref C: 2023-11-28T18:32:09Z' + status: 404 Not Found + code: 404 + duration: "" diff --git a/v2/internal/controllers/recordings/Test_Storage_StorageAccount_20220901_CRUD.yaml b/v2/internal/controllers/recordings/Test_Storage_StorageAccount_20220901_CRUD.yaml deleted file mode 100644 index ce172640f6e..00000000000 --- a/v2/internal/controllers/recordings/Test_Storage_StorageAccount_20220901_CRUD.yaml +++ /dev/null @@ -1,1299 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"location":"westus2","name":"asotest-rg-bregxf","tags":{"CreatedAt":"2001-02-03T04:05:06Z"}}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "93" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf?api-version=2020-06-01 - method: PUT - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf","name":"asotest-rg-bregxf","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - Cache-Control: - - no-cache - Content-Length: - - "276" - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf?api-version=2020-06-01 - method: GET - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf","name":"asotest-rg-bregxf","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"kind":"StorageV2","location":"westus2","name":"asoteststorlqnslh","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "144" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh?api-version=2022-09-01 - method: PUT - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Content-Type: - - text/plain; charset=utf-8 - Expires: - - "-1" - Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/2309629c-61e3-4506-9134-b0c2c4c0e7ee?monitor=true&api-version=2022-09-01 - Pragma: - - no-cache - Retry-After: - - "17" - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/2309629c-61e3-4506-9134-b0c2c4c0e7ee?monitor=true&api-version=2022-09-01 - method: GET - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Content-Type: - - text/plain; charset=utf-8 - Expires: - - "-1" - Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/2309629c-61e3-4506-9134-b0c2c4c0e7ee?monitor=true&api-version=2022-09-01 - Pragma: - - no-cache - Retry-After: - - "17" - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/2309629c-61e3-4506-9134-b0c2c4c0e7ee?monitor=true&api-version=2022-09-01 - method: GET - response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh","name":"asoteststorlqnslh","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorlqnslh.dfs.core.windows.net/","web":"https://asoteststorlqnslh.z5.web.core.windows.net/","blob":"https://asoteststorlqnslh.blob.core.windows.net/","queue":"https://asoteststorlqnslh.queue.core.windows.net/","table":"https://asoteststorlqnslh.table.core.windows.net/","file":"https://asoteststorlqnslh.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh?api-version=2022-09-01 - method: GET - response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh","name":"asoteststorlqnslh","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorlqnslh.dfs.core.windows.net/","web":"https://asoteststorlqnslh.z5.web.core.windows.net/","blob":"https://asoteststorlqnslh.blob.core.windows.net/","queue":"https://asoteststorlqnslh.queue.core.windows.net/","table":"https://asoteststorlqnslh.table.core.windows.net/","file":"https://asoteststorlqnslh.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"name":"default"}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "18" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/fileServices/default?api-version=2022-09-01 - method: PUT - response: - body: '{"name":"default"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"name":"default"}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "18" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/blobServices/default?api-version=2022-09-01 - method: PUT - response: - body: '{"name":"default"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/fileServices/default?api-version=2022-09-01 - method: GET - response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/blobServices/default?api-version=2022-09-01 - method: GET - response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/blobServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/blobServices","properties":{"cors":{"corsRules":[]},"deleteRetentionPolicy":{"allowPermanentDelete":false,"enabled":false}}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"name":"default","properties":{"policy":{"rules":[{"definition":{"actions":{"version":{"delete":{"daysAfterCreationGreaterThan":30}}},"filters":{"blobIndexMatch":null,"blobTypes":["blockBlob"],"prefixMatch":["sample-container/blob1"]}},"enabled":true,"name":"test-rule","type":"Lifecycle"}]}}}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "294" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/managementPolicies/default?api-version=2022-09-01 - method: PUT - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/managementPolicies/default","name":"DefaultManagementPolicy","type":"Microsoft.Storage/storageAccounts/managementPolicies","properties":{"policy":{"rules":[{"enabled":true,"name":"test-rule","type":"Lifecycle","definition":{"actions":{"version":{"delete":{"daysAfterCreationGreaterThan":30.0}}},"filters":{"blobTypes":["blockBlob"],"prefixMatch":["sample-container/blob1"]}}}]},"lastModifiedTime":"2001-02-03T04:05:06Z"}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"name":"default"}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "18" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/tableServices/default?api-version=2022-09-01 - method: PUT - response: - body: '{"name":"default"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/managementPolicies/default?api-version=2022-09-01 - method: GET - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/managementPolicies/default","name":"DefaultManagementPolicy","type":"Microsoft.Storage/storageAccounts/managementPolicies","properties":{"policy":{"rules":[{"enabled":true,"name":"test-rule","type":"Lifecycle","definition":{"actions":{"version":{"delete":{"daysAfterCreationGreaterThan":30.0}}},"filters":{"blobTypes":["blockBlob"],"prefixMatch":["sample-container/blob1"]}}}]},"lastModifiedTime":"2001-02-03T04:05:06Z"}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/tableServices/default?api-version=2022-09-01 - method: GET - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/tableServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/tableServices","properties":{"cors":{"corsRules":[]}}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/managementPolicies/default?api-version=2022-09-01 - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Content-Type: - - text/plain; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"name":"default"}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "18" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/queueServices/default?api-version=2022-09-01 - method: PUT - response: - body: '{"name":"default"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/queueServices/default?api-version=2022-09-01 - method: GET - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/queueServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/queueServices","properties":{"logging":{"version":"1.0","delete":false,"read":false,"write":false,"retentionPolicy":{"enabled":false}},"cors":{"corsRules":[]}}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"name":"asotest-container-emxumt"}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "35" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/blobServices/default/containers/asotest-container-emxumt?api-version=2022-09-01 - method: PUT - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/blobServices/default/containers/asotest-container-emxumt","name":"asotest-container-emxumt","type":"Microsoft.Storage/storageAccounts/blobServices/containers"}' - headers: - Cache-Control: - - no-cache - Content-Length: - - "313" - Content-Type: - - application/json - Etag: - - '"0x8DB68764875164C"' - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"name":"asotest-container-snmuja"}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "35" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/fileServices/default/shares/asotest-container-snmuja?api-version=2022-09-01 - method: PUT - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/fileServices/default/shares/asotest-container-snmuja","name":"asotest-container-snmuja","type":"Microsoft.Storage/storageAccounts/fileServices/shares"}' - headers: - Cache-Control: - - no-cache - Content-Length: - - "305" - Content-Type: - - application/json - Etag: - - '"0x8DB6876488D7D93"' - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/blobServices/default/containers/asotest-container-emxumt?api-version=2022-09-01 - method: GET - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/blobServices/default/containers/asotest-container-emxumt","name":"asotest-container-emxumt","type":"Microsoft.Storage/storageAccounts/blobServices/containers","etag":"\"0x8DB68764875164C\"","properties":{"deleted":false,"remainingRetentionDays":0,"defaultEncryptionScope":"$account-encryption-key","denyEncryptionScopeOverride":false,"publicAccess":"None","leaseStatus":"Unlocked","leaseState":"Available","lastModifiedTime":"2001-02-03T04:05:06Z","legalHold":{"hasLegalHold":false,"tags":[]},"hasImmutabilityPolicy":false,"hasLegalHold":false}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Etag: - - '"0x8DB68764875164C"' - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/fileServices/default/shares/asotest-container-snmuja?api-version=2022-09-01 - method: GET - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/fileServices/default/shares/asotest-container-snmuja","name":"asotest-container-snmuja","type":"Microsoft.Storage/storageAccounts/fileServices/shares","etag":"\"0x8DB6876488D7D93\"","properties":{"leaseStatus":"unlocked","leaseState":"available","signedIdentifiers":[],"accessTier":"TransactionOptimized","accessTierChangeTime":"2001-02-03T04:05:06Z","lastModifiedTime":"2001-02-03T04:05:06Z","shareQuota":5120}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Etag: - - '"0x8DB6876488D7D93"' - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/blobServices/default/containers/asotest-container-emxumt?api-version=2022-09-01 - method: GET - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/blobServices/default/containers/asotest-container-emxumt","name":"asotest-container-emxumt","type":"Microsoft.Storage/storageAccounts/blobServices/containers","etag":"\"0x8DB68764875164C\"","properties":{"deleted":false,"remainingRetentionDays":0,"defaultEncryptionScope":"$account-encryption-key","denyEncryptionScopeOverride":false,"publicAccess":"None","leaseStatus":"Unlocked","leaseState":"Available","lastModifiedTime":"2001-02-03T04:05:06Z","legalHold":{"hasLegalHold":false,"tags":[]},"hasImmutabilityPolicy":false,"hasLegalHold":false}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Etag: - - '"0x8DB68764875164C"' - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/fileServices/default/shares/asotest-container-snmuja?api-version=2022-09-01 - method: GET - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/fileServices/default/shares/asotest-container-snmuja","name":"asotest-container-snmuja","type":"Microsoft.Storage/storageAccounts/fileServices/shares","etag":"\"0x8DB6876488D7D93\"","properties":{"leaseStatus":"unlocked","leaseState":"available","signedIdentifiers":[],"accessTier":"TransactionOptimized","accessTierChangeTime":"2001-02-03T04:05:06Z","lastModifiedTime":"2001-02-03T04:05:06Z","shareQuota":5120}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Etag: - - '"0x8DB6876488D7D93"' - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/blobServices/default/containers/asotest-container-emxumt?api-version=2022-09-01 - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Content-Type: - - text/plain; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/fileServices/default/shares/asotest-container-snmuja?api-version=2022-09-01 - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Content-Type: - - text/plain; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"name":"testtable"}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "20" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/tableServices/default/tables/testtable?api-version=2022-09-01 - method: PUT - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/tableServices/default/tables/testtable","name":"testtable","type":"Microsoft.Storage/storageAccounts/tableServices/tables","properties":{"tableName":"testtable"}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"name":"asotest-queue-gonigm"}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "31" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/queueServices/default/queues/asotest-queue-gonigm?api-version=2022-09-01 - method: PUT - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/queueServices/default/queues/asotest-queue-gonigm","name":"asotest-queue-gonigm","type":"Microsoft.Storage/storageAccounts/queueServices/queues","properties":{"metadata":{}}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/tableServices/default/tables/testtable?api-version=2022-09-01 - method: GET - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/tableServices/default/tables/testtable","name":"testtable","type":"Microsoft.Storage/storageAccounts/tableServices/tables","properties":{"signedIdentifiers":[],"tableName":"testtable"}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/queueServices/default/queues/asotest-queue-gonigm?api-version=2022-09-01 - method: GET - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/queueServices/default/queues/asotest-queue-gonigm","name":"asotest-queue-gonigm","type":"Microsoft.Storage/storageAccounts/queueServices/queues","properties":{"metadata":{},"approximateMessageCount":0}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/tableServices/default/tables/testtable?api-version=2022-09-01 - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Type: - - text/plain; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/queueServices/default/queues/asotest-queue-gonigm?api-version=2022-09-01 - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Type: - - text/plain; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh?api-version=2022-09-01 - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Content-Type: - - text/plain; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh?api-version=2022-09-01 - method: GET - response: - body: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Storage/storageAccounts/asoteststorlqnslh'' - under resource group ''asotest-rg-bregxf'' was not found. For more details please - go to https://aka.ms/ARMResourceNotFoundFix"}}' - headers: - Cache-Control: - - no-cache - Content-Length: - - "240" - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Ms-Failure-Cause: - - gateway - status: 404 Not Found - code: 404 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf?api-version=2020-06-01 - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Expires: - - "-1" - Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRCUkVHWEYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 - Pragma: - - no-cache - Retry-After: - - "15" - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRCUkVHWEYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 - method: GET - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/fileServices/default?api-version=2022-09-01 - method: DELETE - response: - body: '{"error":{"code":"ParentResourceNotFound","message":"Can not perform requested - operation on nested resource. Parent resource ''asoteststorlqnslh'' not found."}}' - headers: - Cache-Control: - - no-cache - Content-Length: - - "158" - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Ms-Failure-Cause: - - gateway - status: 404 Not Found - code: 404 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/queueServices/default?api-version=2022-09-01 - method: DELETE - response: - body: '{"error":{"code":"ParentResourceNotFound","message":"Can not perform requested - operation on nested resource. Parent resource ''asoteststorlqnslh'' not found."}}' - headers: - Cache-Control: - - no-cache - Content-Length: - - "158" - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Ms-Failure-Cause: - - gateway - status: 404 Not Found - code: 404 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/tableServices/default?api-version=2022-09-01 - method: DELETE - response: - body: '{"error":{"code":"ParentResourceNotFound","message":"Can not perform requested - operation on nested resource. Parent resource ''asoteststorlqnslh'' not found."}}' - headers: - Cache-Control: - - no-cache - Content-Length: - - "158" - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Ms-Failure-Cause: - - gateway - status: 404 Not Found - code: 404 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-bregxf/providers/Microsoft.Storage/storageAccounts/asoteststorlqnslh/blobServices/default?api-version=2022-09-01 - method: DELETE - response: - body: '{"error":{"code":"ParentResourceNotFound","message":"Can not perform requested - operation on nested resource. Parent resource ''asoteststorlqnslh'' not found."}}' - headers: - Cache-Control: - - no-cache - Content-Length: - - "158" - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Ms-Failure-Cause: - - gateway - status: 404 Not Found - code: 404 - duration: "" diff --git a/v2/internal/controllers/recordings/Test_Storage_StorageAccount_20230101_CRUD.yaml b/v2/internal/controllers/recordings/Test_Storage_StorageAccount_20230101_CRUD.yaml new file mode 100644 index 00000000000..3737354163d --- /dev/null +++ b/v2/internal/controllers/recordings/Test_Storage_StorageAccount_20230101_CRUD.yaml @@ -0,0 +1,1403 @@ +--- +version: 1 +interactions: +- request: + body: '{"location":"westus2","name":"asotest-rg-cleldp","tags":{"CreatedAt":"2001-02-03T04:05:06Z"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "93" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp?api-version=2020-06-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp","name":"asotest-rg-cleldp","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "276" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 8D22A13B259C4F779373C49934D48F6B Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:22:54Z' + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp","name":"asotest-rg-cleldp","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "276" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 1D4FE6659C5E4303BD2A2F6426EC7B60 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:22:54Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"kind":"StorageV2","location":"westus2","name":"asoteststorogimjc","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "144" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc?api-version=2023-01-01 + method: PUT + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/ed5e582f-b55d-49db-a700-9e11a717652a?monitor=true&api-version=2023-01-01&t=638367925800870707&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=Kid_qxkLH77ayztq51I5HZuUB64MfD9S1LedZ8RcatPKLPGgWX9fOHGMt6pLF0LwhIRuxgBXN-lv_dgzt35-tJDNCTDlcc7DdwDnDUY8Qj161wZzRAEROePuU_b4EwmnldLOIhG68QRrWw2IUvi59CELOU-pM4vYIQywRBA5w_BKpWGd00D1-XazPtwLhmUTyFH7pIHZDHwiQiC2rBFMPfXm2fLPSrr9IDgxtnhdvBZrQStxHh8CeEgWfyTISZAqAhgAkwhNzyDY5xKMixr-Cv5XpcPWnICgVlYO3nqSOhIS_fe4HUDsqIoEO5HmXS0BzBpep-RjjurbmNgBXOtkZw&h=R2gFXVBMsxbXyJ1h0LroS7iKkkxImW-S1P_0jqoKhGk + Pragma: + - no-cache + Retry-After: + - "17" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 59F7B92007B2418BBCBA270830B3F00F Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:22:57Z' + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/ed5e582f-b55d-49db-a700-9e11a717652a?monitor=true&api-version=2023-01-01&t=638367925800870707&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=Kid_qxkLH77ayztq51I5HZuUB64MfD9S1LedZ8RcatPKLPGgWX9fOHGMt6pLF0LwhIRuxgBXN-lv_dgzt35-tJDNCTDlcc7DdwDnDUY8Qj161wZzRAEROePuU_b4EwmnldLOIhG68QRrWw2IUvi59CELOU-pM4vYIQywRBA5w_BKpWGd00D1-XazPtwLhmUTyFH7pIHZDHwiQiC2rBFMPfXm2fLPSrr9IDgxtnhdvBZrQStxHh8CeEgWfyTISZAqAhgAkwhNzyDY5xKMixr-Cv5XpcPWnICgVlYO3nqSOhIS_fe4HUDsqIoEO5HmXS0BzBpep-RjjurbmNgBXOtkZw&h=R2gFXVBMsxbXyJ1h0LroS7iKkkxImW-S1P_0jqoKhGk + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/ed5e582f-b55d-49db-a700-9e11a717652a?monitor=true&api-version=2023-01-01&t=638367925812129515&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=b1-K7UCouYXyenzZE4h4iHEHSlLEwsI_f1yYJ6m66Lved1ZO5eVP8g4x22h5qwlscdsQHRO35AfYeRkWm5-KuwF_QhlBurttvig7lh2nq7-B273BIWruNJNaKduGqcS6zJa8LraKunqaeuLDHnwN_MA2qX0bg35BI1AKzaKAGfSSBzLxcRFFjgEho-XUOxKb9XYfTkwXxdQefjkjyQDpg8dmmoZiNsLz7aNhlKDTGmmiHfXs4tfuv_pO4M010b80mik5tDM3naH357pRXgcJ2rOFq_Mxm5tAG0tP_P7bgCXs73UnbiZv2ZEl2gW2X-fo_v-bdC9-kIr8Ryfym4J4ug&h=tHpqFMfDH0WrGaI10vWka4kHGaPZhnCaCl_5Gphxx9w + Pragma: + - no-cache + Retry-After: + - "17" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: EA26234CEF7A4C8187BDE7E03E2F3657 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:01Z' + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/ed5e582f-b55d-49db-a700-9e11a717652a?monitor=true&api-version=2023-01-01&t=638367925800870707&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=Kid_qxkLH77ayztq51I5HZuUB64MfD9S1LedZ8RcatPKLPGgWX9fOHGMt6pLF0LwhIRuxgBXN-lv_dgzt35-tJDNCTDlcc7DdwDnDUY8Qj161wZzRAEROePuU_b4EwmnldLOIhG68QRrWw2IUvi59CELOU-pM4vYIQywRBA5w_BKpWGd00D1-XazPtwLhmUTyFH7pIHZDHwiQiC2rBFMPfXm2fLPSrr9IDgxtnhdvBZrQStxHh8CeEgWfyTISZAqAhgAkwhNzyDY5xKMixr-Cv5XpcPWnICgVlYO3nqSOhIS_fe4HUDsqIoEO5HmXS0BzBpep-RjjurbmNgBXOtkZw&h=R2gFXVBMsxbXyJ1h0LroS7iKkkxImW-S1P_0jqoKhGk + method: GET + response: + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc","name":"asoteststorogimjc","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorogimjc.dfs.core.windows.net/","web":"https://asoteststorogimjc.z5.web.core.windows.net/","blob":"https://asoteststorogimjc.blob.core.windows.net/","queue":"https://asoteststorogimjc.queue.core.windows.net/","table":"https://asoteststorogimjc.table.core.windows.net/","file":"https://asoteststorogimjc.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1448" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: E882AA5AD07D4822961C3BBB43308D34 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:18Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc?api-version=2023-01-01 + method: GET + response: + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc","name":"asoteststorogimjc","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorogimjc.dfs.core.windows.net/","web":"https://asoteststorogimjc.z5.web.core.windows.net/","blob":"https://asoteststorogimjc.blob.core.windows.net/","queue":"https://asoteststorogimjc.queue.core.windows.net/","table":"https://asoteststorogimjc.table.core.windows.net/","file":"https://asoteststorogimjc.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1448" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 1D92965534B94240B25ED7C11BDD9A8B Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:18Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"default"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "18" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/blobServices/default?api-version=2023-01-01 + method: PUT + response: + body: '{"name":"default"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "18" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 0A67E0D3F5E8489FA41AFE386165917C Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:22Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"default"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "18" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/fileServices/default?api-version=2023-01-01 + method: PUT + response: + body: '{"name":"default"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "18" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 77F76ABE7B8B4252A2B4B386A79D61FA Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:22Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"default"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "18" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/tableServices/default?api-version=2023-01-01 + method: PUT + response: + body: '{"name":"default"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "18" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 6A60C306403F4E739FD9F7DA47B2FF19 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:22Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"default"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "18" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/queueServices/default?api-version=2023-01-01 + method: PUT + response: + body: '{"name":"default"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "18" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: D1BD0322B20A465CAE9252D87278E78C Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:22Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/blobServices/default?api-version=2023-01-01 + method: GET + response: + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/blobServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/blobServices","properties":{"cors":{"corsRules":[]},"deleteRetentionPolicy":{"allowPermanentDelete":false,"enabled":false}}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "407" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 003329EBDE0E46B9940138934F1FE1B3 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:22Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/tableServices/default?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/tableServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/tableServices","properties":{"cors":{"corsRules":[]}}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "290" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: E9F0F75D26044AF2B6A7416A8FFD4367 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:22Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/fileServices/default?api-version=2023-01-01 + method: GET + response: + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "421" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 136DDF83AD7F464099AD70D63106D392 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:22Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"default","properties":{"policy":{"rules":[{"definition":{"actions":{"version":{"delete":{"daysAfterCreationGreaterThan":30}}},"filters":{"blobIndexMatch":null,"blobTypes":["blockBlob"],"prefixMatch":["sample-container/blob1"]}},"enabled":true,"name":"test-rule","type":"Lifecycle"}]}}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "294" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/managementPolicies/default?api-version=2023-01-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/managementPolicies/default","name":"DefaultManagementPolicy","type":"Microsoft.Storage/storageAccounts/managementPolicies","properties":{"policy":{"rules":[{"enabled":true,"name":"test-rule","type":"Lifecycle","definition":{"actions":{"version":{"delete":{"daysAfterCreationGreaterThan":30.0}}},"filters":{"blobTypes":["blockBlob"],"prefixMatch":["sample-container/blob1"]}}}]},"lastModifiedTime":"2001-02-03T04:05:06Z"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "583" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: C3E0C27B7ECD41548A4C9A1C2BEDCBF9 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:22Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/queueServices/default?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/queueServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/queueServices","properties":{"logging":{"version":"1.0","delete":false,"read":false,"write":false,"retentionPolicy":{"enabled":false}},"cors":{"corsRules":[]}}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "396" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 25DA47F584E644D0A3464F7419020227 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:22Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/managementPolicies/default?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/managementPolicies/default","name":"DefaultManagementPolicy","type":"Microsoft.Storage/storageAccounts/managementPolicies","properties":{"policy":{"rules":[{"enabled":true,"name":"test-rule","type":"Lifecycle","definition":{"actions":{"version":{"delete":{"daysAfterCreationGreaterThan":30.0}}},"filters":{"blobTypes":["blockBlob"],"prefixMatch":["sample-container/blob1"]}}}]},"lastModifiedTime":"2001-02-03T04:05:06Z"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "583" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 5D93B4F0E7A5462783017076D8BA0A03 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:22Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/managementPolicies/default?api-version=2023-01-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 3A041F3D003B436D8DF9A455AC06A7ED Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:27Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"asotest-container-xgblfl"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "35" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/blobServices/default/containers/asotest-container-xgblfl?api-version=2023-01-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/blobServices/default/containers/asotest-container-xgblfl","name":"asotest-container-xgblfl","type":"Microsoft.Storage/storageAccounts/blobServices/containers"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "313" + Content-Type: + - application/json + Etag: + - '"0x8DBF03F1DAD23D0"' + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 5E2366D2BB784C8D99DB10518CBF9DB3 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:27Z' + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"name":"asotest-queue-osvcjq"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "31" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/queueServices/default/queues/asotest-queue-osvcjq?api-version=2023-01-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/queueServices/default/queues/asotest-queue-osvcjq","name":"asotest-queue-osvcjq","type":"Microsoft.Storage/storageAccounts/queueServices/queues","properties":{"metadata":{}}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "328" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 3C6E4BA85D5C42F3B6A27B9114D1D57E Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:27Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"asotest-container-gybpmv"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "35" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/fileServices/default/shares/asotest-container-gybpmv?api-version=2023-01-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/fileServices/default/shares/asotest-container-gybpmv","name":"asotest-container-gybpmv","type":"Microsoft.Storage/storageAccounts/fileServices/shares"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "305" + Content-Type: + - application/json + Etag: + - '"0x8DBF03F1DB1CD85"' + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 2C287EC0A2384EC8B0A4CA16EAA1FDA4 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:27Z' + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/queueServices/default/queues/asotest-queue-osvcjq?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/queueServices/default/queues/asotest-queue-osvcjq","name":"asotest-queue-osvcjq","type":"Microsoft.Storage/storageAccounts/queueServices/queues","properties":{"metadata":{},"approximateMessageCount":0}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "356" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 1EA79BFF5A524DF4AFAE368A7009F870 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:27Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"testtable"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "20" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/tableServices/default/tables/testtable?api-version=2023-01-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/tableServices/default/tables/testtable","name":"testtable","type":"Microsoft.Storage/storageAccounts/tableServices/tables","properties":{"tableName":"testtable"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "316" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 8592ABCB30C54BA5A87037F23D474643 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:27Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/tableServices/default/tables/testtable?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/tableServices/default/tables/testtable","name":"testtable","type":"Microsoft.Storage/storageAccounts/tableServices/tables","properties":{"signedIdentifiers":[],"tableName":"testtable"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "339" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: AA2EE7D86BEA4EE1B566360E07D8BED3 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:27Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/blobServices/default/containers/asotest-container-xgblfl?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/blobServices/default/containers/asotest-container-xgblfl","name":"asotest-container-xgblfl","type":"Microsoft.Storage/storageAccounts/blobServices/containers","etag":"\"0x8DBF03F1DAD23D0\"","properties":{"deleted":false,"remainingRetentionDays":0,"defaultEncryptionScope":"$account-encryption-key","denyEncryptionScopeOverride":false,"publicAccess":"None","leaseStatus":"Unlocked","leaseState":"Available","lastModifiedTime":"2001-02-03T04:05:06Z","legalHold":{"hasLegalHold":false,"tags":[]},"hasImmutabilityPolicy":false,"hasLegalHold":false}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "707" + Content-Type: + - application/json + Etag: + - '"0x8DBF03F1DAD23D0"' + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 51B9D2F4CCE84E0BB5C6D38C8BEFBC72 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:28Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/fileServices/default/shares/asotest-container-gybpmv?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/fileServices/default/shares/asotest-container-gybpmv","name":"asotest-container-gybpmv","type":"Microsoft.Storage/storageAccounts/fileServices/shares","etag":"\"0x8DBF03F1DB1CD85\"","properties":{"leaseStatus":"unlocked","leaseState":"available","signedIdentifiers":[],"accessTier":"TransactionOptimized","accessTierChangeTime":"2001-02-03T04:05:06Z","lastModifiedTime":"2001-02-03T04:05:06Z","shareQuota":5120}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "582" + Content-Type: + - application/json + Etag: + - '"0x8DBF03F1DB1CD85"' + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 75F3C8379C364B88BFD06326648A38A9 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:28Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/fileServices/default/shares/asotest-container-gybpmv?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/fileServices/default/shares/asotest-container-gybpmv","name":"asotest-container-gybpmv","type":"Microsoft.Storage/storageAccounts/fileServices/shares","etag":"\"0x8DBF03F1DB1CD85\"","properties":{"leaseStatus":"unlocked","leaseState":"available","signedIdentifiers":[],"accessTier":"TransactionOptimized","accessTierChangeTime":"2001-02-03T04:05:06Z","lastModifiedTime":"2001-02-03T04:05:06Z","shareQuota":5120}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "582" + Content-Type: + - application/json + Etag: + - '"0x8DBF03F1DB1CD85"' + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 9A01BF054364477FAB6222901AFFCD6E Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:28Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/blobServices/default/containers/asotest-container-xgblfl?api-version=2023-01-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/blobServices/default/containers/asotest-container-xgblfl","name":"asotest-container-xgblfl","type":"Microsoft.Storage/storageAccounts/blobServices/containers","etag":"\"0x8DBF03F1DAD23D0\"","properties":{"deleted":false,"remainingRetentionDays":0,"defaultEncryptionScope":"$account-encryption-key","denyEncryptionScopeOverride":false,"publicAccess":"None","leaseStatus":"Unlocked","leaseState":"Available","lastModifiedTime":"2001-02-03T04:05:06Z","legalHold":{"hasLegalHold":false,"tags":[]},"hasImmutabilityPolicy":false,"hasLegalHold":false}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "707" + Content-Type: + - application/json + Etag: + - '"0x8DBF03F1DAD23D0"' + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 8372DD11FBAF468E91F4806DEB54C5B1 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:28Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/tableServices/default/tables/testtable?api-version=2023-01-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: E2032C2E537B40B0827F862852B02FF1 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:32Z' + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/blobServices/default/containers/asotest-container-xgblfl?api-version=2023-01-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 7ADDD622F3FE484AB3CAAC55DF96D29A Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:32Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/fileServices/default/shares/asotest-container-gybpmv?api-version=2023-01-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 70ADCDB96AD3482494DDF007A8FA1703 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:32Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/queueServices/default/queues/asotest-queue-osvcjq?api-version=2023-01-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 5ECC2E84BFF74EBAB48583274996A11C Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:32Z' + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc?api-version=2023-01-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 798AFF7C618749FDBBBF1EDAE3C832BB Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:37Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc?api-version=2023-01-01 + method: GET + response: + body: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Storage/storageAccounts/asoteststorogimjc'' + under resource group ''asotest-rg-cleldp'' was not found. For more details please + go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "240" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: 97B8F2A6B342401CADE902749849DC2F Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:42Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp?api-version=2020-06-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRDTEVMRFAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367926225064309&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=B9Zs_v5GAfg4iogg05I_EWtSwrEWVfDeO6L8NqAF5b9zifYTL_nGfuXftK5p1LQvucwUBknKwRUPSKqLvOQYjV_DGuExolEhXY_L7G2odeqC17ZH3v4XVKREMH2HoXl1YOpWMgnazZBoGQ0N3BR-ztvChRGLBRFnRkpBr3KYhzjQpdkzneJ8oBc967U6yhVz7UuLhDXjOmfe1j6qlqswDaTiJ_zvCsXyqffAzCLLeUsU2nhi9kkHbi4PqgbW5T20VV73HqpP4nJFJocW8F_IrVJwELITCf3YKXuzhslQEPKuyM8ZlzyJgZdZD7iyqgc_rtXY3ul10Ks13OVmx_COkQ&h=_sCMYLDy9GQAQjJAYe3TeEskccprMWU4RolfAaP-3i0 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 4E41CDD5B60F4690A832AF902839B23A Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:42Z' + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRDTEVMRFAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367926225064309&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=B9Zs_v5GAfg4iogg05I_EWtSwrEWVfDeO6L8NqAF5b9zifYTL_nGfuXftK5p1LQvucwUBknKwRUPSKqLvOQYjV_DGuExolEhXY_L7G2odeqC17ZH3v4XVKREMH2HoXl1YOpWMgnazZBoGQ0N3BR-ztvChRGLBRFnRkpBr3KYhzjQpdkzneJ8oBc967U6yhVz7UuLhDXjOmfe1j6qlqswDaTiJ_zvCsXyqffAzCLLeUsU2nhi9kkHbi4PqgbW5T20VV73HqpP4nJFJocW8F_IrVJwELITCf3YKXuzhslQEPKuyM8ZlzyJgZdZD7iyqgc_rtXY3ul10Ks13OVmx_COkQ&h=_sCMYLDy9GQAQjJAYe3TeEskccprMWU4RolfAaP-3i0 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: B8112F5612C242568FA7EA655E8EBF1A Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:23:57Z' + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/blobServices/default?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform + ''delete'' on resource(s) of type ''storageAccounts/blobServices'', because + the parent resource ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "334" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: 4B315F75ABDE476F8522327EC342BBD3 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:24:02Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/fileServices/default?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform + ''delete'' on resource(s) of type ''storageAccounts/fileServices'', because + the parent resource ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "334" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: 622E8C6BADCD4B0E876D36743CC0239D Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:24:02Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/queueServices/default?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform + ''delete'' on resource(s) of type ''storageAccounts/queueServices'', because + the parent resource ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "335" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: D35F11A6E2EF4B619A70DA86DA484324 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:24:02Z' + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc/tableServices/default?api-version=2023-01-01 + method: DELETE + response: + body: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform + ''delete'' on resource(s) of type ''storageAccounts/tableServices'', because + the parent resource ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-cleldp/providers/Microsoft.Storage/storageAccounts/asoteststorogimjc'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "335" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: 1B9183E78C134A93A3B3FB8F710BFC28 Ref B: CO6AA3150217029 Ref C: 2023-11-28T18:24:02Z' + status: 404 Not Found + code: 404 + duration: "" diff --git a/v2/internal/controllers/recordings/Test_Storage_StorageAccount_SecretsFromAzure.yaml b/v2/internal/controllers/recordings/Test_Storage_StorageAccount_20230101_SecretsFromAzure.yaml similarity index 51% rename from v2/internal/controllers/recordings/Test_Storage_StorageAccount_SecretsFromAzure.yaml rename to v2/internal/controllers/recordings/Test_Storage_StorageAccount_20230101_SecretsFromAzure.yaml index cacfbbeee79..8472389bc26 100644 --- a/v2/internal/controllers/recordings/Test_Storage_StorageAccount_SecretsFromAzure.yaml +++ b/v2/internal/controllers/recordings/Test_Storage_StorageAccount_20230101_SecretsFromAzure.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"location":"westus2","name":"asotest-rg-buqauc","tags":{"CreatedAt":"2001-02-03T04:05:06Z"}}' + body: '{"location":"westus2","name":"asotest-rg-sjcojm","tags":{"CreatedAt":"2001-02-03T04:05:06Z"}}' form: {} headers: Accept: @@ -13,10 +13,10 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm?api-version=2020-06-01 method: PUT response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc","name":"asotest-rg-buqauc","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm","name":"asotest-rg-sjcojm","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' headers: Cache-Control: - no-cache @@ -30,8 +30,12 @@ interactions: - no-cache Strict-Transport-Security: - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 6F57D645DA19473881E19B4CA183C4E2 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:24:56Z' status: 201 Created code: 201 duration: "" @@ -43,13 +47,15 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm?api-version=2020-06-01 method: GET response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc","name":"asotest-rg-buqauc","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm","name":"asotest-rg-sjcojm","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' headers: Cache-Control: - no-cache + Content-Length: + - "276" Content-Type: - application/json; charset=utf-8 Expires: @@ -58,15 +64,17 @@ interactions: - no-cache Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 691472A260614FA9917CE507348205F7 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:24:56Z' status: 200 OK code: 200 duration: "" - request: - body: '{"kind":"StorageV2","location":"westus2","name":"asoteststorwboghd","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' + body: '{"kind":"StorageV2","location":"westus2","name":"asoteststorygzelx","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' form: {} headers: Accept: @@ -77,7 +85,7 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx?api-version=2023-01-01 method: PUT response: body: "" @@ -91,17 +99,19 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/91a8cf28-f8bb-482d-ba6d-971068dca5d0?monitor=true&api-version=2022-09-01&t=638336799552477857&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=bbWGI-kTHrFN5jc6d_3SWE9YIDWa_gr2WlqeZcsasqPiyByK5dm1Pk5Tf4srVmUIpLnGuEIJhJXXpMQVQUyUy7yKeokQ--8q4-XpsuFupMSuviLPg-wSXOPESYnDfBHgGGU0u858K1NmGIku8zcYjfCLi9djqYMPUEHXX3i0RpUmG8W_GVRIHW3e-rV2_OulZaNZBd8OXUCDi3RImAd0muXaESwJNn3ORKXgYJT2PHVHdowFXS4QHRtZC21KT3vTyq8WAUeF1E7pNcsyXvpIlDzqV4OcU3eCWvU1OCN7SCHeWtUs_BdUZQhlt20JUHGn3K7ikcri9w1Lm7ig4PorPg&h=0WRAcOEAMV_idS8n70LxnEApqcgbkbtfddziQ7VJz_I + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/39b1d054-9fee-4ad6-9665-5f5bbefd42f1?monitor=true&api-version=2023-01-01&t=638367927015657887&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=fr7Y-U4LSo1SMQY57LyB3O2R-Z698NjIWPe99Qee-5x4RDWRFvHOySe-XDQfmuTwFIckTh_WN3LFIlfGg_ULehjX1pQEoX0JZi3TZWjdf7zTQuzZcQdAqT4kezWUik5TXqJFFNEyxwfQAZnOeVTbG4-qTmBhmNDkttNcK6cd0fDyzzVqqcNWjqzC_lFTv9yvcdVPFDWcpoasIehK4106waTxmMULjsWM8ecAgh99iEIoDyWAAaYYJ4QQujwRU8wWTpn6m3N7U9oXmuSkuvoQQkUaXMbYIEcM6FnNlm9yUUTQcGCI22hKfOeGFnhDasHl01cJuy6TjZzfehYOuEQ13g&h=PlvMS6RAD_pzUzsxfrdMf_nrC8UNgmi3JqO1I_bwyUc Pragma: - no-cache Retry-After: - "17" - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 1B08FB4E6C3B4166B9FAF850790354EB Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:24:58Z' status: 202 Accepted code: 202 duration: "" @@ -111,7 +121,7 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/91a8cf28-f8bb-482d-ba6d-971068dca5d0?monitor=true&api-version=2022-09-01&t=638336799552477857&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=bbWGI-kTHrFN5jc6d_3SWE9YIDWa_gr2WlqeZcsasqPiyByK5dm1Pk5Tf4srVmUIpLnGuEIJhJXXpMQVQUyUy7yKeokQ--8q4-XpsuFupMSuviLPg-wSXOPESYnDfBHgGGU0u858K1NmGIku8zcYjfCLi9djqYMPUEHXX3i0RpUmG8W_GVRIHW3e-rV2_OulZaNZBd8OXUCDi3RImAd0muXaESwJNn3ORKXgYJT2PHVHdowFXS4QHRtZC21KT3vTyq8WAUeF1E7pNcsyXvpIlDzqV4OcU3eCWvU1OCN7SCHeWtUs_BdUZQhlt20JUHGn3K7ikcri9w1Lm7ig4PorPg&h=0WRAcOEAMV_idS8n70LxnEApqcgbkbtfddziQ7VJz_I + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/39b1d054-9fee-4ad6-9665-5f5bbefd42f1?monitor=true&api-version=2023-01-01&t=638367927015657887&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=fr7Y-U4LSo1SMQY57LyB3O2R-Z698NjIWPe99Qee-5x4RDWRFvHOySe-XDQfmuTwFIckTh_WN3LFIlfGg_ULehjX1pQEoX0JZi3TZWjdf7zTQuzZcQdAqT4kezWUik5TXqJFFNEyxwfQAZnOeVTbG4-qTmBhmNDkttNcK6cd0fDyzzVqqcNWjqzC_lFTv9yvcdVPFDWcpoasIehK4106waTxmMULjsWM8ecAgh99iEIoDyWAAaYYJ4QQujwRU8wWTpn6m3N7U9oXmuSkuvoQQkUaXMbYIEcM6FnNlm9yUUTQcGCI22hKfOeGFnhDasHl01cJuy6TjZzfehYOuEQ13g&h=PlvMS6RAD_pzUzsxfrdMf_nrC8UNgmi3JqO1I_bwyUc method: GET response: body: "" @@ -125,17 +135,19 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/91a8cf28-f8bb-482d-ba6d-971068dca5d0?monitor=true&api-version=2022-09-01&t=638336799564821746&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=QgsolXzXCfRH6T00hPm1Jl8FMCbWyVyVyjVYINb8A6VJj8Wv8Vvli65L4SE9idjMFwpnTbTMKUwhpASCbwdusBotphwJQsPK7iMDWBYU35LExPEHlwDHSUthP7XvLCZEYar7od6kNAUWcd8LBcnN7UYwunhKO-R_elt12NYBAJxiNLqP205_9mgYwcAB0vwj-DeU9CekXV2wABFWRmpZNvkEow3SkjprxzsfOHshNjqXV0HfFKfz6LelpOFNvbUpDL63BgGKbMI4IpbbCPBFuoNJZ-0TzbZCTAm39j1Sc6i64NkvZwLLd5XAnTJXJncO-uX8YOrh83IwcrOS7imfBQ&h=HCabGjH1faiVX_9y5IQKgCTTu492KAiLsiY_fL4zLG0 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/39b1d054-9fee-4ad6-9665-5f5bbefd42f1?monitor=true&api-version=2023-01-01&t=638367927026685772&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=iaCLLRkP2NRl2Gqq-2IYalEbDqRBntqyCSSD_rbXVJWvMHdfP89FvCON33SvIjrLjJx_S6AS20qOlrLCshxUj9B43aSL1ZifZVPp5tPTQTbvWZ3uITT8HJpSEI2SmGPRATb0kyXqBNpORS6JVpKsIUIXMWxv2oNZfHMIrJNz1vI96E-WU12EvxgHSBjENZoOKBpiBrmbLdSnmuREj2M3Q6bgr1pgCwAtc5TQgrF0BxqEXnaOblySUbvhnxsUjjhELxKyVhwBMScUOfKFkIwqnQl4wPO4VOKHJb6qbwmrqAc7WSihI1YgQgKcZY5j3_-4If3PpiwERPM8y06TlcmYjQ&h=RTCtKMZx8UqMMWHwDgUSsz30CCHAS6jbF3n-n8UpFGg Pragma: - no-cache Retry-After: - "17" - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 8429626901C54B0C8B46576470EE52E4 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:02Z' status: 202 Accepted code: 202 duration: "" @@ -145,27 +157,29 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/91a8cf28-f8bb-482d-ba6d-971068dca5d0?monitor=true&api-version=2022-09-01&t=638336799552477857&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=bbWGI-kTHrFN5jc6d_3SWE9YIDWa_gr2WlqeZcsasqPiyByK5dm1Pk5Tf4srVmUIpLnGuEIJhJXXpMQVQUyUy7yKeokQ--8q4-XpsuFupMSuviLPg-wSXOPESYnDfBHgGGU0u858K1NmGIku8zcYjfCLi9djqYMPUEHXX3i0RpUmG8W_GVRIHW3e-rV2_OulZaNZBd8OXUCDi3RImAd0muXaESwJNn3ORKXgYJT2PHVHdowFXS4QHRtZC21KT3vTyq8WAUeF1E7pNcsyXvpIlDzqV4OcU3eCWvU1OCN7SCHeWtUs_BdUZQhlt20JUHGn3K7ikcri9w1Lm7ig4PorPg&h=0WRAcOEAMV_idS8n70LxnEApqcgbkbtfddziQ7VJz_I + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/39b1d054-9fee-4ad6-9665-5f5bbefd42f1?monitor=true&api-version=2023-01-01&t=638367927015657887&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=fr7Y-U4LSo1SMQY57LyB3O2R-Z698NjIWPe99Qee-5x4RDWRFvHOySe-XDQfmuTwFIckTh_WN3LFIlfGg_ULehjX1pQEoX0JZi3TZWjdf7zTQuzZcQdAqT4kezWUik5TXqJFFNEyxwfQAZnOeVTbG4-qTmBhmNDkttNcK6cd0fDyzzVqqcNWjqzC_lFTv9yvcdVPFDWcpoasIehK4106waTxmMULjsWM8ecAgh99iEIoDyWAAaYYJ4QQujwRU8wWTpn6m3N7U9oXmuSkuvoQQkUaXMbYIEcM6FnNlm9yUUTQcGCI22hKfOeGFnhDasHl01cJuy6TjZzfehYOuEQ13g&h=PlvMS6RAD_pzUzsxfrdMf_nrC8UNgmi3JqO1I_bwyUc method: GET response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd","name":"asoteststorwboghd","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorwboghd.dfs.core.windows.net/","web":"https://asoteststorwboghd.z5.web.core.windows.net/","blob":"https://asoteststorwboghd.blob.core.windows.net/","queue":"https://asoteststorwboghd.queue.core.windows.net/","table":"https://asoteststorwboghd.table.core.windows.net/","file":"https://asoteststorwboghd.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx","name":"asoteststorygzelx","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorygzelx.dfs.core.windows.net/","web":"https://asoteststorygzelx.z5.web.core.windows.net/","blob":"https://asoteststorygzelx.blob.core.windows.net/","queue":"https://asoteststorygzelx.queue.core.windows.net/","table":"https://asoteststorygzelx.table.core.windows.net/","file":"https://asoteststorygzelx.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache + Content-Length: + - "1448" Content-Type: - application/json Expires: - "-1" Pragma: - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: BD53D9EAFB5A47008B9E8CD4885F3910 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:19Z' status: 200 OK code: 200 duration: "" @@ -177,32 +191,34 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx?api-version=2023-01-01 method: GET response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd","name":"asoteststorwboghd","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorwboghd.dfs.core.windows.net/","web":"https://asoteststorwboghd.z5.web.core.windows.net/","blob":"https://asoteststorwboghd.blob.core.windows.net/","queue":"https://asoteststorwboghd.queue.core.windows.net/","table":"https://asoteststorwboghd.table.core.windows.net/","file":"https://asoteststorwboghd.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx","name":"asoteststorygzelx","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorygzelx.dfs.core.windows.net/","web":"https://asoteststorygzelx.z5.web.core.windows.net/","blob":"https://asoteststorygzelx.blob.core.windows.net/","queue":"https://asoteststorygzelx.queue.core.windows.net/","table":"https://asoteststorygzelx.table.core.windows.net/","file":"https://asoteststorygzelx.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache + Content-Length: + - "1448" Content-Type: - application/json Expires: - "-1" Pragma: - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 8C6BE4A636414DF0B8854AD73E7028C3 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:19Z' status: 200 OK code: 200 duration: "" - request: - body: '{"kind":"StorageV2","location":"westus2","name":"asoteststorwboghd","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' + body: '{"kind":"StorageV2","location":"westus2","name":"asoteststorygzelx","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' form: {} headers: Accept: @@ -213,27 +229,29 @@ interactions: - application/json Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx?api-version=2023-01-01 method: PUT response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd","name":"asoteststorwboghd","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorwboghd.dfs.core.windows.net/","web":"https://asoteststorwboghd.z5.web.core.windows.net/","blob":"https://asoteststorwboghd.blob.core.windows.net/","queue":"https://asoteststorwboghd.queue.core.windows.net/","table":"https://asoteststorwboghd.table.core.windows.net/","file":"https://asoteststorwboghd.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx","name":"asoteststorygzelx","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorygzelx.dfs.core.windows.net/","web":"https://asoteststorygzelx.z5.web.core.windows.net/","blob":"https://asoteststorygzelx.blob.core.windows.net/","queue":"https://asoteststorygzelx.queue.core.windows.net/","table":"https://asoteststorygzelx.table.core.windows.net/","file":"https://asoteststorygzelx.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache + Content-Length: + - "1448" Content-Type: - application/json Expires: - "-1" Pragma: - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 5EACB3546A01453488D5770550367C88 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:23Z' status: 200 OK code: 200 duration: "" @@ -245,27 +263,29 @@ interactions: - application/json Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx?api-version=2023-01-01 method: GET response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd","name":"asoteststorwboghd","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorwboghd.dfs.core.windows.net/","web":"https://asoteststorwboghd.z5.web.core.windows.net/","blob":"https://asoteststorwboghd.blob.core.windows.net/","queue":"https://asoteststorwboghd.queue.core.windows.net/","table":"https://asoteststorwboghd.table.core.windows.net/","file":"https://asoteststorwboghd.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx","name":"asoteststorygzelx","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorygzelx.dfs.core.windows.net/","web":"https://asoteststorygzelx.z5.web.core.windows.net/","blob":"https://asoteststorygzelx.blob.core.windows.net/","queue":"https://asoteststorygzelx.queue.core.windows.net/","table":"https://asoteststorygzelx.table.core.windows.net/","file":"https://asoteststorygzelx.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache + Content-Length: + - "1448" Content-Type: - application/json Expires: - "-1" Pragma: - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: B958BC5E821A420D8429AFA0F4DCFAD1 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:23Z' status: 200 OK code: 200 duration: "" @@ -277,34 +297,36 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd/listKeys?api-version=2023-01-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx/listKeys?api-version=2023-01-01 method: POST response: body: '{"keys":[{"creationTime":"2001-02-03T04:05:06Z","keyName":"key1","value":"{KEY}","permissions":"FULL"},{"creationTime":"2001-02-03T04:05:06Z","keyName":"key2","value":"{KEY}","permissions":"FULL"}]}' headers: Cache-Control: - no-cache + Content-Length: + - "380" Content-Type: - application/json Expires: - "-1" Pragma: - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff X-Ms-Ratelimit-Remaining-Subscription-Resource-Requests: - "11999" + X-Msedge-Ref: + - 'Ref A: D5E3EB8B7B7A4E30BADA1A65251373B8 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:24Z' status: 200 OK code: 200 duration: "" - request: - body: '{"kind":"StorageV2","location":"westus2","name":"asoteststorwboghd","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' + body: '{"kind":"StorageV2","location":"westus2","name":"asoteststorygzelx","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' form: {} headers: Accept: @@ -315,27 +337,29 @@ interactions: - application/json Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx?api-version=2023-01-01 method: PUT response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd","name":"asoteststorwboghd","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorwboghd.dfs.core.windows.net/","web":"https://asoteststorwboghd.z5.web.core.windows.net/","blob":"https://asoteststorwboghd.blob.core.windows.net/","queue":"https://asoteststorwboghd.queue.core.windows.net/","table":"https://asoteststorwboghd.table.core.windows.net/","file":"https://asoteststorwboghd.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx","name":"asoteststorygzelx","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorygzelx.dfs.core.windows.net/","web":"https://asoteststorygzelx.z5.web.core.windows.net/","blob":"https://asoteststorygzelx.blob.core.windows.net/","queue":"https://asoteststorygzelx.queue.core.windows.net/","table":"https://asoteststorygzelx.table.core.windows.net/","file":"https://asoteststorygzelx.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache + Content-Length: + - "1448" Content-Type: - application/json Expires: - "-1" Pragma: - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 307D49649EB24A7D8A1A30AA9AFB5623 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:28Z' status: 200 OK code: 200 duration: "" @@ -347,27 +371,29 @@ interactions: - application/json Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx?api-version=2023-01-01 method: GET response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd","name":"asoteststorwboghd","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorwboghd.dfs.core.windows.net/","web":"https://asoteststorwboghd.z5.web.core.windows.net/","blob":"https://asoteststorwboghd.blob.core.windows.net/","queue":"https://asoteststorwboghd.queue.core.windows.net/","table":"https://asoteststorwboghd.table.core.windows.net/","file":"https://asoteststorwboghd.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx","name":"asoteststorygzelx","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorygzelx.dfs.core.windows.net/","web":"https://asoteststorygzelx.z5.web.core.windows.net/","blob":"https://asoteststorygzelx.blob.core.windows.net/","queue":"https://asoteststorygzelx.queue.core.windows.net/","table":"https://asoteststorygzelx.table.core.windows.net/","file":"https://asoteststorygzelx.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache + Content-Length: + - "1448" Content-Type: - application/json Expires: - "-1" Pragma: - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: A2CDB43E858543B49AD6CBBA5DE633C8 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:28Z' status: 200 OK code: 200 duration: "" @@ -379,34 +405,36 @@ interactions: - application/json Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd/listKeys?api-version=2023-01-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx/listKeys?api-version=2023-01-01 method: POST response: body: '{"keys":[{"creationTime":"2001-02-03T04:05:06Z","keyName":"key1","value":"{KEY}","permissions":"FULL"},{"creationTime":"2001-02-03T04:05:06Z","keyName":"key2","value":"{KEY}","permissions":"FULL"}]}' headers: Cache-Control: - no-cache + Content-Length: + - "380" Content-Type: - application/json Expires: - "-1" Pragma: - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff X-Ms-Ratelimit-Remaining-Subscription-Resource-Requests: - - "11998" + - "11999" + X-Msedge-Ref: + - 'Ref A: 36B3D737F08348C28DD15537A14F128F Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:28Z' status: 200 OK code: 200 duration: "" - request: - body: '{"kind":"StorageV2","location":"westus2","name":"asoteststorwboghd","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' + body: '{"kind":"StorageV2","location":"westus2","name":"asoteststorygzelx","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' form: {} headers: Accept: @@ -417,27 +445,29 @@ interactions: - application/json Test-Request-Attempt: - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx?api-version=2023-01-01 method: PUT response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd","name":"asoteststorwboghd","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorwboghd.dfs.core.windows.net/","web":"https://asoteststorwboghd.z5.web.core.windows.net/","blob":"https://asoteststorwboghd.blob.core.windows.net/","queue":"https://asoteststorwboghd.queue.core.windows.net/","table":"https://asoteststorwboghd.table.core.windows.net/","file":"https://asoteststorwboghd.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx","name":"asoteststorygzelx","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorygzelx.dfs.core.windows.net/","web":"https://asoteststorygzelx.z5.web.core.windows.net/","blob":"https://asoteststorygzelx.blob.core.windows.net/","queue":"https://asoteststorygzelx.queue.core.windows.net/","table":"https://asoteststorygzelx.table.core.windows.net/","file":"https://asoteststorygzelx.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache + Content-Length: + - "1448" Content-Type: - application/json Expires: - "-1" Pragma: - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 43F8A293E3CF4F21A2F162B64B0A8617 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:33Z' status: 200 OK code: 200 duration: "" @@ -449,27 +479,29 @@ interactions: - application/json Test-Request-Attempt: - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx?api-version=2023-01-01 method: GET response: - body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd","name":"asoteststorwboghd","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorwboghd.dfs.core.windows.net/","web":"https://asoteststorwboghd.z5.web.core.windows.net/","blob":"https://asoteststorwboghd.blob.core.windows.net/","queue":"https://asoteststorwboghd.queue.core.windows.net/","table":"https://asoteststorwboghd.table.core.windows.net/","file":"https://asoteststorwboghd.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx","name":"asoteststorygzelx","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":false,"networkAcls":{"ipv6Rules":[],"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorygzelx.dfs.core.windows.net/","web":"https://asoteststorygzelx.z5.web.core.windows.net/","blob":"https://asoteststorygzelx.blob.core.windows.net/","queue":"https://asoteststorygzelx.queue.core.windows.net/","table":"https://asoteststorygzelx.table.core.windows.net/","file":"https://asoteststorygzelx.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' headers: Cache-Control: - no-cache + Content-Length: + - "1448" Content-Type: - application/json Expires: - "-1" Pragma: - no-cache - Server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: D8DD8A3D2F204CB0B0F20FCD889E2929 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:33Z' status: 200 OK code: 200 duration: "" @@ -481,7 +513,7 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm?api-version=2020-06-01 method: DELETE response: body: "" @@ -493,15 +525,19 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRCVVFBVUMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638336799930302195&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=oPNrox5BNIvjRzjuaOYH9Ai6KrAG89y2WCg3F4StF42jm2gjMepBQKyleUoGxcad9tDE2UvEW_JiCqdCGtnAC2-5qMeLOssRmaEx0fz-OTiR93Lcz2WoOtRtm_2wYCFqMx0yWPHmyHjlk4Ct08l6lYbIBWo3ZjvoRjpYptO_s5Zro14Xp1ucytrLh4x7DRopOW5ROcy_4rtTATobTRr5_pl7jkAemYoIv4ddrSQIXNNu67JNuJmAYYFvVpLnYN9qtPr8ftrkNERN3I0_WeVer3zEfsjlWqr6Uo0DNJTXVOMNWmLmcDByroHFN2Y7zWGr8FpfvNF68wBjl6QEWQuwwg&h=8WIiuTQZuB0m1M_cIwrn_vaDwTznb-66y9t9kAFf7OY + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRTSkNPSk0tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367927388718854&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=P3f3O4mPaJB1_w51IWZNwJGEmhTAPH-s2CJyKTmWpCBSiJlKEH8XwnZttqyy_sfS2LHGmX3UoTRL2hQ67aPJztABYNUAeQbonyfkL7yNYWo0ApM4_OwobnNRnVOP6594NGCCJq-ByVKEWu_iaYBFn-S5YDSRCe3g9qTfjASsEmz8V_LEFYW1d0JH-OG8_UPqbwfIhAykpxBO3SxjTsbmPNeOhcUouJAuZ2FTJuR1JfmB0eULfA-IjNaQfRUP2EN_j8SbbWoZbKMbDifPnMG_Bqy59kXpE9RR5W0-z0_0c01htqRJ3wFvFj7fe-xSkVgnZ-bq0wzUGK5XAMAhM6qWqQ&h=p4bMeRk2zolWnWZ3-y_zsoo1rDUMdtMxGIMtmLRwhHs Pragma: - no-cache Retry-After: - "15" Strict-Transport-Security: - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 7B4FCF0F5CA74C5AAA2462B858DB682B Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:38Z' status: 202 Accepted code: 202 duration: "" @@ -511,7 +547,7 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRCVVFBVUMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638336799930302195&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=oPNrox5BNIvjRzjuaOYH9Ai6KrAG89y2WCg3F4StF42jm2gjMepBQKyleUoGxcad9tDE2UvEW_JiCqdCGtnAC2-5qMeLOssRmaEx0fz-OTiR93Lcz2WoOtRtm_2wYCFqMx0yWPHmyHjlk4Ct08l6lYbIBWo3ZjvoRjpYptO_s5Zro14Xp1ucytrLh4x7DRopOW5ROcy_4rtTATobTRr5_pl7jkAemYoIv4ddrSQIXNNu67JNuJmAYYFvVpLnYN9qtPr8ftrkNERN3I0_WeVer3zEfsjlWqr6Uo0DNJTXVOMNWmLmcDByroHFN2Y7zWGr8FpfvNF68wBjl6QEWQuwwg&h=8WIiuTQZuB0m1M_cIwrn_vaDwTznb-66y9t9kAFf7OY + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRTSkNPSk0tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367927388718854&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=P3f3O4mPaJB1_w51IWZNwJGEmhTAPH-s2CJyKTmWpCBSiJlKEH8XwnZttqyy_sfS2LHGmX3UoTRL2hQ67aPJztABYNUAeQbonyfkL7yNYWo0ApM4_OwobnNRnVOP6594NGCCJq-ByVKEWu_iaYBFn-S5YDSRCe3g9qTfjASsEmz8V_LEFYW1d0JH-OG8_UPqbwfIhAykpxBO3SxjTsbmPNeOhcUouJAuZ2FTJuR1JfmB0eULfA-IjNaQfRUP2EN_j8SbbWoZbKMbDifPnMG_Bqy59kXpE9RR5W0-z0_0c01htqRJ3wFvFj7fe-xSkVgnZ-bq0wzUGK5XAMAhM6qWqQ&h=p4bMeRk2zolWnWZ3-y_zsoo1rDUMdtMxGIMtmLRwhHs method: GET response: body: "" @@ -523,15 +559,19 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRCVVFBVUMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638336800081713543&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=GKL_qVwnUs_W1dk66Wfsxp87sxx4dbTjuugNhTm0vkgFyL2xwW9SEKHV-2OQLmq8aVCiKcEmC_pAVgN9HDzVfqRaIkxRh40e3trqx_2DI3WYdmBMFLQjV_3xXBr6GVmUEom-ncL3EfYhW0xShyxii6etC8VMPgzLPnVv5t2O-PuqmcPCeGmrJiZ9YfCZSERS-8tIepAkj1X3yxkOTZndWCK1rtl-dCt2Qbsy-bfdUoyXN1x9umTd_o7KdIgr9FzLzPkDtKe7rGTQ79R7mXQ7L9ByYgcFXckOvna6sXijjnjZX6MM-jpz-kROQbXNYoAe2Xzsoe4ouhsNWUyEiBJT3w&h=qRDrWB1XlbL_KmGPeCmxpVoiHOdaAqhnN7NLZm_I0IY + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRTSkNPSk0tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367927539408230&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=PclOVqpJTBJjeImORkDNpnNzkPIgzQkGByzU2_AiAu1eQyE6hC6icLtESWODJroejwM7XnodUn1MSMMChqjc1fhKFynpo1FFvQGjFBsvYxguN2HWTKucCntE0ez6cA-DmnImRRfngGVjI00iqqjD0EzsOYpE5ig1v5xx2m9f3OqBndIxiAbYsoyqF_B7Ed9dJ8ds3ZP-EMuSUSHkAs8z6Je-SwdqZJxC6dhDG_Pj8_ZhkaNW1FtQC5XBl-IKyjOZ0ddpaGYcKHIKWhXwBwNZYK2GaygRfSllzqFdWS06hbqZ3ah-0zSk1_ETw3sIOO5lC3FkB8B-vaazaojI2u87-w&h=qU52E4t6RRoIeiqClYq8n6BOkhiJhl7P8XOhpwybasQ Pragma: - no-cache Retry-After: - "15" Strict-Transport-Security: - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 052B54E029CE451EBE7580067C47A0C4 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:25:53Z' status: 202 Accepted code: 202 duration: "" @@ -541,7 +581,7 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRCVVFBVUMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638336799930302195&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=oPNrox5BNIvjRzjuaOYH9Ai6KrAG89y2WCg3F4StF42jm2gjMepBQKyleUoGxcad9tDE2UvEW_JiCqdCGtnAC2-5qMeLOssRmaEx0fz-OTiR93Lcz2WoOtRtm_2wYCFqMx0yWPHmyHjlk4Ct08l6lYbIBWo3ZjvoRjpYptO_s5Zro14Xp1ucytrLh4x7DRopOW5ROcy_4rtTATobTRr5_pl7jkAemYoIv4ddrSQIXNNu67JNuJmAYYFvVpLnYN9qtPr8ftrkNERN3I0_WeVer3zEfsjlWqr6Uo0DNJTXVOMNWmLmcDByroHFN2Y7zWGr8FpfvNF68wBjl6QEWQuwwg&h=8WIiuTQZuB0m1M_cIwrn_vaDwTznb-66y9t9kAFf7OY + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRTSkNPSk0tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367927388718854&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=P3f3O4mPaJB1_w51IWZNwJGEmhTAPH-s2CJyKTmWpCBSiJlKEH8XwnZttqyy_sfS2LHGmX3UoTRL2hQ67aPJztABYNUAeQbonyfkL7yNYWo0ApM4_OwobnNRnVOP6594NGCCJq-ByVKEWu_iaYBFn-S5YDSRCe3g9qTfjASsEmz8V_LEFYW1d0JH-OG8_UPqbwfIhAykpxBO3SxjTsbmPNeOhcUouJAuZ2FTJuR1JfmB0eULfA-IjNaQfRUP2EN_j8SbbWoZbKMbDifPnMG_Bqy59kXpE9RR5W0-z0_0c01htqRJ3wFvFj7fe-xSkVgnZ-bq0wzUGK5XAMAhM6qWqQ&h=p4bMeRk2zolWnWZ3-y_zsoo1rDUMdtMxGIMtmLRwhHs method: GET response: body: "" @@ -553,15 +593,19 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRCVVFBVUMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638336800232656056&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=sGz-g0QAtnDsCXMxbgJv8WRBxKV25l2as1wWvHQlLiT8k2S98uw0wv0a7s5dTfh0kTi-1y2ZkbA7KV_NsuWmeL1ZuqWQA9fB-L5QvJJsGzRGkaELIW7z_fZB8ZsFRZG_icdWKJ9cP2fj8giH5b2hG5O--6znUQZK_iddTTy4DVwdKhHOUCYgv7mPX7o9gMvdTxVljbyPDBRltABlQME192sC--FFrYwycNVi3sGX6BFjD8lIgMbagzsZtfv-TKinUBSpCREi89rYA5H16uyPWoCDcdpsrPFkfXdg4PTmNFpuhFWDRwAH4nygqeZx5intkCoMTxNXDte2z6NivAcaRw&h=S2-s6U7P3W4bE6Oe4YJPrPk2I1epE1tcw3KDl78YUJE + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRTSkNPSk0tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367927689789683&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=EDDgG-j4nJINYqd9PYlCoMZkfS6WNrZJ5KDA-ztKIa52H5ffzW117wjObQvB3ISc3aD6qkONbULPe-sYs-EwHKV8qpLS00TUzkK-tRc-6_o8MbYbfszJA4ic3zRztzUclu33U2eAyo91FNKWoLmc5VSzU7FNrtuHpOpm9HQdyiPL4wbHdQWr0C2ips9RfMGPR4V8zixzpnnJ33oh9WFQvvvV3J0g8-KoOq3PmPLEzUThp3Z9ZjCWUkMJB2KPyoTNheLcF91NY-qx_Rjw7yPjsP7gCjGO7AMqXs9ttR9CY_59OkWjc-BXp_FWlecVm1lDRLzu3eJ0OrTcCr6GKs_sUw&h=Y7jUm2goARWYog9xNojBs6qwy3gW-yXmmsCfbzU75ho Pragma: - no-cache Retry-After: - "15" Strict-Transport-Security: - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 36A5620ED11E454C9D38496E8B3BE415 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:26:08Z' status: 202 Accepted code: 202 duration: "" @@ -571,7 +615,7 @@ interactions: headers: Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRCVVFBVUMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638336799930302195&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=oPNrox5BNIvjRzjuaOYH9Ai6KrAG89y2WCg3F4StF42jm2gjMepBQKyleUoGxcad9tDE2UvEW_JiCqdCGtnAC2-5qMeLOssRmaEx0fz-OTiR93Lcz2WoOtRtm_2wYCFqMx0yWPHmyHjlk4Ct08l6lYbIBWo3ZjvoRjpYptO_s5Zro14Xp1ucytrLh4x7DRopOW5ROcy_4rtTATobTRr5_pl7jkAemYoIv4ddrSQIXNNu67JNuJmAYYFvVpLnYN9qtPr8ftrkNERN3I0_WeVer3zEfsjlWqr6Uo0DNJTXVOMNWmLmcDByroHFN2Y7zWGr8FpfvNF68wBjl6QEWQuwwg&h=8WIiuTQZuB0m1M_cIwrn_vaDwTznb-66y9t9kAFf7OY + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRTSkNPSk0tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367927388718854&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=P3f3O4mPaJB1_w51IWZNwJGEmhTAPH-s2CJyKTmWpCBSiJlKEH8XwnZttqyy_sfS2LHGmX3UoTRL2hQ67aPJztABYNUAeQbonyfkL7yNYWo0ApM4_OwobnNRnVOP6594NGCCJq-ByVKEWu_iaYBFn-S5YDSRCe3g9qTfjASsEmz8V_LEFYW1d0JH-OG8_UPqbwfIhAykpxBO3SxjTsbmPNeOhcUouJAuZ2FTJuR1JfmB0eULfA-IjNaQfRUP2EN_j8SbbWoZbKMbDifPnMG_Bqy59kXpE9RR5W0-z0_0c01htqRJ3wFvFj7fe-xSkVgnZ-bq0wzUGK5XAMAhM6qWqQ&h=p4bMeRk2zolWnWZ3-y_zsoo1rDUMdtMxGIMtmLRwhHs method: GET response: body: "" @@ -583,15 +627,19 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRCVVFBVUMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638336800383754160&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=YODFuSj-iPwRS1Skv7iCbxCoKZhPNLO5lhV_Q2G8ZbV1AUaHscrIlttYYZwZ39zcETsRjzn2iugpK1VDOPa26NTp37lwt60nz3CiMIR3ETmvoTJO08qFbAWCsSBeJw54UI2P-7fOmyxeD-c29sBKRpfmP2M0WLNJrkA6cFNS08brrHx2YyjJW5EISHVZ5kSaRfy9GjvmxjAHDtGNZNTVQb7VjqV6e8bFcQhzlrJU52DW18xcoKStzAbBTOINhGr12_hB43a1EKJ9K06sHZGjuFpzK4ICdfaeWJbjMBb0T7wQcwVpWxjpEU-yp_YfePolKBzrmYeyhgxY0gICVUdBlg&h=ybG-6wdocXQZ1Fl-a-M2M7koFOfEoQTU0Waj0IoK4Fo + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRTSkNPSk0tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367927840279928&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=iiTtPc4VHTmznSlwX9XaGpFb1kM2s6MGE2Wz7TBUNgNTh6ZWWQpsKxokF6KnwivvVKwsAq7nEVfFTf0dc8wg6jnkgHHwQ73JImpjKhv7juo_l1gnkLS4oA-dh8v69R2aNEFx-RQBmsvnvBsdtXVCHGoy6bBJG7HLkXCDKAgp0Yqw--nYmCIvSaNO7sml2yd5fCwoOvmpUjgRSnv_58F_7dd3RHDwsrsrHl6Xmc4FLKGii5ViarucvSPTAy8i6_mYARksyhRb7N62ZuzciqumMijC42T7v74idcBmxCN729fgdNhEsZ2K2NQN5KFdHV1HDfXR8pdHUcepro0-zbuw4g&h=543DdHPPpIB5nJmYcFOfWEoTGQvlba0saHF_W94r_tE Pragma: - no-cache Retry-After: - "15" Strict-Transport-Security: - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 3D9378C932BB45B3A0675C1FD2B4CB69 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:26:24Z' status: 202 Accepted code: 202 duration: "" @@ -601,7 +649,7 @@ interactions: headers: Test-Request-Attempt: - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRCVVFBVUMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638336799930302195&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=oPNrox5BNIvjRzjuaOYH9Ai6KrAG89y2WCg3F4StF42jm2gjMepBQKyleUoGxcad9tDE2UvEW_JiCqdCGtnAC2-5qMeLOssRmaEx0fz-OTiR93Lcz2WoOtRtm_2wYCFqMx0yWPHmyHjlk4Ct08l6lYbIBWo3ZjvoRjpYptO_s5Zro14Xp1ucytrLh4x7DRopOW5ROcy_4rtTATobTRr5_pl7jkAemYoIv4ddrSQIXNNu67JNuJmAYYFvVpLnYN9qtPr8ftrkNERN3I0_WeVer3zEfsjlWqr6Uo0DNJTXVOMNWmLmcDByroHFN2Y7zWGr8FpfvNF68wBjl6QEWQuwwg&h=8WIiuTQZuB0m1M_cIwrn_vaDwTznb-66y9t9kAFf7OY + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRTSkNPSk0tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367927388718854&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=P3f3O4mPaJB1_w51IWZNwJGEmhTAPH-s2CJyKTmWpCBSiJlKEH8XwnZttqyy_sfS2LHGmX3UoTRL2hQ67aPJztABYNUAeQbonyfkL7yNYWo0ApM4_OwobnNRnVOP6594NGCCJq-ByVKEWu_iaYBFn-S5YDSRCe3g9qTfjASsEmz8V_LEFYW1d0JH-OG8_UPqbwfIhAykpxBO3SxjTsbmPNeOhcUouJAuZ2FTJuR1JfmB0eULfA-IjNaQfRUP2EN_j8SbbWoZbKMbDifPnMG_Bqy59kXpE9RR5W0-z0_0c01htqRJ3wFvFj7fe-xSkVgnZ-bq0wzUGK5XAMAhM6qWqQ&h=p4bMeRk2zolWnWZ3-y_zsoo1rDUMdtMxGIMtmLRwhHs method: GET response: body: "" @@ -613,15 +661,19 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRCVVFBVUMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638336800534853029&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=G3_lAljoqeB18nlBdje1gukukgABgcNb11L7fVdp43PF6pX4g6yydK4r9NoziJUuNaEspYRc5tpRQEtW2tXAFlzPP_FFXrdiH-kC-AnheHDbR2lmRJyHu3v8dbAeuWPyJD0iozyYWahvtsSvjU6a0YRpRXnTOZH4_E9nNZil3g-o156mwkdPRb7aw8RwAqOVZVNNXBcX5mBe_prx6iqL_uH0tcMMAHIMX6ZUXLJVOrb-c5cpX5wnknnN8yHeOhBtIm_XhdZlz5D9O_XMCXWd_HajmhZ8v0G9vMBvwOvZZE4PlTZN4eVZgsHGV5p1ttf2xZ-sRi8Ix4QQeQVhVZ3ktw&h=jpZh2h3ZG1kgarYPlfPqCNEqGNNWNr4pJTpmgNsVDyk + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRTSkNPSk0tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367927990878929&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=iTAgpQZHh2rtd1HU-rSlfrQGErT9HcSi29dvMsjHEAEXASoJBtt05UeKr3MrH1hmpaO1Ac3rRlEE-Q6hhU_JDZFiIlRR7IkbplQJ-qPYRpYQwAUoODRWaeD53_q7kS_y5vPPlVNXTciwVvOx7u39I9IXDZnapGYD20-FrkNxTMrMXuJkIp_KcRYyLFy7TLoaoE1-J1XQLdFJwxQ1mS_DzqVrWvgC4jxzw-Dn4inZbXyo_OHPnohFVZoZArkrvB6vclJhBpVF4R1ecwfo-A7Yd4dVVwxZ7mCQ_KJ9QxfjeGxRxlfeUJ5jOoT4OF5p3YD2sFEjXFEyvuu4CmwJmBpUCQ&h=yaTQwlxl9Z0ilRmiCDNpRTRCD4l9jDKp7uakdbW8W4A Pragma: - no-cache Retry-After: - "15" Strict-Transport-Security: - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 2746AD45B74740DA823BA07D74497280 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:26:39Z' status: 202 Accepted code: 202 duration: "" @@ -631,7 +683,7 @@ interactions: headers: Test-Request-Attempt: - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRCVVFBVUMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638336799930302195&c=MIIHHjCCBgagAwIBAgITfwHPHxKTmgA4c2tO5AAEAc8fEjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMwODAyMDY0ODMxWhcNMjQwNzI3MDY0ODMxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhsLKVwXCEctdIBSuxepGRU-bDlA63PQ-s4EzPR1B6S4OSTTk0a0Sxl_gs9xzXpjiuqW1XasW2mdnH9-eCqSmWfuokYD5CrV9-tUQSHefCzPU5-h7OhO2CMEchlYEv7PGeLi6xoSene3rm1xUTD3MSRDuaRC3WOBKEnhPSWdRJvxE13KZV0o3fRjQ2cvuOP5jsJZBX3kLXBDZngsALFQ4gXWXVn7CO7HD0LttkpsIpm4ppWcvcExZ4ct27mOZHEAOzQ_5vpUPM4kFAVoez6DQWsOPEmrmczFl_IDPNfZnQ64S3O36TnpdS8-JkREseyUzJdJrjzFQ2lnxqCRP_qJgECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTkraQRH5WmxdPc9yZtH-shaeLpoTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAA39junRQopC8uRS_tBsR6-M6E04h_HoqhY9NYKs6e2gE1P_mO05iJYTllHMf6Ow3lqyZUIDqiFotgObCVH6fRLL3RLdGlUX5H3hTNh2lhtMXf7Q4uJZu6CDnvKvIiUKIC_LpFjzXaBA8W2OyM1wngAx4djk4L_BBonrspi5Ox23l2sIA7ad7pa9wees8j8bqK2ZptGZfAEt6Tbgv1G0sPL_QJcqfI-lRpEcdFWllxJG4w26KINRMT9KFEIIZQDh3GjOA2JIWOhjOMr9rlsSYDjTJsNH3smFtZCuBnOIbfLKYgeeKF7u8jHXAJWruGk8NM9qRTuoSezGwrqehGhLzuI&s=oPNrox5BNIvjRzjuaOYH9Ai6KrAG89y2WCg3F4StF42jm2gjMepBQKyleUoGxcad9tDE2UvEW_JiCqdCGtnAC2-5qMeLOssRmaEx0fz-OTiR93Lcz2WoOtRtm_2wYCFqMx0yWPHmyHjlk4Ct08l6lYbIBWo3ZjvoRjpYptO_s5Zro14Xp1ucytrLh4x7DRopOW5ROcy_4rtTATobTRr5_pl7jkAemYoIv4ddrSQIXNNu67JNuJmAYYFvVpLnYN9qtPr8ftrkNERN3I0_WeVer3zEfsjlWqr6Uo0DNJTXVOMNWmLmcDByroHFN2Y7zWGr8FpfvNF68wBjl6QEWQuwwg&h=8WIiuTQZuB0m1M_cIwrn_vaDwTznb-66y9t9kAFf7OY + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRTSkNPSk0tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638367927388718854&c=MIIHHjCCBgagAwIBAgITfwI8ooo2761TEgO3SgAEAjyiijANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTc1NTI2WhcNMjQxMDI2MTc1NTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0WQLjgbZj70uXwL_AnKvEas1GVvOB7Og4giEY7H0L78RFiY2-CzzgMKyZV8H3ACZxqQoBMWsq9XAf4iUNAer7s23VPyWkoVdr2uTc8SCvur4qja77OTMKiRVU277ViRu_Mb-fJvQKeRO3Q8A4Sg1A63a2VQ_WlyOCHPBj-gUF0zU4SYnlqSYGcNmuhCjtHpVvF_N3CGz0JlGTo3ia0wmks2y95IHeD0lcr0AgP73_eafbKafZn4Z56GdC3lngKdhyEiQi_kPyxaydv1PfV2xX9OLKvB19e9jLB43QA9r5k5DsAhqtv6eqwHBdW07S9MCMu8kwoYUpX1TTGapizc6ECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTwk8yVBP3k-Qa8LdSw6mv--mLIvDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKR8h2puMUi3SGdIfblcEylOBfcaCRtDDIvC64QKLae7vOAe1f8SpXEFfYeIl5xydb8lEUYApxL701SQSy-NPuBuuQ0CIMKjZ-xCj9VbjQIykosQBVJvxp5I0TplyumFiehQP3zZuc1PZ2hg05aq3CKSbJGKFlow_8P9RN66yeKWGE7SWV9NZThEL8VfEXjl_ITgWb-L1SmnFKTdOVNVDQoRjjX-JqVobqh0O4K0dsPapDoAdqjIECodvocGyWtCEwIk-j8yyBxqX_JzzumMzxUMrxCjaosaJVOvoJB7vh6WuiYfHondyzaGqjm9Bjpqj46bQXojx6xALlzNX5x_j_g&s=P3f3O4mPaJB1_w51IWZNwJGEmhTAPH-s2CJyKTmWpCBSiJlKEH8XwnZttqyy_sfS2LHGmX3UoTRL2hQ67aPJztABYNUAeQbonyfkL7yNYWo0ApM4_OwobnNRnVOP6594NGCCJq-ByVKEWu_iaYBFn-S5YDSRCe3g9qTfjASsEmz8V_LEFYW1d0JH-OG8_UPqbwfIhAykpxBO3SxjTsbmPNeOhcUouJAuZ2FTJuR1JfmB0eULfA-IjNaQfRUP2EN_j8SbbWoZbKMbDifPnMG_Bqy59kXpE9RR5W0-z0_0c01htqRJ3wFvFj7fe-xSkVgnZ-bq0wzUGK5XAMAhM6qWqQ&h=p4bMeRk2zolWnWZ3-y_zsoo1rDUMdtMxGIMtmLRwhHs method: GET response: body: "" @@ -646,8 +698,12 @@ interactions: - no-cache Strict-Transport-Security: - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Msedge-Ref: + - 'Ref A: 272BA05B503444B8B0111AD8A961B159 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:26:54Z' status: 200 OK code: 200 duration: "" @@ -659,10 +715,10 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-buqauc/providers/Microsoft.Storage/storageAccounts/asoteststorwboghd?api-version=2022-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-sjcojm/providers/Microsoft.Storage/storageAccounts/asoteststorygzelx?api-version=2023-01-01 method: DELETE response: - body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-buqauc'' + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-sjcojm'' could not be found."}}' headers: Cache-Control: @@ -677,10 +733,14 @@ interactions: - no-cache Strict-Transport-Security: - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE X-Content-Type-Options: - nosniff X-Ms-Failure-Cause: - gateway + X-Msedge-Ref: + - 'Ref A: E09536F0AA534C489BF5581FE4BADF15 Ref B: CO6AA3150218033 Ref C: 2023-11-28T18:26:58Z' status: 404 Not Found code: 404 duration: "" diff --git a/v2/samples/storage/v1api20230101/v1api20230101_storageaccount.yaml b/v2/samples/storage/v1api20230101/v1api20230101_storageaccount.yaml new file mode 100644 index 00000000000..565f7061fe1 --- /dev/null +++ b/v2/samples/storage/v1api20230101/v1api20230101_storageaccount.yaml @@ -0,0 +1,14 @@ +apiVersion: storage.azure.com/v1api20230101 +kind: StorageAccount +metadata: + name: samplekubestorage + namespace: default +spec: + location: westcentralus + kind: StorageV2 + sku: + name: Standard_LRS + owner: + name: aso-sample-rg + accessTier: Hot + # supportsHttpsTrafficOnly: true diff --git a/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsblobservice.yaml b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsblobservice.yaml new file mode 100644 index 00000000000..20535d3f4a9 --- /dev/null +++ b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsblobservice.yaml @@ -0,0 +1,8 @@ +apiVersion: storage.azure.com/v1api20230101 +kind: StorageAccountsBlobService +metadata: + name: samplekubestorageservice + namespace: default +spec: + owner: + name: samplekubestorage diff --git a/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsblobservicescontainer.yaml b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsblobservicescontainer.yaml new file mode 100644 index 00000000000..15e9a9789d2 --- /dev/null +++ b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsblobservicescontainer.yaml @@ -0,0 +1,8 @@ +apiVersion: storage.azure.com/v1api20230101 +kind: StorageAccountsBlobServicesContainer +metadata: + name: samplecontainer + namespace: default +spec: + owner: + name: samplekubestorageservice diff --git a/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsfileservice.yaml b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsfileservice.yaml new file mode 100644 index 00000000000..b2b8da7d7ef --- /dev/null +++ b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsfileservice.yaml @@ -0,0 +1,8 @@ +apiVersion: storage.azure.com/v1api20230101 +kind: StorageAccountsFileService +metadata: + name: samplekubestoragefile + namespace: default +spec: + owner: + name: samplestorageaccount diff --git a/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsfileservicesshare.yaml b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsfileservicesshare.yaml new file mode 100644 index 00000000000..bb77f0b3038 --- /dev/null +++ b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsfileservicesshare.yaml @@ -0,0 +1,8 @@ +apiVersion: storage.azure.com/v1api20230101 +kind: StorageAccountsFileServicesShare +metadata: + name: sampleshare + namespace: default +spec: + owner: + name: samplekubestoragefile diff --git a/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsmanagementpolicy.yaml b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsmanagementpolicy.yaml new file mode 100644 index 00000000000..611c003af59 --- /dev/null +++ b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsmanagementpolicy.yaml @@ -0,0 +1,23 @@ +apiVersion: storage.azure.com/v1api20230101 +kind: StorageAccountsManagementPolicy +metadata: + name: samplepolicy + namespace: default +spec: + owner: + name: samplekubestorage + policy: + rules: + - name: test-rule + definition: + actions: + version: + delete: + daysAfterCreationGreaterThan: 30 + filters: + blobTypes: + - blockBlob + prefixMatch: + - sample-container/blob1 + enabled: true + type: Lifecycle diff --git a/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsqueueservice.yaml b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsqueueservice.yaml new file mode 100644 index 00000000000..0e18489d256 --- /dev/null +++ b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsqueueservice.yaml @@ -0,0 +1,8 @@ +apiVersion: storage.azure.com/v1api20230101 +kind: StorageAccountsQueueService +metadata: + name: samplekubestoragequeues + namespace: default +spec: + owner: + name: samplekubestorage diff --git a/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsqueueservicesqueue.yaml b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsqueueservicesqueue.yaml new file mode 100644 index 00000000000..072f2858f29 --- /dev/null +++ b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountsqueueservicesqueue.yaml @@ -0,0 +1,8 @@ +apiVersion: storage.azure.com/v1api20230101 +kind: StorageAccountsQueueServicesQueue +metadata: + name: samplequeue + namespace: default +spec: + owner: + name: samplekubestoragequeues diff --git a/v2/samples/storage/v1api20230101/v1api20230101_storageaccountstableservice.yaml b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountstableservice.yaml new file mode 100644 index 00000000000..19641cb8cb0 --- /dev/null +++ b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountstableservice.yaml @@ -0,0 +1,8 @@ +apiVersion: storage.azure.com/v1api20230101 +kind: StorageAccountsTableService +metadata: + name: samplekubestoragetable + namespace: default +spec: + owner: + name: samplestorageaccount diff --git a/v2/samples/storage/v1api20230101/v1api20230101_storageaccountstableservicestable.yaml b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountstableservicestable.yaml new file mode 100644 index 00000000000..338bbc609fb --- /dev/null +++ b/v2/samples/storage/v1api20230101/v1api20230101_storageaccountstableservicestable.yaml @@ -0,0 +1,8 @@ +apiVersion: storage.azure.com/v1api20230101 +kind: StorageAccountsTableServicesTable +metadata: + name: sampletable + namespace: default +spec: + owner: + name: samplekubestoragetable diff --git a/v2/tools/generator/internal/codegen/storage/property_converter.go b/v2/tools/generator/internal/codegen/storage/property_converter.go index 3fd98f781a1..228e1a2abab 100644 --- a/v2/tools/generator/internal/codegen/storage/property_converter.go +++ b/v2/tools/generator/internal/codegen/storage/property_converter.go @@ -137,7 +137,14 @@ func (p *PropertyConverter) preserveKubernetesResourceStorageProperties( prop *astmodel.PropertyDefinition) (*astmodel.PropertyDefinition, error) { if astmodel.IsKubernetesResourceProperty(prop.PropertyName()) { - // Keep these unchanged + // Keep these (mostly) unchanged + if vt, ok := prop.PropertyType().(*astmodel.ValidatedType); ok { + stripped, err := p.stripAllValidations(&p.visitor, vt, nil) + if err != nil { + return nil, err + } + prop = prop.WithType(stripped) + } return prop, nil } diff --git a/v2/tools/generator/internal/codegen/storage/type_converter.go b/v2/tools/generator/internal/codegen/storage/type_converter.go index fb495957dda..38d0398b33c 100644 --- a/v2/tools/generator/internal/codegen/storage/type_converter.go +++ b/v2/tools/generator/internal/codegen/storage/type_converter.go @@ -35,8 +35,8 @@ func NewTypeConverter(definitions astmodel.TypeDefinitionSet) *TypeConverter { VisitObjectType: result.convertObjectType, VisitResourceType: result.convertResourceType, VisitInternalTypeName: result.redirectTypeNamesToStoragePackage, - VisitValidatedType: result.stripAllValidations, VisitFlaggedType: result.stripAllFlags, + // No need to VisitValidatedType and strip validations here as it's already taken care of by the property conversion logic inside of convertObjectType }.Build() return result @@ -119,15 +119,6 @@ func (t *TypeConverter) redirectTypeNamesToStoragePackage(name astmodel.Internal return nil, errors.Errorf("unable to redirect %s into a storage package", name) } -// stripAllValidations removes all validations -func (t *TypeConverter) stripAllValidations( - this *astmodel.TypeVisitor[any], v *astmodel.ValidatedType, ctx any, -) (astmodel.Type, error) { - // strip all type validations from storage definitions, - // act as if they do not exist - return this.Visit(v.ElementType(), ctx) -} - // stripAllFlags removes all flags func (t *TypeConverter) stripAllFlags( tv *astmodel.TypeVisitor[any],